How to configure OpenAPI definitions with java-jaxrs2-openapiservlet sample
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to configure OpenAPI definitions with java-jaxrs2-openapiservlet sample
Hi,
I tried java-jaxrs2-openapiservlet sample successfully.
but I don't know how to configure OpenAPI definitions (e.g. info、servers...) with this sample
Can someone show me example for OpenAPI definitions with java-jaxrs2-openapiservlet?
Thanks!!
Solved! Go to Solution.
- Labels:
-
Swagger Core
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can either use `OpenApiDefinition` annotation (see e.g. https://github.com/swagger-api/swagger-samples/blob/2.0/java/java-jaxrs2-openapiservlet/src/main/jav... in same sample, and check wiki https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations#openapi-annotations) or provide a configuration file as detailed in https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started#your-own-configuratio... and https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-configuration#configu... or even add it programmatically (see https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-configuration#program...)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the answer I want ! Thanks a lot!
I use same sample and add "Metadata" class in my controller package to configure my OpenAPI definitions ~
