Package ca.uhn.fhir.rest.openapi
Class OpenApiInterceptor
java.lang.Object
ca.uhn.fhir.rest.openapi.OpenApiInterceptor
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addResourcePathToClasspath
(String thePath, String theClasspath) protected void
addSearchOperation
(io.swagger.v3.oas.models.OpenAPI openApi, io.swagger.v3.oas.models.Operation operation, ca.uhn.fhir.context.FhirContext ctx, String resourceType, org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent nextResource) protected String
createResourceDescription
(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent theResource) protected io.swagger.v3.oas.models.OpenAPI
generateOpenApi
(ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails) If supplied, this field can be used to provide additional CSS text that should be loaded by the swagger-ui page.protected org.thymeleaf.templateresource.ClassLoaderTemplateResource
protected io.swagger.v3.oas.models.Operation
getPathItem
(io.swagger.v3.oas.models.Paths thePaths, String thePath, io.swagger.v3.oas.models.PathItem.HttpMethod theMethod) protected boolean
handleResourceRequest
(jakarta.servlet.http.HttpServletResponse theResponse, ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails, String requestPath) boolean
protected void
populateOIDCVariables
(ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails, org.thymeleaf.context.WebContext theContext) removeTrailingSlash
(String theUrl) boolean
serveSwaggerUi
(jakarta.servlet.http.HttpServletRequest theRequest, jakarta.servlet.http.HttpServletResponse theResponse, ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails) setBannerImage
(String theBannerImage) void
setCssText
(String theCssText) If supplied, this field can be used to provide additional CSS text that should be loaded by the swagger-ui page.void
setUseResourcePages
(boolean theUseResourcePages)
-
Field Details
-
FHIR_JSON_RESOURCE
- See Also:
-
FHIR_XML_RESOURCE
- See Also:
-
PAGE_SYSTEM
- See Also:
-
PAGE_ALL
- See Also:
-
FHIR_CONTEXT_CANONICAL
-
REQUEST_DETAILS
- See Also:
-
RACCOON_PNG
- See Also:
-
-
Constructor Details
-
OpenApiInterceptor
public OpenApiInterceptor()Constructor
-
-
Method Details
-
addResourcePathToClasspath
-
serveSwaggerUi
public boolean serveSwaggerUi(jakarta.servlet.http.HttpServletRequest theRequest, jakarta.servlet.http.HttpServletResponse theResponse, ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails) throws IOException - Throws:
IOException
-
handleResourceRequest
protected boolean handleResourceRequest(jakarta.servlet.http.HttpServletResponse theResponse, ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails, String requestPath) throws IOException - Throws:
IOException
-
removeTrailingSlash
-
getCssText
If supplied, this field can be used to provide additional CSS text that should be loaded by the swagger-ui page. The contents should be raw CSS text, e.g.BODY { font-size: 1.1em; }
-
setCssText
If supplied, this field can be used to provide additional CSS text that should be loaded by the swagger-ui page. The contents should be raw CSS text, e.g.BODY { font-size: 1.1em; }
-
populateOIDCVariables
protected void populateOIDCVariables(ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails, org.thymeleaf.context.WebContext theContext) -
generateOpenApi
protected io.swagger.v3.oas.models.OpenAPI generateOpenApi(ca.uhn.fhir.rest.server.servlet.ServletRequestDetails theRequestDetails) -
createResourceDescription
@Nonnull protected String createResourceDescription(org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent theResource) -
addSearchOperation
protected void addSearchOperation(io.swagger.v3.oas.models.OpenAPI openApi, io.swagger.v3.oas.models.Operation operation, ca.uhn.fhir.context.FhirContext ctx, String resourceType, org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent nextResource) -
getPathItem
protected io.swagger.v3.oas.models.Operation getPathItem(io.swagger.v3.oas.models.Paths thePaths, String thePath, io.swagger.v3.oas.models.PathItem.HttpMethod theMethod) -
getIndexTemplate
-
getBannerImage
-
setBannerImage
-
isUseResourcePages
-
setUseResourcePages
-