OpenAPI / Swagger Support - Smile CDR Documentation
OpenAPI / Swagger Support
All Smile CDR FHIR Endpoint modules (FHIR Endpoint, FHIR Gateway, Hybrid Providers) support automatic generation of OpenAPI (aka Swagger) documentation. This documentation describes the FHIR operations, parameters, and request/response details supported by the API.
This support can be enabled and disabled by setting the Enable OpenAPI / Swagger Support setting on the appropriate FHIR Endpoint module.
With this setting enabled, you may wish to set the other Capability Statement Settings as well, as these will control the information exported by the OpenAPI document.
Swagger UI
One of the primary uses for OpenAPI documentation is to power the Swagger UI tool.
When OpenAPI support is enabled on a Smile CDR FHIR Endpoint, a customized version of Swagger UI will be automatically served by the FHIR Endpoint at: [baseUrl]/swagger-ui/, where [baseUrl] is the Fixed Value for Endpoint Base URL property. To ensure the API Docs load correctly, this property must include any context paths in the URL e.g. https://apis.example.org/fhir-request
OpenID Connect Support
If OpenID Connect authentication is enabled on a Smile CDR FHIR Endpoint, the Swagger UI will allow users to authenticate themselves through that protocol.
The following configuration parameters must be set to support the authentication process through Swagger:
- The
ANONYMOUSuser must be granted theFHIR_CAPABILITIESpermission. - For each OpenID Connect Client that will access the Swagger UI, the list of
Authorized Redirect URLs must contain the value
[baseUrl]/swagger-ui/oauth2-redirect.html. - The SMART Outbound Security module must have Cross-Origin Resource Sharing (
CORS) enabled, and the list
of CORS Allowed Request Headers
must include the value
x-requested-with.
Limitations
Smile CDR support for OpenAPI has the following known limitations:
- Complete schema definitions are not yet supplied for FHIR Resources.
OpenAPI / Swagger Support
FHIR Storage
FHIR Storage Modules FHIR Endpoint Module FHIRWeb Console OpenAPI / Swagger Support FHIR Endpoint Customization Resource IDs Search Parameters Search Parameter Features Phonetic Search Parameters Search Parameter Tuning Search Parameter Reindexing Searching for Data Creating Data Reading Data Updating Data Deleting Data Binary Data External Object Storage Externalized Resource Body Storage Request Tracing and Provenance Resource Versions and Versioned References Tags, Profiles, and Security Labels Partitioning and Multitenancy Patient ID Partitioning Modes Custom Resource Types Batch and Scheduled Jobs Tokenization Bulk Resource Modification