Description
Swagger UI support can be provided in JPA Server by adding the following dependency:
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-server-openapi</artifactId>
<version>5.4.0-PRE10-SNAPSHOT</version>
</dependency>
The next step would be to register the interceptor in our JPA Restful server class.
OpenApiInterceptor openApiInterceptor = new OpenApiInterceptor();
registerInterceptor(openApiInterceptor);
The releases for the hapi-fhir-server-openapi
is in Maven here: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-server-openapi/
Once dependency is added, a UI similar to this can be accessed after successful login through the Keycloak Login Form.
https://hapi.fhir.org/baseR4/swagger-ui/
Issue:
Swagger UI won't have documentation for the extension of resource providers like LocationHierarchy.
We need to add or manipulate this after RnD.
For Reference:
https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html
As discussed we can pick this issue later on.
cc: @f-odhiambo @dubdabasoduba @kwasim