Open jayvdb opened 1 year ago
You are right. Currently you have to provide all schemas in OpenApi document starting from the most simple: https://github.com/kstasik/schema-tools-templates/blob/master/tests/rust/spec/api/api.yaml#L16
I was thinking about rebuilding it. Instead of generating names on demand during recursive iteration program would have to gather flat structure of entities with suggested names and relations (for example parent schema reference). Sort them by putting simple structures at the top and then starting the naming process.
We have a bunch of schemas being included from external files.
If a schema refers to a schema that appears after it, like this, the result is very different ...
... to when the schemas are ordered so they always only include prior schemas, like:
I can provide more details of the schemas if that helps, and reduce it to a few schemas only to better demonstrate the problem. We're able to workaround it by carefully ordering the schemas.