We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
additionalProperties is only supported for nested schemas.
additionalProperties
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://example.com/parameters.jschema", "title": "parameters", "type": "object", "properties": { "field": { "type": "object", "additionalProperties": { "type": "string" } } } }
generates
package main // Parameters type Parameters struct { Field map[string]string `json:"field,omitempty"` }
I would expect top-level schemas to also support additionalProperties.
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://example.com/parameters.jschema", "title": "parameters", "type": "object", "additionalProperties": { "type": "string" } }
package main /* expected */ // Root /* // Field */ type Root string /* type Field map[string]string */
The text was updated successfully, but these errors were encountered:
This should be a simple addition to #40, I'm working on it.
Sorry, something went wrong.
No branches or pull requests
Issue description
additionalProperties
is only supported for nested schemas.example
generates
I would expect top-level schemas to also support
additionalProperties
.example
generates
The text was updated successfully, but these errors were encountered: