Open thejeff77 opened 1 year ago
Fabrikt has only limited support for generating from inline schemas, and doesn't handle unlined schemas in parameter sections. The issue is fabrikt does not have a unique class name to use when the schema is inlined like this.
Migrate the inline parameter definition to reference a schema in the schemas section as per examples.
Gotcha, can I keep this open as a feature request?
Our use case is code-first generated openapi files via springdoc. I.E. we write code, the app runs, and it creates the openapi spec at runtime.
It is tedious and a learning curve to manipulate how springdoc creates spec files, although we have a way to work around this, it isn't clean. It would be high value for us to have fabrikt work with inline definitions in cases like these.
For classname, perhaps this could be generated/made-up based on information available.
For example, it seems to default to "Parameter", it could perhaps generate names like Parameter1
, Parameter2
, and perhaps incorporate type in there. For this case, perhaps LongArrayParameter
would be a good generated class name. The code would have to know how to make sure it doesn't have class name overlap, and how to avoid that when adding new class names.
Thanks
Build Error:
For spec file: