You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow enum declarations to be extended with new enum values.
Make properties of concepts that are enums "polymorphic" in the JSON validator: searching all enum declarations that extend the field type, and taking the union of all their values.
Context
User wants to extend the values of an enum without incrementing the model version of the concept that is using the enum declaration.
Detailed Description
Note that this does complicate namespace resolution, as the transitive closure of all models required by a namespace is now no longer explicit, even in strict mode. Before validating incoming JSON the model manager must be explicitly populated with all the namespaces that extend an enum declaration.
The text was updated successfully, but these errors were encountered:
Is saying, "expect an enum value here, coming from the VehicleStatus enum declaration, or any enum declaration that extends VehicleStatus. We would have to add logic to enum declarations to check that they were not redeclaring enum values from a super type...
The implementation could be something like rebuilding EnumDeclaration on top of ConceptDeclaration so we share a lot of the logic for handling super types, decorators etc.
Feature Request 🛍️
Add the ability to extend an existing enum declaration.
Use Case
And then...
A valid instance (IFF the
[email protected]
namespace is imported into the model manager):Possible Solution
Allow enum declarations to be extended with new enum values.
Make properties of concepts that are enums "polymorphic" in the JSON validator: searching all enum declarations that extend the field type, and taking the union of all their values.
Context
User wants to extend the values of an enum without incrementing the model version of the concept that is using the enum declaration.
Detailed Description
Note that this does complicate namespace resolution, as the transitive closure of all models required by a namespace is now no longer explicit, even in strict mode. Before validating incoming JSON the model manager must be explicitly populated with all the namespaces that extend an enum declaration.
The text was updated successfully, but these errors were encountered: