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

Generator fails on OAuth2PasswordRequestForm contents #855

Open
roggenbrot42 opened this issue Sep 12, 2023 · 1 comment
Open

Generator fails on OAuth2PasswordRequestForm contents #855

roggenbrot42 opened this issue Sep 12, 2023 · 1 comment

Comments

@roggenbrot42
Copy link

roggenbrot42 commented Sep 12, 2023

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

@lshigupt
Copy link

lshigupt commented May 6, 2024

May I also ask If I can use the AuthenticatedClient in order to support the AWS IAM role for authentication as well ?

As I can see we can use httpx_args: A dictionary of additional arguments in order to pass it in that class.

I assume We can use httpx_args to pass an IAM role for authentication ?

Looking forward to it.

Thanks in advance.

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

No branches or pull requests

2 participants