Introduces a new /api/choices/ endpoint for fetching model choices with multilingual labels. Updates Django models to use 'cz#' prefix for Czech labels. Adds OpenAPI client generation via orval, refactors frontend API structure, and provides documentation and helper scripts for dynamic choices and OpenAPI usage.
31 lines
702 B
JavaScript
31 lines
702 B
JavaScript
module.exports = {
|
|
public: {
|
|
input: { target: "http://localhost:8000/api/schema/" },
|
|
output: {
|
|
target: "src/api/generated/public.ts",
|
|
schemas: "src/api/generated/models",
|
|
client: "axios",
|
|
override: {
|
|
mutator: {
|
|
path: "src/api/publicClient.ts",
|
|
name: "publicApi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
private: {
|
|
input: { target: "http://localhost:8000/api/schema/" },
|
|
output: {
|
|
target: "src/api/generated/private.ts",
|
|
schemas: "src/api/generated/models",
|
|
client: "axios",
|
|
override: {
|
|
mutator: {
|
|
path: "src/api/privateClient.ts",
|
|
name: "privateApi",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|