-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CRDGenerator: Add support for generic schema definition with @Schema annotation #5881
Comments
@baloo42 thanks as always for those issues, keep them coming! I like the proposal overall!
|
In general: The idea comes from the official Java swagger-annotations: It contains any possible option a Schema-Object allows.
|
@baloo42 I thought a little about this proposal. In this way, we can have scoped discussions when time comes to more "semantically meaningful" field integration. wdyt? |
I don't think it would be the fastest way. The problem is that we can't work on it in parallel, because each PR requires changes at the same places which would result in quite a few merge conflicts. Especially if we reorganize the tests or the CRDGenerator itself every time a little bit. At the same time, most of the additions are no-brainers and easy to implement. Can we discuss the overall strategy in #5859? I don't think we should talk in every PR about the same topics. I would rather create some more issues and describe the overall solution more in detail before we start implementing it. Because then, it might be possible to implement a whole feature set at once... |
Agreed, let's move this discussion there. |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
Is your enhancement related to a problem? Please describe
At the moment the CRDGenerator does not support some schema properties like
format
,example
,externalDocs
(see #5859).Describe the solution you'd like
Introduce
@Schema
annotation which allows to define such leftovers:The
@Schema
annotation always wins if there are other annotations defined, which would result in the same property.For example:
Describe alternatives you've considered
This approach avoids the explosion of annotations in the first place.
But additional annotations can be easily added in the future as it would not be a breaking change.
For example, the
@ListType
could be added later:Additional context
The text was updated successfully, but these errors were encountered: