Update gen-spec.ts
This commit is contained in:
parent
2e24e2e5ae
commit
8e2cf2853c
|
@ -92,7 +92,6 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
|
|||
const hasBody = (schema.type === 'object' && schema.properties && Object.keys(schema.properties).length >= 1);
|
||||
|
||||
const info = {
|
||||
operationId: endpoint.name.replaceAll('/', '___'), // NOTE: スラッシュは使えない
|
||||
summary: endpoint.name,
|
||||
description: desc,
|
||||
externalDocs: {
|
||||
|
@ -210,9 +209,15 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
|
|||
|
||||
spec.paths['/' + endpoint.name] = {
|
||||
...(endpoint.meta.allowGet ? {
|
||||
get: info,
|
||||
get: {
|
||||
...info,
|
||||
operationId: 'get_____' + endpoint.name.replaceAll('/', '___'), // NOTE: スラッシュは使えない
|
||||
},
|
||||
} : {}),
|
||||
post: info,
|
||||
post: {
|
||||
...info,
|
||||
operationId: 'post_____' + endpoint.name.replaceAll('/', '___'), // NOTE: スラッシュは使えない
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue