Skip to content

Replace endpoint return types json/dict with pydantic schemas  #13

Closed
@morrieinmaas

Description

@morrieinmaas

We can use pydentic models (correlated to the JSON schemas in FastAPI, see also) to replace the rather undefined json returns for as many endpoints as possible.

  1. That'll enable us to provide function signatures for the endpoints
  2. We have a better handle on/it is more clear what we have to expect when calling a function
  3. We get validation of data structures coherently and for a discount.
  4. We can test this more easily
  5. Some other benefits...

Downsides: ? - Please leave them in the comments if you find any.

Happy to work on this. It's more a matter of time/priority. So, it's up for grabs - first come first serve.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions