0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

refactor: adopt suggestion

This commit is contained in:
Darcy Ye 2024-03-21 11:13:06 +08:00
parent b2e00df1b9
commit 239c17f367
No known key found for this signature in database
GPG key ID: B46F4C07EDEFC610
3 changed files with 5 additions and 8 deletions

View file

@ -228,7 +228,10 @@
"description": "The result of the JWT customizer script testing."
},
"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."
}
}
}

View file

@ -319,12 +319,6 @@ export default function logtoConfigRoutes<T extends AuthedRouter>(
}),
]),
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],
}),
async (ctx, next) => {

View file

@ -117,7 +117,7 @@ const validateSupplementPaths = (
(operation.tags.length > 1 || operation.tags[0] !== cloudOnlyTag)
) {
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.`
);
}
}