You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.get('/:id',(c)=>getEventDeploy(c.params.id,c.headers),{params: getDeployParamsSchema,detail: {summary: 'Returns the progress entries for the event with the given id.'},type: 'application/json'})
The Swagger generator generates an invalid entry for this request by default and the validation errors are as follows:
"get": {
"parameters": [
{
"pattern": "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$",
"default": "",
"description": "The event id to get logs for",
"type": "string",
"in": "path",
"name": "id",
"required": true
}
],
"operationId": "getById",
"summary": "Returns the progress entries for the event with the given id.",
"responses": { "200": {} }
}
In order to get a properly validated parameters object, I have to specify the following manually in parameters:
.get('/:id',(c)=>getEventDeploy(c.params.id,c.headers),{params: getDeployParamsSchema,detail: {summary: 'Returns the progress entries for the event with the given id.',parameters: [{schema: getDeployParamsSchema.properties.id,name: 'id',in: 'path',required: true}]},type: 'application/json'})
This generates the following schema, which does not error out at param validation:
Should this (generating the schema object for each param) not be the default behavior? Thanks!
The text was updated successfully, but these errors were encountered:
Hi! I have the following Elysia request:
The Swagger generator generates an invalid entry for this request by default and the validation errors are as follows:
In order to get a properly validated parameters object, I have to specify the following manually in parameters:
This generates the following schema, which does not error out at param validation:
![image](https://private-user-images.githubusercontent.com/30200815/271495644-02511470-c6d0-40be-9ed5-220226003d10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5NDY4NTIsIm5iZiI6MTcxODk0NjU1MiwicGF0aCI6Ii8zMDIwMDgxNS8yNzE0OTU2NDQtMDI1MTE0NzAtYzZkMC00MGJlLTllZDUtMjIwMjI2MDAzZDEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDA1MDkxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiM2UzODk3NGUwMDgzYTY1YTMyN2FjOGNmYmQ3YzIyZGY2MDZlNDkxOTZjMTVlN2Y4N2IzYTcyNTEwZjg4NGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.s1qKUUYAy_eZSJ7Az-G6BJzdrdzBVePNFYimUzpcJA4)
Should this (generating the
schema
object for each param) not be the default behavior? Thanks!The text was updated successfully, but these errors were encountered: