Package org.sdase.commons.server.openapi
Class OpenApiBundle.Builder
- java.lang.Object
-
- org.sdase.commons.server.openapi.OpenApiBundle.Builder
-
- All Implemented Interfaces:
OpenApiBundle.FinalBuilder,OpenApiBundle.InitialBuilder
- Enclosing class:
- OpenApiBundle
public static final class OpenApiBundle.Builder extends java.lang.Object implements OpenApiBundle.InitialBuilder, OpenApiBundle.FinalBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenApiBundle.BuilderaddResourcePackage(java.lang.String resourcePackage)Adds a package to the packages Swagger should scan to pick up resources.OpenApiBundle.BuilderaddResourcePackageClass(java.lang.Class<?> resourcePackageClass)Adds the package of the given class to the packages Swagger should scan to pick up resources.OpenApiBundlebuild()OpenApiBundle.BuilderwithExistingOpenAPI(java.lang.String openApiJsonOrYaml)Use an existing OpenAPI 3 specification as base for the generation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sdase.commons.server.openapi.OpenApiBundle.InitialBuilder
withExistingOpenAPIFromClasspathResource
-
-
-
-
Method Detail
-
addResourcePackage
public OpenApiBundle.Builder addResourcePackage(java.lang.String resourcePackage)
Description copied from interface:OpenApiBundle.InitialBuilderAdds a package to the packages Swagger should scan to pick up resources.- Specified by:
addResourcePackagein interfaceOpenApiBundle.InitialBuilder- Parameters:
resourcePackage- the package to be scanned; not null- Returns:
- the builder
- See Also:
- Swagger's BeanConfig
-
addResourcePackageClass
public OpenApiBundle.Builder addResourcePackageClass(java.lang.Class<?> resourcePackageClass)
Description copied from interface:OpenApiBundle.InitialBuilderAdds the package of the given class to the packages Swagger should scan to pick up resources.- Specified by:
addResourcePackageClassin interfaceOpenApiBundle.InitialBuilder- Parameters:
resourcePackageClass- the class whose package should be scanned; not null- Returns:
- the builder
- See Also:
- Swagger's BeanConfig
-
withExistingOpenAPI
public OpenApiBundle.Builder withExistingOpenAPI(java.lang.String openApiJsonOrYaml)
Description copied from interface:OpenApiBundle.InitialBuilderUse an existing OpenAPI 3 specification as base for the generation.Note that the OpenAPI annotations always override values from the files if classes are registered with
OpenApiBundle.InitialBuilder.addResourcePackage(String)orOpenApiBundle.InitialBuilder.addResourcePackageClass(Class).The postprocessing will also be done for these files, including sorting, embed parameter, and server baseurl.
- Specified by:
withExistingOpenAPIin interfaceOpenApiBundle.InitialBuilder- Parameters:
openApiJsonOrYaml- the OpenAPI 3 specification as json or yaml- Returns:
- the builder
- See Also:
EmbedParameterModifier,SorterModifier,ServerUrlFilter
-
build
public OpenApiBundle build()
- Specified by:
buildin interfaceOpenApiBundle.FinalBuilder
-
-