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 hyperledger-cacti#2751, which uses unchecked casts to the linter warnings go away. With the fix of hyperledger-cacti#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 hyperledger-cacti#2751 Depends on hyperledger-cacti#2754 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information