danielgtaylor / danielgtaylor/python-betterproto

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

Aperta
#478 7 commenti 6 reazioni 0 assegnatari Vedi su GitHub
enhancement small
Lingua principale
Python
Stelle
1.8k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

La issue non indica file, test o punti di ingresso. Inizia riproducendo la risposta del modello generato in FastAPI e ispezionando la serializzazione Swagger di OpenAPI risultante. Il lavoro è completato quando i modelli Pydantic generati vengono serializzati correttamente e compaiono correttamente nello schema OpenAPI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
fastapi, openapi, python
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.