Bixby Developer Center

Guides
References

extends

optionalmultiple allowedvalue required

You can extend a parent concept with a new child concept, which inherits all of the parent properties. You can then define new properties specific to the child concept. This is like inheritance in many programming languages, and represents an “is-a” relationship.

For example, a restaurant is a business. Like any business it has a phone number, but it can also have a menu. You can extend both primitive concepts and structure concepts. You can also extend multiple concepts at the same time.

Note

If a concept extends an enum, it must also be an enum. If the concept extends multiple enum concepts, all the parents must have identical symbol sets.

Example

// A Country is a special type of AdministrativeDivision
structure (CountryDivision) {
extends (AdministrativeDivision)
property (countryCode2) {
type (ISOCountryCode2)
min (Optional)
max (One)
}
property (countryCode3) {
type (ISOCountryCode3)
min (Optional)
max (One)
}
}
// A DeliveryRestaurant is both a Restaurant and a
// Vendor (that has a catalog you can buy from, e.g. a Menu)
structure (DeliveryRestaurant) {
extends (viv.restaurant.Restaurant)
extends (viv.order.Vendor)
}