cfpb / sbl-frontend

Small Business Lending Filing Application
MIT License
1 stars 1 forks source link

[Typescript] Generate types from openapi schema #474

Open billhimmelsbach opened 5 months ago

billhimmelsbach commented 5 months ago

We could generate all the types related to the API by consuming the openapi.json FastAPI creates.

Current behavior

Expected behavior

shindigira commented 5 months ago

Oh please bring this automation. I have had to keep tabs on the backend data schemas for changes and then manually update the types.

shindigira commented 5 months ago

Also include this to generate zod and typescript schemas: https://github.com/astahmer/openapi-zod-client?tab=readme-ov-file

shindigira commented 2 months ago

https://fastapi.tiangolo.com/advanced/generate-clients/

This looks to be a proper guide on how to generate typescript from fastapi openapi schemas. Can script it as part of our start.sh.