Skip to content

[Feature] Handle classes with same name #2863

Open
@ML-Marco

Description

Is your feature request related to a problem? Please describe.

If the codebase has classes with the same name but different packages, Sprindoc only adds the Schema of the first one to components.

Describe the solution you'd like

I'd like to have a mechanism, similar to how operation name generation works, where the name of the schema of an identical named class is made unique.

Describe alternatives you've considered

I'm aware of springdoc.use-fqn, however this affects all names of all schemas. These longer names result in longer class names when the definition is used by a code generator. It would be beneficial if name collisions are only avoided when needed.
Additionally it can be a big effort if you have to enable use-fqn in an already existing project.

Additional context

Would you accept a pull request for this kind of feature? Furthermore it would be nice to log a warning if such a case is detected and no collision avoidance exists.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions