add script to generate typescript interfaces and paths from openapi schema

This commit is contained in:
Jacob Overgaard
2022-05-18 12:58:27 +02:00
parent d9e6a9391f
commit 03fe60ca7c
2 changed files with 20 additions and 4 deletions

View File

@@ -7,7 +7,7 @@
"build": "tsc && vite build",
"test": "echo 'TODO: Implement test'",
"lint": "eslint . --ext .ts --ignore-path .gitignore --cache",
"generate:api": "npx openapi-typescript schemas/**/*.yml --output schemas/schema.ts"
"generate:api": "npx openapi-typescript schemas/**/*.yml --output schemas/generated-schema.ts"
},
"engines": {
"node": ">=16.0.0 <17",
@@ -15,7 +15,8 @@
},
"dependencies": {
"@umbraco-ui/uui": "^0.2.0",
"lit": "^2.0.2"
"lit": "^2.0.2",
"openapi-typescript-fetch": "^1.1.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.24.0",
@@ -34,4 +35,4 @@
"msw": {
"workerDirectory": "public"
}
}
}