docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
When adding a ":" symbol in the URL, an error occurs during the request
Documentation link
buildPostmanRequest Github Docs
//buildPostmanRequest.ts
function setPathParams(postman: sdk.Request, queryParams: Param[]) {
const source = queryParams.map((param) => {
return new sdk.Variable({
key: param.name,
value: param.value || `:${param.name}`,
});
});
postman.url.variables.assimilate(source, false);
}
yaml
paths:
/User/{id}/page:get:
parameters:
- name: id
in: path
description:
required: true
schema:
type: string
format: 9527
baseUrl: https://api.user.server ↗ path: /User/{id}/page:get Compiled path: /User/:id/page:get The variable {id} has been transformed to ":id" and the constant ":get" to a similar format, where "id" is a variable and ":get" is a fixed parameter. Assuming the id is 9527, When clicking "Send API Request", The desired outcome is: https://api.user.server/User/:9527/page:get
However, the current result is: https://api.user.server/
The path content is missing. I would like to add ":" in the path to support filling without the need for "/" and ensure normal request functionality.
:tada: Thanks for opening your first issue here! Welcome to the community!
Is there any news about this bug? we are encountering the same issue with generating open API documentation as well as the request is also broken with an invalid link
Hi @ovidiukiss, could this be related to #663? If so, can you try the latest canary release to see if that resolves the issue? Thanks.
@sserrata will take a look, thanks!
Canary release 0.0.0-689 still have the issue.
openapu server url: //locahost:8080
openapi path: /records/{record_id}:publish
generated code path: //localhost:8080
expected path: /records/abc:publish
@blindaa121 any updates?