Skip to content

Commit

Permalink
feat(swaggerUI): add displayOperationId option in swaggerUI
Browse files Browse the repository at this point in the history
  • Loading branch information
AmnezziaCS authored and nfroidure committed Nov 25, 2023
1 parent 4424695 commit 5eb1347
Show file tree
Hide file tree
Showing 14 changed files with 305 additions and 49 deletions.
29 changes: 18 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/whook-aws-lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"openapi-types": "^12.1.3",
"qs": "^6.11.2",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"uuid": "^9.0.1",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ DEV_MODE=1
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down Expand Up @@ -491,7 +491,7 @@ DEV_MODE=1
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down Expand Up @@ -863,7 +863,7 @@ DEV_MODE=1
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down Expand Up @@ -1218,7 +1218,7 @@ DEV_MODE=1
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/whook-create/src/services/createWhook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe('initCreateWhook', () => {
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0",
},
Expand Down Expand Up @@ -396,7 +396,7 @@ describe('initCreateWhook', () => {
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0",
},
Expand Down Expand Up @@ -603,7 +603,7 @@ describe('initCreateWhook', () => {
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/whook-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"openapi-types": "^12.1.3",
"pkg-dir": "^8.0.0",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/whook-example/src/config/common/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DEFAULT_ERRORS_DESCRIPTORS } from '@whook/http-router';
import { readFileSync } from 'fs';
import { NodeEnv } from 'application-services';
import { DEFAULT_SWAGGER_UI_CONFIG } from '@whook/swagger-ui';
import type { AppConfig } from 'application-services';

/* Architecture Note #2: Configuration
Expand Down Expand Up @@ -67,6 +68,10 @@ const CONFIG: Omit<AppConfig, 'HOST'> = {
'User-Agent',
].join(','),
},
SWAGGER_UI_CONFIG: {
...DEFAULT_SWAGGER_UI_CONFIG,
defaultModelRendering: 'model',
},
};

export default CONFIG;
2 changes: 1 addition & 1 deletion packages/whook-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"common-services": "^15.0.0",
"knifecycle": "^17.0.1",
"openapi-types": "^12.1.3",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yhttperror": "^8.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/whook-http-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"qs": "^6.11.2",
"siso": "^6.0.1",
"strict-qs": "^8.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/whook-http-transaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"ms": "^2.1.3",
"openapi-types": "^12.1.3",
"statuses": "^2.0.1",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/whook-oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"cookie": "^0.6.0",
"knifecycle": "^17.0.1",
"openapi-types": "^12.1.3",
"type-fest": "^4.7.1",
"type-fest": "^4.8.2",
"yerror": "^8.0.0",
"yhttperror": "^8.0.0"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/whook-swagger-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@
},
"homepage": "https://github.com/nfroidure/whook",
"dependencies": {
"@types/swagger-ui": "3.52.4",
"@whook/http-router": "^14.0.0",
"@whook/whook": "^14.0.0",
"axios": "^1.6.1",
"ecstatic": "^4.1.4",
"knifecycle": "^17.0.1",
"openapi-types": "^12.1.3",
"swagger-ui-dist": "^5.9.3"
"swagger-ui-dist": "^5.9.3",
"type-fest": "^4.8.2"
},
"devDependencies": {
"@swc/cli": "^0.1.62",
Expand Down
Loading

0 comments on commit 5eb1347

Please sign in to comment.