Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property default values #23

Open
chriskapp opened this issue Nov 15, 2024 · 0 comments
Open

Property default values #23

chriskapp opened this issue Nov 15, 2024 · 0 comments

Comments

@chriskapp
Copy link
Member

It would be useful if there is a way to describe a default value of a property. This could be especially useful in combination with a discriminator type.

To better explain the use case, if we look at the generated code of the TypeSchema spec we see different types i.e. StringPropertyType, IntegerPropertyType, etc. If you now use these types you always need to set the value of the type i.e.

IntegerPropertyType type = new IntegerPropertyType();
type.setType("integer");

It would be much better if the IntegerPropertyType already includes "integer" as default value for the type property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant