Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When adding a ":" symbol in the URL, an error occurs during the request #621

Open
LGodzilla opened this issue Sep 6, 2023 · 6 comments
Open
Assignees
Labels
bug Something isn't working reviewing 👀 Undergoing manual audit to determine if issue should still be active

Comments

@LGodzilla
Copy link

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.

@LGodzilla LGodzilla added the bug Something isn't working label Sep 6, 2023
@welcome-to-palo-alto-networks
Copy link

🎉 Thanks for opening your first issue here! Welcome to the community!

@ovidiukiss
Copy link

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

@sserrata
Copy link
Member

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.

@ovidiukiss
Copy link

@sserrata will take a look, thanks!

@livelxw
Copy link

livelxw commented Dec 22, 2023

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

20231222162003
20231222162015

@blindaa121 blindaa121 added the reviewing 👀 Undergoing manual audit to determine if issue should still be active label Apr 1, 2024
@blindaa121 blindaa121 self-assigned this Apr 1, 2024
@sserrata
Copy link
Member

@blindaa121 any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reviewing 👀 Undergoing manual audit to determine if issue should still be active
Projects
None yet
Development

No branches or pull requests

5 participants