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
WoofExtensionServiceto configure OpenAPI specification.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_JSON_PATHDefault JSON path.static java.lang.StringDEFAULT_SWAGGER_PATHDefault swagger path.static java.lang.StringDEFAULT_YAML_PATHDefault YAML path.static java.lang.StringPROPERTY_DISABLE_OPEN_APIPropertyname to disable OpenAPI.static java.lang.StringPROPERTY_DISABLE_SWAGGERPropertyname to disable Swagger UI.static java.lang.StringPROPERTY_JSON_PATHPropertyname for the OpenAPI JSON path.static java.lang.StringPROPERTY_SWAGGER_PATHPropertyname for the Swagger UI path.static java.lang.StringPROPERTY_YAML_PATHPropertyname for the OpenAPI YAML path.
-
Constructor Summary
Constructors Constructor Description OpenApiWoofExtensionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WoofExtensionServicecreateService(ServiceContext context)Creates the service.voidextend(WoofContext context)Extends theWebArchitect.
-
-
-
Field Detail
-
PROPERTY_DISABLE_OPEN_API
public static final java.lang.String PROPERTY_DISABLE_OPEN_API
Propertyname 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
Propertyname 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
Propertyname 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
Propertyname 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
Propertyname 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:ServiceFactoryCreates the service.- Specified by:
createServicein 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:WoofExtensionServiceExtends theWebArchitect.- Specified by:
extendin interfaceWoofExtensionService- Parameters:
context-WoofContext.- Throws:
java.lang.Exception- If fails to extend.
-
-