-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cmd-api-server): add runtime type validation to HTTP verbs pulled…
… from OAS This addresses the shortcomings of the linter fix provided in #2751, which uses unchecked casts to the linter warnings go away. With the fix of #2751, at runtime, the possibility of a crash is still there exactly as before, but it has silenced the linter about calling that possibility out. We now use a type guard to check the type of the object before casting it and therefore ensure that at runtime the cast will not produce a crash. [skip ci] Depends on #2751 Depends on #2754 Signed-off-by: Peter Somogyvari <[email protected]>
- Loading branch information
Showing
1 changed file
with
16 additions
and
8 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