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

Add support for openapi-contract-first development #6109

Merged
merged 1 commit into from
May 21, 2024

Conversation

zhfeng
Copy link
Contributor

@zhfeng zhfeng commented May 20, 2024

No description provided.

@zhfeng zhfeng force-pushed the openapi_contract_first_test branch from c17f2df to 5c729fd Compare May 20, 2024 12:01
@jamesnetherton
Copy link
Contributor

For the templates used to generate the model sources, how likely is it that we'll need to update them frequently?

I guess it'd just be a case of copying them from the original Maven plugin source?

@zhfeng zhfeng force-pushed the openapi_contract_first_test branch from 5c729fd to 0fb38d5 Compare May 20, 2024 12:43
@zhfeng zhfeng force-pushed the openapi_contract_first_test branch from 0fb38d5 to 350a65c Compare May 21, 2024 06:39
@zhfeng
Copy link
Contributor Author

zhfeng commented May 21, 2024

I think it could be not changed very offen. I only copy some templates which are related to the models generation. They are copied from io.swagger.codegen.v3:swagger-codegen-generators. And the only change is to add @RegisterForReflection in the generatedAnnotation.mustache with

@RegisterForReflection{{#serializableModel}}(serialization = true){{/serializableModel}}

Copy link
Contributor

@jamesnetherton jamesnetherton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably drop a section into the docs about the codegen (as a follow up PR if you prefer), just so that it's clear for folks that they don't have to use the swagger maven plugins.

@zhfeng zhfeng merged commit 83b7ab2 into apache:main May 21, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants