Skip to content

Testing using Swagger UI

Yoom Lam edited this page Aug 23, 2022 · 12 revisions

VRO's Swagger UI is available for testing VRO's API endpoints

Local testing

  1. Run VRO: ./gradlew :app:dockerComposeUp -- see Development process for details and alternatives
  2. Open a browser to http://localhost:8080/swagger
  3. Verify VRO is running by testing an endpoint (without authenticating) by expanding an endpoint (e.g., /v1/health-data-assessment) and clicking the "Try it out" button, then "Execute". The response should be code 403 with "error": "Forbidden".
  4. Authenticate by clicking the "Authorize" button (near the top of the page), fill in the X-API-Key (at the bottom of the popup window) with one of these values, then click the "Authorize" button. A "Logout" button should appear. Click "Close".
  5. Retry the endpoint (now with the X-API-Key header).

To connect to Lighthouse, a service-data-access/src/main/resources/private.pem file is needed. If it doesn't exist, create it using this.

Testing on Non-prod LHDI deployment

Swagger UI can be accessed on the VA network at https://dev.lighthouse.va.gov/abd-vro/swagger.

Clone this wiki locally