-
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove
idNumberMiddleware
and change to use parameters
in `v…
…alidPath` method instead (#8734) ## About the changes - Remove `idNumberMiddleware` method and change to use `parameters` field in `openApiService.validPath` method for the flexibility. - Remove unnecessary `Number` type converting method and change them to use `<{id: number}>` to specify the type. ### Reference The changed response looks like the one below. ```JSON { "id":"8174a692-7427-4d35-b7b9-6543b9d3db6e", "name":"BadDataError", "message":"Request validation failed: your request body or params contain invalid data. Refer to the `details` list for more information.", "details":[ { "message":"The `/params/id` property must be integer. You sent undefined.", "path":"/params/id" } ] } ``` I think it might be better to customize the error response, especially `"You sent undefined."`, on another pull request if this one is accepted. I prefer to separate jobs to divide the context and believe that it helps reviewer easier to understand.
- Loading branch information
1 parent
18591dd
commit 6958731
Showing
6 changed files
with
123 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.