openapi-generators / openapi-generators/openapi-python-client
Unable to process schema when title is ambiguous
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
Unable to process schema /components/schemas/ActualApprovement:
Could not find reference in parsed models or enums
Failure to process schema has resulted in the removal of:
/components/schemas/ActualApprovement
Reference(ref='#/components/schemas/backend__server__src__models__types__approvement__ApprovementStatus')
OpenAPI Spec File
A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.
{
"components": {
"schemas": {
"backend__gateways__types__ApprovementStatus": {
"type": "string",
"enum": [
"in_progress",
"suspended",
"rejected",
"closed"
],
"title": "ApprovementStatus"
},
"backend__server__src__models__types__approvement__ApprovementStatus": {
"type": "string",
"enum": [
"pending",
"approved",
"rejected",
"cancelled"
],
"title": "ApprovementStatus"
},
"ActualApprovement": {
"properties": {
"status": {
"$ref": "#/components/schemas/backend__server__src__models__types__approvement__ApprovementStatus"
}
},
"type": "object",
"required": [
"status",
],
"title": "ActualApprovement"
},
}}}
Desktop (please complete the following information):
- OS: Ubuntu 22.04
- Python Version: 3.9
- openapi-python-client version 0.27.1
Additional context
Add any other context about the problem here.
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 lỗi với tài liệu OpenAPI trong issue, tập trung vào việc phân tích schema và phân giải tham chiếu cho hai schema cùng có tiêu đề "ApprovementStatus". Hoàn thành khi enum được tham chiếu được phân giải chính xác và schema ActualApprovement không bị xóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- 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
- 45/100