Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #2411
Closed
Open
Issue created Mar 14, 2019 by Administrator@rootContributor

[BUG] Python Authentication path expecting auth token in oauth2 models

Created by: developersteve

Bug Report Checklist

  • [ ✅ ] Have you provided a full/minimal spec to reproduce the issue?
  • [ ✅ ] Have you validated the input using an OpenAPI validator (example)?
  • [ ✅ ] What's the version of OpenAPI Generator used? 3.3.4
  • [ ✅ ] Have you search for related issues/PRs?
  • [ ✅ ] What's the actual output vs expected output? Able to generate a token without needing a token
Description

Generated SDK seems to be requesting a token for a token generating call, only seems to be an issue with python

Example generated SDK

api_instance = API.AuthenticationApi(API.ApiClient(configuration))
openapi-generator version

3.3.4

OpenAPI declaration file content or url

Swagger 2.0 spec

securityDefinitions:
  OAuth2:
    type: oauth2
    flow: application
    tokenUrl: 'example.com'
    scopes:
      LOT_DEVICES_READ: LOT_DEVICES_READ
paths:
  /oauth/token:
      summary: Generate OAuth2 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
Steps to reproduce

Generate SDK with the above

Related issues/PRs
Suggest a fix
Assignee
Assign to
Time tracking