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

Provide raw path params support to runtime/client #138

Open
heww opened this issue Apr 26, 2019 · 2 comments
Open

Provide raw path params support to runtime/client #138

heww opened this issue Apr 26, 2019 · 2 comments

Comments

@heww
Copy link

heww commented Apr 26, 2019

Can you provide raw path params support to runtime/client so that the following paths for client request works.

paths:
  '/repositories/{repo_name}/tags':
    get:
      summary: Get tags of a relevant repository.
      tags:
        - repository
      operationId: listRepositoryTags
      parameters:
        - name: repo_name
          in: path
          type: string
          required: true
          description: Relevant repository name.
      responses:
        '200':
          description: Get tags successfully.
          schema:
            type: array
            items:
              $ref: '#/definitions/DetailedTag'
params := repository.ListRepositoryTagsParams{
    RepoName: "library/ubuntu",
}

resp, err := h.Repository.ListRepositoryTags(ctx, &params)

current repo_name library/ubuntu will request to the API /repositories/library%2Fubuntu/tags but the expect API is /repositories/library/ubuntu/tags

@fredbi
Copy link
Member

fredbi commented Oct 22, 2019

Although the escaping behavior is not strictly part of the swagger 2 spec,
there is some consensus on escaping.
Letting raw content creates more problems than it solves.

See swagger-api/swagger-editor#1254

@alswl
Copy link

alswl commented Nov 26, 2021

Maybe provide a simple flags map, that indicates the pathPrams should using raw content?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants