Auto-generate frontend types from OpenApi endpoint
As a developer, I need the up-to-date types for the backend responses so that the typescript compiler finds bugs in my processing of responses.
Current situation: We have a types.ts file that was created manually created.
Problem: A lot of types don't match with the response and there is no validation in place, so frontend components fail silently when they expect the manually typed schema.
Acceptance criteria:
-
front/generated/types.tsis auto-generated onbuildanddevelop. It's a superset of the currentfront/src/types.ts -
All components that process the funkwhale data import front/generated/types.tsto type this data -
front/src/types.tsis deleted
Edited by Flupsi (they)