-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Field are optional by default but should be required #17
Comments
Hi @fmvilas , the I have a similar issue concernant the I think that not nullable field must be set as required by default, contrary to So required field declaration :
Optional field declaration :
|
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
i support required fields in #82 . We just need to validate the required rules (default value or not |
- supports of required fields: required fields are field without default value or without a union containing the 'null' element - brings supports for additional attributes in avro file. See the README.MD for the list of supported attributes - also add the format precision for the double and float type by setting the format attribute in the json definition Closes asyncapi#17,asyncapi#18
i work on them as hacktoberfest issue |
- supports of required fields: required fields are field without default value or without a union containing the 'null' element - brings supports for additional attributes in avro file. See the README.MD for the list of supported attributes - also add the format precision for the double and float type by setting the format attribute in the json definition Closes asyncapi#17,asyncapi#18
- supports of required fields: required fields are field without default value or without a union containing the 'null' element - brings supports for additional attributes in avro file. See the README.MD for the list of supported attributes - also add the format precision for the double and float type by setting the format attribute in the json definition Closes asyncapi#17,asyncapi#18
Hi, I use { "name": "SHORT_PRODUCT_DESCRIPTION", "type": "string", "doc": "A short description of the product"}, to make the field mandatory. but when I pass null, the test ignores it and passes. if the data type is long, then null is no longer passed as expected, since the field I want to make mandatory. so how do I do this for data type string? |
Describe the bug
When using Avro, the fields are always required unless a default value is given. Currently, fields are not being tagged as required when converted to JSON Schema.
Expected behavior
Unless a default value is given, a field should be required.
The text was updated successfully, but these errors were encountered: