danielgtaylor / danielgtaylor/python-betterproto

[Feature Request] Compatibility of generated Pydantic models with FastAPI for proper OpenAPI Swagger serialization

Đang mở
#478 7 bình luận 6 reaction 0 người được giao Xem trên GitHub
enhancement small
Ngôn ngữ chính
Python
Star
1.8k
Fork
234
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Is your feature request related to a problem? Please describe.

I'm currently using betterproto to generate Pydantic models for my FastAPI application. However, FastAPI is unable to properly serialize the object to display it in the OpenAPI Swagger UI. This makes it difficult to understand and interact with the generated API documentation.

## Describe the solution you'd like

I would like betterproto to generate Pydantic models that are compatible with FastAPI, allowing FastAPI to serialize the objects correctly in the OpenAPI Swagger UI. This could involve making any necessary modifications to the generated models, such as adding the appropriate Pydantic schema configuration or validators.

If anyone has any suggestions or ideas on how to implement this feature, I'd be happy to work on it myself and contribute to the project. This feature would greatly improve the user experience for developers using both betterproto and FastAPI, as it would allow for seamless integration of the two technologies.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Issue không nêu rõ tệp, kiểm thử hay entry point nào. Hãy bắt đầu bằng cách tái hiện phản hồi của mô hình được tạo trong FastAPI và kiểm tra quá trình tuần tự hóa Swagger của OpenAPI thu được. Công việc được xem là hoàn tất khi các mô hình Pydantic được tạo có thể tuần tự hóa chính xác và xuất hiện đúng cách trong schema OpenAPI.

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, openapi, python
Lĩnh vực
api, backend
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.