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

[REQ] Map OpenAPI essential details to Camel REST-DSL #20429

Open
alimoullim91 opened this issue Jan 9, 2025 · 0 comments
Open

[REQ] Map OpenAPI essential details to Camel REST-DSL #20429

alimoullim91 opened this issue Jan 9, 2025 · 0 comments

Comments

@alimoullim91
Copy link

alimoullim91 commented Jan 9, 2025

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

I happen to come across a peculiar situation where it made sense to leverage the "--type-mapping" feature as the requirement had external model dependencies. However it seems that this feature is non-compliant with standard OpenAPI spec

for example:
I pass typeMappings.set([ 'refType': 'com.package' ]) and then in spec.yml I would simply say type: refType

If I were to run this spec for creating swagger-ui it would cause an error like "undefined type".

Lucky for us spring-doc auto-config scans packages and generates swagger on the fly without the need to refer to the actual spec.yml

The caveat is that the generator doesn't map all essential sections of OpenAPI (i.e. info, tags, servers etc) to the camel REST-DSL. Which causes inconsistencies on swagger-ui.

Describe the solution you'd like

Update the java-camel generator to map essential sections of OpenAPI (i.e. info, tags, servers etc) to the camel REST-DSL if they're present.

OR

Provide a convenient way for the developer to configure these sections

Describe alternatives you've considered

Abstained from using "typeMapping" and reverted to traditional $ref

Additional context

  • It would enable flexible usage of generator specific features like typeMapping, schemaMapping without impacting swagger-ui concerns
  • This feature would improve swagger documentation with REST-DSL coming from the generator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant