mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
refactor: adopt suggestion
This commit is contained in:
parent
b2e00df1b9
commit
239c17f367
3 changed files with 5 additions and 8 deletions
|
@ -228,7 +228,10 @@
|
||||||
"description": "The result of the JWT customizer script testing."
|
"description": "The result of the JWT customizer script testing."
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
"description": "The request body is invalid."
|
"description": "Zod errors in cloud service (data type does not match expectation, can be either request body or response body)."
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Syntax errors in cloud service."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -319,12 +319,6 @@ export default function logtoConfigRoutes<T extends AuthedRouter>(
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
response: jsonObjectGuard,
|
response: jsonObjectGuard,
|
||||||
/**
|
|
||||||
* TODO (LOG-8450): Add this path to openapi.json file, since now the swagger.json can not automatically adapt the path validation for OSS version.
|
|
||||||
*
|
|
||||||
* Code 400 indicates Zod errors in cloud service (data type does not match expectation, can be either request body or response body).
|
|
||||||
* Code 422 indicates syntax errors in cloud service.
|
|
||||||
*/
|
|
||||||
status: [200, 400, 422],
|
status: [200, 400, 422],
|
||||||
}),
|
}),
|
||||||
async (ctx, next) => {
|
async (ctx, next) => {
|
||||||
|
|
|
@ -117,7 +117,7 @@ const validateSupplementPaths = (
|
||||||
(operation.tags.length > 1 || operation.tags[0] !== cloudOnlyTag)
|
(operation.tags.length > 1 || operation.tags[0] !== cloudOnlyTag)
|
||||||
) {
|
) {
|
||||||
throw new TypeError(
|
throw new TypeError(
|
||||||
`Cannot use \`tags\` in supplement document on path \`${path}\` and operation \`${method}\` except for \`${cloudOnlyTag}\`. Define tags in the document root instead.`
|
`Cannot use \`tags\` in supplement document on path \`${path}\` and operation \`${method}\` except for tag \`${cloudOnlyTag}\`. Define tags in the document root instead.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue