-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Required attribute of properties defined as stringArray #221
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
Required attribute of properties defined as stringArray #221
Comments
This is how JSON Schema works. See this example: {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Product",
"description": "A product from Acme's catalog",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for a product",
"type": "integer"
}
},
"required": ["id"]
} More info here |
@mohsen1 It works! Great! Thanks! But isn't it a little bit confusing defining the required attribute of the parameters as boolean and the required attribute of the schema properties as array? |
@MonsJovis - for models, we basically use a subset (fsvo 'subset) of json schema which defines 'required' that way. The rest of the spec is built based on our own design and it doesn't necessarily adhere to the json-schema design. We can argue which is better ;) |
@webron ok :) Thanks for explaining! |
The error message is still misleading, as the |
We don't really control the validation error messages. |
I marked properties of one of my schema objects as required.
The validator says the value of required has to be a stringArray:
So I'm wondering why the required attribute of properties is defined as stringArray?
The text was updated successfully, but these errors were encountered: