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:
zyoshoka
2025-02-08 17:29:24 +09:00
committed by GitHub
parent a3cc865e11
commit 54fc232a23
2 changed files with 36 additions and 7 deletions

View File

@@ -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,
},
};
}