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 see 2 solutions to that :
1 - Use a conlist to keep the contraints. Albeit compact and easy (only a few lines to add around datamodel-code-generator/types.py L87,L254 and datamodel-code-generator/parser/jsonschema.py L772), it would stand out quite a bit, compared to the rest (the conX objects being alone in their own Item model).
2 - Handle constrained array the same way object is handled: by giving it its own Model, which would allow to store the constraints in Field, as it is done for a single array.
The text was updated successfully, but these errors were encountered:
An array of arrays gets translated into List[List[T]], even when the second array has contraints, losing these constraints. Minimal working example :
I see 2 solutions to that :
1 - Use a conlist to keep the contraints. Albeit compact and easy (only a few lines to add around datamodel-code-generator/types.py L87,L254 and datamodel-code-generator/parser/jsonschema.py L772), it would stand out quite a bit, compared to the rest (the conX objects being alone in their own Item model).
2 - Handle constrained array the same way object is handled: by giving it its own Model, which would allow to store the constraints in Field, as it is done for a single array.
The text was updated successfully, but these errors were encountered: