You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using jsconschema-gentypes for synchronizing types between a rust codebase and python ( very usefull!)
However, currenctly struggling since jsonschema-gentypes seems to ignored required shared fields on objects that are also "onOf" (enums).
For example, the following schema should generate a "Deal" type that also has a "agio" (required) field - but it's completely missing in the generated python code:
I am using jsconschema-gentypes for synchronizing types between a rust codebase and python ( very usefull!)
However, currenctly struggling since jsonschema-gentypes seems to ignored required shared fields on objects that are also "onOf" (enums).
For example, the following schema should generate a "Deal" type that also has a "agio" (required) field - but it's completely missing in the generated python code:
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Both", "type": "object", "required": [ "input", "output" ], "properties": { "input": { "$ref": "#/definitions/Deal" }, "output": { "$ref": "#/definitions/Deal" } }, "definitions": { "Deal": { "type": "object", "oneOf": [ { "type": "object", "required": [ "maturity" ], "properties": { "maturity": { "type": "string", "format": "date" } } } ], "required": [ "agio" ], "properties": { "agio": { "type": "number", "format": "double" } } } } }
I. the floowing is a valid object:
{ "input": { "maturity": "2022-12-02", "agio": 1 }, "output": { "maturity": "2022-12-02", "agio": 1 }, }
The text was updated successfully, but these errors were encountered: