Class OpenApiService
- java.lang.Object
-
- fish.payara.microprofile.openapi.impl.OpenApiService
-
@Service(name="microprofile-openapi-service") @Singleton public class OpenApiService extends Object
-
-
Constructor Summary
Constructors Constructor Description OpenApiService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterApp(String applicationId)org.eclipse.microprofile.openapi.models.OpenAPIgetDocument()static OpenApiServicegetInstance()voidinitConfig()booleanisEnabled()booleanisSecurityEnabled()voidregisterApp(String applicationId, DeploymentContext ctx)voidresumeApp(String applicationId)voidsetCorsHeaders(boolean withCorsHeaders)voidsetEnabled(boolean enabled)voidsetSecurityEnabled(boolean securityEnabled)voidsuspendApp(String applicationId)booleanwithCorsHeaders()
-
-
-
Method Detail
-
initConfig
@PostConstruct public void initConfig()
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
isSecurityEnabled
public boolean isSecurityEnabled()
-
setSecurityEnabled
public void setSecurityEnabled(boolean securityEnabled)
-
withCorsHeaders
public boolean withCorsHeaders()
-
setCorsHeaders
public void setCorsHeaders(boolean withCorsHeaders)
-
registerApp
public void registerApp(String applicationId, DeploymentContext ctx)
-
deregisterApp
public void deregisterApp(String applicationId)
-
resumeApp
public void resumeApp(String applicationId)
-
suspendApp
public void suspendApp(String applicationId)
-
getDocument
public org.eclipse.microprofile.openapi.models.OpenAPI getDocument() throws OpenAPIBuildException, IOException, CloneNotSupportedException- Returns:
- the document If multiple application deployed then merge all the documents. Creates one if it hasn't already been created.
- Throws:
OpenAPIBuildException- if creating the document failed.IOException- if source archive not accessibleCloneNotSupportedException
-
getInstance
public static final OpenApiService getInstance()
-
-