public static interface OpenApiBundle.InitialBuilder
| Modifier and Type | Method and Description |
|---|---|
OpenApiBundle.FinalBuilder |
addResourcePackage(java.lang.String resourcePackage)
Adds a package to the packages Swagger should scan to pick up resources.
|
OpenApiBundle.FinalBuilder |
addResourcePackageClass(java.lang.Class<?> resourcePackageClass)
Adds the package of the given class to the packages Swagger should scan to pick up resources.
|
OpenApiBundle.FinalBuilder |
withExistingOpenAPI(java.lang.String openApiJsonOrYaml)
Use an existing OpenAPI 3 specification as base for the generation.
|
default OpenApiBundle.FinalBuilder |
withExistingOpenAPIFromClasspathResource(java.lang.String path)
Reads an existing OpenAPI 3 specification from the given classpath resource and provide it to
withExistingOpenAPI(String) |
OpenApiBundle.FinalBuilder withExistingOpenAPI(java.lang.String openApiJsonOrYaml)
Note that the OpenAPI annotations always override values from the files if classes are
registered with addResourcePackage(String) or addResourcePackageClass(Class).
The postprocessing will also be done for these files, including sorting, embed parameter, and server baseurl.
openApiJsonOrYaml - the OpenAPI 3 specification as json or yamlEmbedParameterModifier,
SorterModifier,
ServerUrlFilterdefault OpenApiBundle.FinalBuilder withExistingOpenAPIFromClasspathResource(java.lang.String path)
withExistingOpenAPI(String)path - the path to an OpenAPI 3 YAML or JSON file in the classpath.withExistingOpenAPI(String)OpenApiBundle.FinalBuilder addResourcePackage(java.lang.String resourcePackage)
resourcePackage - the package to be scanned; not nulljava.lang.NullPointerException - if resourcePackage is nulljava.lang.IllegalArgumentException - if resourcePackage is emptyOpenApiBundle.FinalBuilder addResourcePackageClass(java.lang.Class<?> resourcePackageClass)
resourcePackageClass - the class whose package should be scanned; not nulljava.lang.NullPointerException - if resourcePackageClass is null