Skip to content

Oauth support seems broken #1235

Open
Open
@bgirschig

Description

@bgirschig

Describe the bug
I am trying to generate a client for an API with an clientCredentials oauth flow, but the generated client doesn't seem to manage the authentication at all: Searching the client's folder for the keyword oauth yields no results.

I can make it work by generating a token myself and using it in AuthenticatedClient, but I would expect the generated client to be able to handle that.

Is openapi-python-client supposed to generate a client that handles a clientCredentials oauth flow ?

OpenAPI Spec File

openapi: 3.0.3
info:
  title: Test API
  version: v1
paths:
  /test:
    get:
      security:
        - oauth2: []
      responses:
        '200':
          description: ""

components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          refreshUrl: https://whatever.com/oauth/token/
          tokenUrl: https://whatever.com/oauth/token/
          scopes: {}

Desktop:

  • OS: Ubuntu 22.04.5
  • Python Version: 3.12.7
  • openapi-python-client version: 0.24.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions