-
Notifications
You must be signed in to change notification settings - Fork 89
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
maven-plugin make it easier to scan dependend schemas #967
Conversation
core/src/main/java/io/smallrye/openapi/runtime/io/operation/OperationReader.java
Outdated
Show resolved
Hide resolved
91cfb52
to
2f0de37
Compare
@Postremus - thank you for putting this together, definitely some cool functionality. The thing I am wondering is, can it be done using standard annotations? For example, instead of a custom annotation, what if the Just an idea. |
@MikeEdgar
Way simpler to use, and better user experience. I will update the implementation accordingly. Thank you! |
40c9cfe
to
0cb0e53
Compare
c710ee2
to
30ecf9c
Compare
Added new options scan.profiles and scan.exclude.profiles to filter the operations that are kept in the schema. Only one of the configured profiles is needed to either include, or exclude, the operation. Exclusions are checked first, then inclusions. Extensions containing profiles have to start with "x-smallrye-profile", and will not be included in the openapi document. Naming of these new options are kept in line with the openapi scan.package and scan.external.package options.
Hi @MikeEdgar, I implemented the approach using profiles defined as part of extensions, like you suggested. |
@MikeEdgar please can you have a look ? |
Thanks @Postremus. I'm planning on looking at this later today or tomorrow morning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks @Postremus . I left one small comment that you might update if you rebase again, but otherwise this looks reasonable. At some point it might be worthwhile to rearrange how things are scanned in the JAX-RS (and other) scanners so that the profiles are checked more pre-emptively, but I wouldn't worry about that now.
String classes = getStringConfigValue(OpenApiConstants.SCAN_PROFILES); | ||
if (classes == null) { | ||
classes = getStringConfigValue(OpenApiConstants.SCAN_PROFILES); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required, but if you re-base again you might rename this variable and the equivalent in the "exclude" method.
Added new options scan.profiles and scan.exclude.profiles to filter the operations that are kept in the schema.
Only one of the configured profiles is needed to either include, or exclude, the operation. Exclusions are checked first, then inclusions. Extensions containing profiles have to start with "x-smallrye-profile", and will not be included in the openapi document.
Naming of these new options are kept in line with the openapi scan.package and scan.external.package options.
closes #952