Skip to content

Add an option to add @RegisterForReflection to allow build in native mode #1090

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

Open
dgautier opened this issue Apr 4, 2025 · 3 comments
Open
Assignees
Labels
area:client This item is related to the client extension

Comments

@dgautier
Copy link

dgautier commented Apr 4, 2025

Tell us the extension to which you'd like to add the feature.

Client

What kind of feature would you like to add?

Currently clients aren't compatible with quarkus native cause the generated classes.

See : https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection

Proposal(s):

Add a config parameter to automatically adds this annotation on generated model classes

Alternative(s):

No response

Additional info:

No response

Community Notes

  • Please vote by adding a 👍 reaction to the feature to help us prioritize.
  • If you want to work on this feature, please leave a comment.
@dgautier
Copy link
Author

dgautier commented Apr 4, 2025

well my bad, reading docs i just found of that using :

quarkus.openapi-generator.codegen.spec.petstore_json.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection

It should be fine.
Still it could be useful to enable it by default ?

@mcruzdev
Copy link
Member

mcruzdev commented Apr 4, 2025

I think yes, because a Quarkus extension must allow the native image execution/build without friction. WDYT @quarkiverse/quarkiverse-openapi-generator? If the team agree with that, feel free to open a pull request @dgautier!

@ricardozanini
Copy link
Member

@dgautier, please add this by default with an option to remove it if someone finds inconsistencies in the model.

@ricardozanini ricardozanini added the area:client This item is related to the client extension label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:client This item is related to the client extension
Projects
None yet
Development

No branches or pull requests

3 participants