Closed stilvoid closed 4 years ago
So, if a user adds a schema without any properties, the generator returns a map[string] TYPE{} instead of a TYPE{}?
The metaschema doesn't allow schemas without any properties.
If you define a property like this
{
"type": "object"
}
you get map[string]interface{}
in your model.
If you define the property as
{
"type": "object",
"patternProperties": {
"*": {
"type": "string"
}
}
}
you get map[string]*encoding.String
in your model.
Issue #, if available: #104
Description of changes: Generate correct Go types for maps and undefined types in schema.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.