Using the rewrite
in the openapi
element, we can rewrite the base URL of an OpenApi by setting the host, port and base path. In this example the base URL is rewritten to predic8.de:3000/foo
.
<api port="2000">
<openapi location="path/to/openapi.yml" validateRequests="yes">
<rewrite host="predic8.de" port="3000" basePath="/foo" />
</openapi>
</api>
openapi | Example |
rewriter | Example |