mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
fix generating oepnapi types
This commit is contained in:
@@ -97,8 +97,8 @@ class RomSchema(BaseModel):
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
@property
|
||||
@computed_field
|
||||
@property
|
||||
def sort_comparator(self) -> str:
|
||||
return (
|
||||
re.sub(
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"lint": "eslint . --fix",
|
||||
"postinstall": "cd node_modules/emulatorjs/data/minify/ && npm i && npm run build",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"generate": "openapi --input http://localhost:5000/openapi.json --output ./src/__generated__ --client axios --useOptions --useUnionTypes --exportServices false --exportSchemas false --exportCore false"
|
||||
"generate": "openapi --input http://127.0.0.1:5000/openapi.json --output ./src/__generated__ --client axios --useOptions --useUnionTypes --exportServices false --exportSchemas false --exportCore false"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.0.96",
|
||||
|
||||
@@ -48,11 +48,11 @@ export type DetailedRomSchema = {
|
||||
multi: boolean;
|
||||
files: Array<string>;
|
||||
full_path: string;
|
||||
sort_comparator: string;
|
||||
merged_screenshots: Array<string>;
|
||||
sibling_roms?: Array<RomSchema>;
|
||||
user_saves?: Array<SaveSchema>;
|
||||
user_states?: Array<StateSchema>;
|
||||
user_screenshots?: Array<ScreenshotSchema>;
|
||||
user_notes?: Array<RomNoteSchema>;
|
||||
readonly sort_comparator: string;
|
||||
};
|
||||
|
||||
2
frontend/src/__generated__/models/RomSchema.ts
generated
2
frontend/src/__generated__/models/RomSchema.ts
generated
@@ -43,5 +43,5 @@ export type RomSchema = {
|
||||
multi: boolean;
|
||||
files: Array<string>;
|
||||
full_path: string;
|
||||
sort_comparator: string;
|
||||
readonly sort_comparator: string;
|
||||
};
|
||||
|
||||
@@ -67,18 +67,18 @@ export default defineConfig(({ mode }) => {
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: `http://localhost:${backendPort}`,
|
||||
target: `http://127.0.0.1:${backendPort}`,
|
||||
changeOrigin: false,
|
||||
secure: false,
|
||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
},
|
||||
"/ws": {
|
||||
target: `http://localhost:${backendPort}`,
|
||||
target: `http://127.0.0.1:${backendPort}`,
|
||||
changeOrigin: false,
|
||||
ws: true,
|
||||
},
|
||||
"/openapi.json": {
|
||||
target: `http://localhost:${backendPort}`,
|
||||
target: `http://127.0.0.1:${backendPort}`,
|
||||
changeOrigin: false,
|
||||
rewrite: (path) => path.replace(/^\/openapi.json/, "/openapi.json"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user