swagger-api / swagger-api/swagger-codegen

[Python] README not selecting authentication path for default example

Open
#7,584 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Swagger spec works fine in PHP, Ruby, Java, csharp, etc however in python its selecting another path as the example for initialisation and not the path for authentication like in other languages.

Swagger-codegen version

2.3.1

Swagger declaration file content or url
  '/oauth/token':
    post:
      description: Generate authentication token
      summary: Generate authentication token
      tags:
        - authentication
      operationId: auth token
      produces:
        - application/json
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: client_id
          in: formData
          required: true
          type: string
          description: ''
        - name: client_secret
          in: formData
          required: true
          type: string
          description: ''
        - name: grant_type
          in: formData
          required: true
          type: string
          default: client_credentials
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/OAuthResponse'
          examples: {}
        '400':
          description: unsupported_grant_type
        '401':
          description: invalid_client
        '404':
          description: The requested URI does not exist
        '503':
          description: The service requested is currently unavailable
        default:
          description: An internal error occurred when processing the request

however into the README it generates the install procedure with one of the authenticated paths

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Python README generated from the provided Swagger declaration and compare its initialisation example with the authentication path and with other language outputs. Trace the README example-selection behavior, then verify that the generated Python README selects the authentication operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.