Fix schema.json being auto deleted and remove formating and linting of generated openapi client

This commit is contained in:
Antoine Bartuccio 2025-03-09 16:30:21 +01:00
parent 05edf33062
commit 106dc32a3d
4 changed files with 5 additions and 6 deletions

View File

@ -6,9 +6,7 @@ import { defineConfig } from "@hey-api/openapi-ts";
export default defineConfig({ export default defineConfig({
input: resolve(__dirname, "./staticfiles/generated/openapi/schema.json"), input: resolve(__dirname, "./staticfiles/generated/openapi/schema.json"),
output: { output: {
lint: "biome", path: resolve(__dirname, "./staticfiles/generated/openapi/client"),
format: "biome",
path: resolve(__dirname, "./staticfiles/generated/openapi"),
}, },
plugins: [ plugins: [
{ {

3
package-lock.json generated
View File

@ -3383,7 +3383,8 @@
"node_modules/country-flag-emoji-polyfill": { "node_modules/country-flag-emoji-polyfill": {
"version": "0.1.8", "version": "0.1.8",
"resolved": "https://registry.npmjs.org/country-flag-emoji-polyfill/-/country-flag-emoji-polyfill-0.1.8.tgz", "resolved": "https://registry.npmjs.org/country-flag-emoji-polyfill/-/country-flag-emoji-polyfill-0.1.8.tgz",
"integrity": "sha512-Mbah52sADS3gshUYhK5142gtUuJpHYOXlXtLFI3Ly4RqgkmPMvhX9kMZSTqDM8P7UqtSW99eHKFphhQSGXA3Cg==" "integrity": "sha512-Mbah52sADS3gshUYhK5142gtUuJpHYOXlXtLFI3Ly4RqgkmPMvhX9kMZSTqDM8P7UqtSW99eHKFphhQSGXA3Cg==",
"license": "MIT"
}, },
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.6", "version": "7.0.6",

View File

@ -17,7 +17,7 @@
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"sideEffects": [".css"], "sideEffects": [".css"],
"imports": { "imports": {
"#openapi": "./staticfiles/generated/openapi/index.ts", "#openapi": "./staticfiles/generated/openapi/client/index.ts",
"#core:*": "./core/static/bundled/*", "#core:*": "./core/static/bundled/*",
"#pedagogy:*": "./pedagogy/static/bundled/*", "#pedagogy:*": "./pedagogy/static/bundled/*",
"#counter:*": "./counter/static/bundled/*", "#counter:*": "./counter/static/bundled/*",

View File

@ -14,7 +14,7 @@
"types": ["jquery", "alpinejs"], "types": ["jquery", "alpinejs"],
"lib": ["es7"], "lib": ["es7"],
"paths": { "paths": {
"#openapi": ["./staticfiles/generated/openapi/index.ts"], "#openapi": ["./staticfiles/generated/openapi/client/index.ts"],
"#core:*": ["./core/static/bundled/*"], "#core:*": ["./core/static/bundled/*"],
"#pedagogy:*": ["./pedagogy/static/bundled/*"], "#pedagogy:*": ["./pedagogy/static/bundled/*"],
"#counter:*": ["./counter/static/bundled/*"], "#counter:*": ["./counter/static/bundled/*"],