openapi-generators / openapi-generators/openapi-python-client
Generator fails on OAuth2PasswordRequestForm contents
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 2k
- Fork
- 293
- Merge trung bình
- 34 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện các lỗi xác thực của generator với đặc tả OpenAPI administration.json được liên kết, tập trung vào các trường của OAuth2PasswordRequestForm và các schema nullable của chúng. Hoàn thành khi generator chấp nhận đặc tả này mà không có lỗi xác thực và tạo ra một client schema hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- fastapi, python
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100