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!!
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/java/io/swagger/sample/resource/Metadata.java 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-configuration and https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-configuration#configuration or even add it programmatically (see https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-configuration#programmatic-configuration)