Package net.officefloor.web.openapi
Class OpenApiWoofExtensionService
- java.lang.Object
-
- net.officefloor.web.openapi.OpenApiWoofExtensionService
-
- All Implemented Interfaces:
ServiceFactory<WoofExtensionService>
,WoofExtensionService
,WoofExtensionServiceFactory
public class OpenApiWoofExtensionService extends java.lang.Object implements WoofExtensionService, WoofExtensionServiceFactory
WoofExtensionService
to configure OpenAPI specification.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_JSON_PATH
Default JSON path.static java.lang.String
DEFAULT_SWAGGER_PATH
Default swagger path.static java.lang.String
DEFAULT_YAML_PATH
Default YAML path.static java.lang.String
PROPERTY_DISABLE_OPEN_API
Property
name to disable OpenAPI.static java.lang.String
PROPERTY_DISABLE_SWAGGER
Property
name to disable Swagger UI.static java.lang.String
PROPERTY_JSON_PATH
Property
name for the OpenAPI JSON path.static java.lang.String
PROPERTY_SWAGGER_PATH
Property
name for the Swagger UI path.static java.lang.String
PROPERTY_YAML_PATH
Property
name for the OpenAPI YAML path.
-
Constructor Summary
Constructors Constructor Description OpenApiWoofExtensionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WoofExtensionService
createService(ServiceContext context)
Creates the service.void
extend(WoofContext context)
Extends theWebArchitect
.
-
-
-
Field Detail
-
PROPERTY_DISABLE_OPEN_API
public static final java.lang.String PROPERTY_DISABLE_OPEN_API
Property
name to disable OpenAPI. This is useful for different environments to be configured differently.- See Also:
- Constant Field Values
-
PROPERTY_JSON_PATH
public static final java.lang.String PROPERTY_JSON_PATH
Property
name for the OpenAPI JSON path.- See Also:
- Constant Field Values
-
DEFAULT_JSON_PATH
public static final java.lang.String DEFAULT_JSON_PATH
Default JSON path.- See Also:
- Constant Field Values
-
PROPERTY_YAML_PATH
public static final java.lang.String PROPERTY_YAML_PATH
Property
name for the OpenAPI YAML path.- See Also:
- Constant Field Values
-
DEFAULT_YAML_PATH
public static final java.lang.String DEFAULT_YAML_PATH
Default YAML path.- See Also:
- Constant Field Values
-
PROPERTY_DISABLE_SWAGGER
public static final java.lang.String PROPERTY_DISABLE_SWAGGER
Property
name to disable Swagger UI. This is useful to only expose the OpenAPI specifications, as Swagger UI likely hosted elsewhere.- See Also:
- Constant Field Values
-
PROPERTY_SWAGGER_PATH
public static final java.lang.String PROPERTY_SWAGGER_PATH
Property
name for the Swagger UI path.- See Also:
- Constant Field Values
-
DEFAULT_SWAGGER_PATH
public static final java.lang.String DEFAULT_SWAGGER_PATH
Default swagger path.- See Also:
- Constant Field Values
-
-
Method Detail
-
createService
public WoofExtensionService createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<WoofExtensionService>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
extend
public void extend(WoofContext context) throws java.lang.Exception
Description copied from interface:WoofExtensionService
Extends theWebArchitect
.- Specified by:
extend
in interfaceWoofExtensionService
- Parameters:
context
-WoofContext
.- Throws:
java.lang.Exception
- If fails to extend.
-
-