Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for generating qualified model package/namespace #1001

Open
frode-carlsen opened this issue Dec 28, 2021 · 0 comments · May be fixed by #1002
Open

Support for generating qualified model package/namespace #1001

frode-carlsen opened this issue Dec 28, 2021 · 0 comments · May be fixed by #1002

Comments

@frode-carlsen
Copy link

frode-carlsen commented Dec 28, 2021

The generator will currently place all generated model files in the same folder. This doesn't work well with larger models that may support different versions of the same API (requiring all model files to have unique names). The translation of schema names to model names also does a significant amount of character substitution, changing case etc. of the schema names, which further separates the generated code from the assigned schema name.

For example the following

 /my/path:
    post:
      ....
      requestBody:
        ...
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/some.namespace.Model'

will generate a SomeNamespaceModel class file in the io.swagger.model namespace instead of a Model class in some.namespace

Because there's a significant amount of conversion of model names by legacy (transliterating _. etc to title case.
I propose to add a new flag to support generating fully-qualified names: useFqn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant