You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can I suggest to leave the default basePath value to be an empty string instead of '/'? Currently, the servers URL from the response swagger JSON is always having a trailing slash because of the default value and it doesn't have a way to remove it.
This creates a small problem when importing the JSON file into Postman. Postman can read the swagger JSON and automatically generate all API endpoints. However, the issue here is all the endpoints are having double slash due to the server URL having a trailing slash. To illustrate http://localhost:3000//login.
If we have a way to unset the default basePath or keep the basePath as empty. It would solve the issue.
Can I suggest to leave the default
basePath
value to be an empty string instead of'/'
? Currently, the servers URL from the response swagger JSON is always having a trailing slash because of the default value and it doesn't have a way to remove it.This creates a small problem when importing the JSON file into Postman. Postman can read the swagger JSON and automatically generate all API endpoints. However, the issue here is all the endpoints are having double slash due to the server URL having a trailing slash. To illustrate
http://localhost:3000//login
.If we have a way to unset the default basePath or keep the basePath as empty. It would solve the issue.
Default swagger option basePath value:
fastify-oas/lib/openapi/constructor.js
Line 15 in 4e58c5d
Example of my swagger JSON from fastify-oas:
(I'm hoping to have a way to remove the trailing slash from the server url)
The text was updated successfully, but these errors were encountered: