@openapi-typescript-infra/service 4.9.0 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/Makefile +2 -2
- package/build/bin/start-service.js.map +1 -1
- package/build/bootstrap.js.map +1 -1
- package/build/config/index.js.map +1 -1
- package/build/config/shortstops.js.map +1 -1
- package/build/config/validation.js.map +1 -1
- package/build/development/port-finder.js.map +1 -1
- package/build/development/repl.js.map +1 -1
- package/build/env.js.map +1 -1
- package/build/express-app/app.js.map +1 -1
- package/build/express-app/internal-server.js.map +1 -1
- package/build/express-app/modules.js.map +1 -1
- package/build/express-app/route-loader.js.map +1 -1
- package/build/openapi.js +6 -1
- package/build/openapi.js.map +1 -1
- package/build/telemetry/index.js.map +1 -1
- package/build/telemetry/instrumentations.js.map +1 -1
- package/build/telemetry/requestLogger.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/config/test.json +5 -0
- package/package.json +10 -10
- package/src/openapi.ts +6 -1
package/config/test.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openapi-typescript-infra/service",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"description": "An opinionated framework for building configuration driven services - web, api, or ob. Uses OpenAPI, pino logging, express, confit, Typescript and vitest.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"cookie-parser": "^1.4.6",
|
|
87
87
|
"dotenv": "^16.3.1",
|
|
88
88
|
"express": "next",
|
|
89
|
-
"express-openapi-validator": "^5.1.
|
|
89
|
+
"express-openapi-validator": "^5.1.1",
|
|
90
90
|
"glob": "^8.1.0",
|
|
91
91
|
"lodash": "^4.17.21",
|
|
92
92
|
"minimist": "^1.2.8",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"request-ip": "^3.3.0"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@commitlint/cli": "^18.4.
|
|
100
|
-
"@commitlint/config-conventional": "^18.4.
|
|
99
|
+
"@commitlint/cli": "^18.4.3",
|
|
100
|
+
"@commitlint/config-conventional": "^18.4.3",
|
|
101
101
|
"@openapi-typescript-infra/coconfig": "^4.2.2",
|
|
102
102
|
"@semantic-release/changelog": "^6.0.3",
|
|
103
103
|
"@semantic-release/commit-analyzer": "^11.1.0",
|
|
@@ -107,15 +107,15 @@
|
|
|
107
107
|
"@types/cookie-parser": "^1.4.6",
|
|
108
108
|
"@types/express": "^4.17.21",
|
|
109
109
|
"@types/glob": "^8.1.0",
|
|
110
|
-
"@types/lodash": "^4.14.
|
|
110
|
+
"@types/lodash": "^4.14.202",
|
|
111
111
|
"@types/minimist": "^1.2.5",
|
|
112
|
-
"@types/node": "^20.
|
|
112
|
+
"@types/node": "^20.10.0",
|
|
113
113
|
"@types/request-ip": "^0.0.41",
|
|
114
114
|
"@types/supertest": "^2.0.16",
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
116
|
-
"@typescript-eslint/parser": "^6.
|
|
115
|
+
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
116
|
+
"@typescript-eslint/parser": "^6.12.0",
|
|
117
117
|
"coconfig": "^1.0.0",
|
|
118
|
-
"eslint": "^8.
|
|
118
|
+
"eslint": "^8.54.0",
|
|
119
119
|
"eslint-config-prettier": "^9.0.0",
|
|
120
120
|
"eslint-plugin-import": "^2.29.0",
|
|
121
121
|
"pino-pretty": "^10.2.3",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"supertest": "^6.3.3",
|
|
124
124
|
"ts-node": "^10.9.1",
|
|
125
125
|
"tsconfig-paths": "^4.2.0",
|
|
126
|
-
"typescript": "^5.
|
|
126
|
+
"typescript": "^5.3.2",
|
|
127
127
|
"vitest": "^0.34.6"
|
|
128
128
|
},
|
|
129
129
|
"resolutions": {
|
package/src/openapi.ts
CHANGED
|
@@ -114,5 +114,10 @@ export async function openApi<
|
|
|
114
114
|
},
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
const { routing } = app.locals.config;
|
|
118
|
+
const combinedOptions = {
|
|
119
|
+
...(typeof routing.openapi === 'object' ? routing.openapi : {}),
|
|
120
|
+
...openApiOptions,
|
|
121
|
+
};
|
|
122
|
+
return OpenApiValidator.middleware(_.defaultsDeep(defaultOptions, combinedOptions));
|
|
118
123
|
}
|