-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Change Open API validation middleware to specify and use path pa…
…rameters (#8913) ## About the changes Moved Open API validation handler to the controller layer to reuse on all services such as project and segments, and also removed unnecessary middleware at the top level, `app.ts`, and method, `useErrorHandler` in `openapi-service.ts`. ### Important files #### Before <img width="1510" alt="1 Before" src="https://github.com/user-attachments/assets/96ac245d-92ac-469e-a097-c6c0b78d0def"> Express cant' parse the path parameter because it doesn't be specified on the `use` method. Therefore, it returns `undefined` as an error message. #### After <img width="1510" alt="2 After" src="https://github.com/user-attachments/assets/501dae6c-fef5-4e77-94c3-128a9f7210da"> Express can parse the path parameter because I change to specify it on the controller layer. Accordingly, it returns `test`.
- Loading branch information
1 parent
682f7e0
commit df9292f
Showing
3 changed files
with
13 additions
and
20 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 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