fix(backend): use unique operationId in the OpenAPI schema (#15420)
* fix(backend): use unique `operationId` in the OpenAPI schema * fix: read with UTF-8 encoding
This commit is contained in:
parent
a3cc865e11
commit
54fc232a23
2 changed files with 36 additions and 7 deletions
|
|
@ -210,9 +210,15 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
|
|||
|
||||
spec.paths['/' + endpoint.name] = {
|
||||
...(endpoint.meta.allowGet ? {
|
||||
get: info,
|
||||
get: {
|
||||
...info,
|
||||
operationId: 'get___' + info.operationId,
|
||||
},
|
||||
} : {}),
|
||||
post: info,
|
||||
post: {
|
||||
...info,
|
||||
operationId: 'post___' + info.operationId,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue