Skip to content

SDA Commons Server OpenAPI Example

This example module shows an application that uses the OpenApiBundle to describe REST endpoints with a OpenApi 3 documentation.

Beside the initialization of the bundle via the SdaPlatformBundle, it includes a PersonService and a PersonResource to demonstrate some cases of API documentation.

The integration test shows how the existence of a OpenAPI endpoint can be tested.

The provided local-config.yaml allows to start the application without the need for authentication locally using a run configuration of the favourite IDE that defines the program arguments server sda-commons-server-openapi-example/local-config.yaml. Swagger documentation is available at GET /openapi.json or GET /openapi.yaml, you may use the Swagger Editor or Swagger UI to view the documentation.

The config.yaml is an example how the application can be started in production. Such file should be copied in the Docker container so that the variables can be populated using the environment configured by the orchestration tool (e.g. Kubernetes).