Skip to content

Commit

Permalink
docs: adds usage example for IMPOSTER_OPENAPI_SPEC_PATH_PREFIX.
Browse files Browse the repository at this point in the history
  • Loading branch information
outofcoffee committed Nov 26, 2023
1 parent 349d135 commit 3817677
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/tips_tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,13 @@ Here's a simple overview:
5. Configure your `GenericContainer` to wait for the `/system/status` HTTP endpoint to be accessible so your tests don't start before the mock is ready.

Now, when you run your test, your custom mock container will start, load your configuration and mock data, ready for your test methods to use it!

## Set OpenAPI spec base path

Set the environment variable `IMPOSTER_OPENAPI_SPEC_PATH_PREFIX`, to override the default `/_spec` prefix.

For example:

IMPOSTER_OPENAPI_SPEC_PATH_PREFIX="/api/core-mock/v1/_spec"

...will make the spec UI accessible at http://localhost:8080/api/core-mock/v1/_spec/

0 comments on commit 3817677

Please sign in to comment.