Generator fails on OAuth2PasswordRequestForm contents

Offen
#855 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
fastapi, python
Bereich
tooling

Rechercherichtung

Beginne damit, die Validierungsfehler des Generators mit der verknüpften administration.json OpenAPI-Spezifikation zu reproduzieren, wobei der Fokus auf den Feldern von OAuth2PasswordRequestForm und deren nullable Schemas liegt. Als abgeschlossen gilt die Aufgabe, wenn der Generator diese Spezifikation ohne Validierungsfehler akzeptiert und ein gültiges Client-Schema erzeugt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the bug
The generator reports validation errors on regarding the OAuth2PasswordRequestForm type:

components.schemas.Body_login_auth_login_post.Reference.$ref
  Field required [type=missing, input_value={'properties': {'grant_ty..._login_auth_login_post'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.grant_type.Reference.$ref
  Field required [type=missing, input_value={'anyOf': [{'type': 'stri..., 'title': 'Grant Type'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.grant_type.Schema.anyOf.1.Reference.$ref
  Field required [type=missing, input_value={'type': 'null'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.grant_type.Schema.anyOf.1.Schema.type
  Input should be 'string','number','integer','boolean','array' or 'object' [type=enum, input_value='null', input_type=str]
components.schemas.Body_login_auth_login_post.Schema.properties.client_id.Reference.$ref
  Field required [type=missing, input_value={'anyOf': [{'type': 'stri...], 'title': 'Client Id'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.client_id.Schema.anyOf.1.Reference.$ref
  Field required [type=missing, input_value={'type': 'null'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.client_id.Schema.anyOf.1.Schema.type
  Input should be 'string','number','integer','boolean','array' or 'object' [type=enum, input_value='null', input_type=str]
components.schemas.Body_login_auth_login_post.Schema.properties.client_secret.Reference.$ref
  Field required [type=missing, input_value={'anyOf': [{'type': 'stri...title': 'Client Secret'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.client_secret.Schema.anyOf.1.Reference.$ref
  Field required [type=missing, input_value={'type': 'null'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
components.schemas.Body_login_auth_login_post.Schema.properties.client_secret.Schema.anyOf.1.Schema.type
  Input should be 'string','number','integer','boolean','array' or 'object' [type=enum, input_value='null', input_type=str]

OpenAPI Spec File
Example File: https://raw.githubusercontent.com/stustapay/stustapay/2812c74c622b11c2aa95d0f59933815c0daca4ed/api/administration.json

Desktop (please complete the following information):

  • OS: Fedora Linux 38
  • Python Version: 3.11.4
  • openapi-python-client version: 0.15.1

Additional context
Probably because of FastAPI 3.1.0 https://github.com/openapi-generators/openapi-python-client/discussions/818

Vorherrschende Sprache
Python
Sterne
2k
Forks
293
Ø Merge
34 Min.
Gemergte PRs (30 T.)
1

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus openapi-generators/openapi-python-client

Alle Issues in openapi-generators/openapi-python-client

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.