danielgtaylor / danielgtaylor/python-betterproto
[Feature Request] Compatibility of generated Pydantic models with FastAPI for proper OpenAPI Swagger serialization
- Langage dominant
- Python
- Étoiles
- 1.8k
- Forks
- 234
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L’issue ne mentionne aucun fichier, test ou point d’entrée. Commencez par reproduire la réponse du modèle généré dans FastAPI et inspecter la sérialisation Swagger OpenAPI qui en résulte. La tâche est terminée lorsque les modèles Pydantic générés sont sérialisés correctement et apparaissent comme prévu dans le schéma OpenAPI.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- fastapi, openapi, python
- Domaine
- api, backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100