-
Notifications
You must be signed in to change notification settings - Fork 14
support @SecurityScheme
#163
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
Conversation
ok so clearly my custom openAPI serializer doesn't cut it anymore. Instead of pulling all of swagger core, can you only add jackson databind and do something like how we had it before? |
swagger code has a large number of optimization implementations for serialization. Using swagger-code can better maintain compatibility with the OpenAPI specification. This is helpful for generating better OpenAPI documents, so I hope to introduce swigger-code to better help us solve this problem. |
If a regular ObectMapper can serialize correctly, do we need all of the optimizations? I guess I'm hesitating to add all the transitive dependencies to the shaded jar (jakarta.xml.bind, commons-lang, snakeyaml, etc.) if we don't actually need them. |
I removed the swagger core dependency and replaced it with jackson. The generated OpenAPI document looks good at present. |
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.
LGTM
Wait a second, we do have an issue it seems, when I use avaje-http(your changes installed to my local maven) as a provided dependency I get this error.
We'll have to figure out why it can't find the model class |
I get this error with or without the |
also it seems using the ObjectMapper by default outputs invalid openAPI when validated by https://apitools.dev/swagger-parser/online/ |
Yes, thank you for your repair. I ignored this problem at the beginning. |
we can close this since the changes will be added in #164 (when it gets reviewed) |
Hello.
I added support for
@SecurityScheme
and@SecurityRequirement
.Use the following method to automatically convert security authentication to the corresponding OpenAPI.
e.g.
There seems to be a lot of source files that I changed this time. Please help me review them if you have time. If there is any problem, I will modify it in time. Thank you.