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:
@@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user