Ensure unique operationId
This commit is contained in:
parent
b1ba863a0b
commit
37998e8bc3
1 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ export function genOpenapiSpec() {
|
|||
}
|
||||
|
||||
const info = {
|
||||
operationId: endpoint.name,
|
||||
operationId: `POST-${endpoint.name}`,
|
||||
summary: endpoint.name,
|
||||
description: desc,
|
||||
externalDocs: {
|
||||
|
@ -208,11 +208,11 @@ export function genOpenapiSpec() {
|
|||
},
|
||||
};
|
||||
|
||||
const path = {
|
||||
const path: Record<string, typeof info> = {
|
||||
post: info,
|
||||
};
|
||||
if (endpoint.meta.allowGet) {
|
||||
path.get = { ...info };
|
||||
path.get = { ...info, operationId: `GET-${endpoint.name}` };
|
||||
// API Key authentication is not permitted for GET requests
|
||||
path.get.security = path.get.security.filter(
|
||||
(elem) => !Object.prototype.hasOwnProperty.call(elem, "ApiKeyAuth"),
|
||||
|
|
Loading…
Reference in a new issue