anomaly / lab-web-client

A template for building accessible, localised, high performance React front ends with a standard set of libraries. Also provides a template for development servers.
Apache License 2.0
2 stars 0 forks source link

Generate yup resolvers based on the OpenAPI output #5

Closed devraj closed 1 year ago

devraj commented 2 years ago

There are projects that are attempting to do this first step is to investigate what state they are in and if they are worth incorporating into the mix of things.

If successful then it would mean that the resolvers are auto generated, further cutting time to market and the pydantic models becoming the single source of truth.

Note: that this might not be a one for one solution as the interface would behave differently to the data payload for API calls.

devraj commented 1 year ago

See #21 we might not nee to do this if we move to react-query

devraj commented 1 year ago

Moved to using react-query and orval to generate API clients.

react-query provides a form based lifecycle of dealing with requests. orval based clients have a typescript interface to request and responses.