Skip to content

Commit

Permalink
chore(api): remove default query params
Browse files Browse the repository at this point in the history
close #167
  • Loading branch information
buqiyuan committed Apr 4, 2024
1 parent efebda2 commit da782b0
Show file tree
Hide file tree
Showing 17 changed files with 306 additions and 328 deletions.
9 changes: 9 additions & 0 deletions openapi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ generateService({
const controllerName = operationId.split(re)[0];
const moduleName = operationObject.tags?.[0].split(' - ')[0];

// 移除 query 参数的默认值
// operationObject.parameters?.forEach((param) => {
// if ('in' in param && param.in === 'query' && param.schema) {
// if (!('$ref' in param.schema) && param.schema.default) {
// Reflect.deleteProperty(param.schema, 'default');
// }
// }
// });

if (moduleName === controllerName) {
return [controllerName];
} else if (moduleName && moduleName !== controllerName) {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"tinymce": "^6.8.3",
"vue": "~3.4.21",
"vue-echarts": "^6.6.9",
"vue-i18n": "9.10.2",
"vue-i18n": "9.11.0",
"vue-router": "~4.3.0",
"vue-types": "~5.1.1",
"vue-virtual-scroller": "2.0.0-beta.8",
Expand All @@ -81,8 +81,8 @@
"@types/lodash-es": "~4.17.12",
"@types/node": "~20.11.16",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "~7.4.0",
"@typescript-eslint/parser": "~7.4.0",
"@typescript-eslint/eslint-plugin": "~7.5.0",
"@typescript-eslint/parser": "~7.5.0",
"@umijs/openapi": "^1.11.1",
"@vitejs/plugin-vue": "~5.0.4",
"@vitejs/plugin-vue-jsx": "~3.1.0",
Expand All @@ -102,7 +102,7 @@
"less": "~4.2.0",
"lint-staged": "~15.2.2",
"msw": "^2.2.13",
"nx": "^18.1.3",
"nx": "^18.2.2",
"postcss": "~8.4.38",
"postcss-html": "~1.6.0",
"postcss-less": "~6.0.0",
Expand All @@ -116,9 +116,9 @@
"stylelint-order": "~6.0.4",
"stylelint-prettier": "^5.0.0",
"typescript": "~5.4.3",
"unocss": "^0.58.8",
"unocss": "^0.58.9",
"unplugin-vue-components": "~0.26.0",
"vite": "~5.2.6",
"vite": "~5.2.8",
"vite-plugin-checker": "~0.6.4",
"vite-plugin-inspect": "^0.8.3",
"vite-plugin-mkcert": "^1.17.5",
Expand Down
5 changes: 3 additions & 2 deletions packages/vite-plugin-msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"@mswjs/interceptors": "^0.26.14",
"@mswjs/interceptors": "^0.26.15",
"headers-polyfill": "^4.0.3",
"strict-event-emitter": "^0.5.1"
},
"devDependencies": {
"tsup": "^8.0.2"
},
"peerDependencies": {
"msw": "^2.2.13"
"msw": "^2.2.13",
"vite": "^5.2.8"
}
}
2 changes: 1 addition & 1 deletion packages/vite-plugin-tinymce-resource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"build": "tsc"
},
"peerDependencies": {
"vite": "^5.2.6"
"vite": "^5.2.8"
}
}
Loading

0 comments on commit da782b0

Please sign in to comment.