-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(common): add express http verb method name string literal type #2754
Merged
petermetz
merged 1 commit into
hyperledger-cacti:main
from
petermetz:feat-common-express-http-verb-method-name
Oct 16, 2023
Merged
feat(common): add express http verb method name string literal type #2754
petermetz
merged 1 commit into
hyperledger-cacti:main
from
petermetz:feat-common-express-http-verb-method-name
Oct 16, 2023
Conversation
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
petermetz
requested review from
takeutak,
izuru0,
jagpreetsinghsasan,
VRamakrishna and
sandeepnRES
as code owners
October 9, 2023 17:28
petermetz
force-pushed
the
feat-common-express-http-verb-method-name
branch
from
October 9, 2023 17:28
2b2457d
to
8380945
Compare
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
Oct 9, 2023
…ervices() 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>
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
Oct 9, 2023
… 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>
jagpreetsinghsasan
approved these changes
Oct 12, 2023
izuru0
approved these changes
Oct 16, 2023
1. Also ships with a user-defined typescript type-guard so that we can ensure at runtime that the string literal value is indeed one of the valid ExpressJS HTTP verb method names. 2. The primary use-case for this is checking at runtime the HTTP verb name of OpenAPI specifications that are being loaded into the API. [skip ci] Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
force-pushed
the
feat-common-express-http-verb-method-name
branch
from
October 16, 2023 17:54
8380945
to
e5f62f1
Compare
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
Oct 17, 2023
… 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>
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
Oct 18, 2023
… 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>
petermetz
added a commit
that referenced
this pull request
Oct 18, 2023
… 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 <peter.somogyvari@accenture.com>
sandeepnRES
pushed a commit
to sandeepnRES/cacti
that referenced
this pull request
Dec 21, 2023
… 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>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ensure at runtime that the string literal value is indeed one of the
valid ExpressJS HTTP verb method names.
name of OpenAPI specifications that are being loaded into the API.
Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com
Pull Request Requirements
[x] Rebased onto
upstream/main
branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.[x] Have git sign off at the end of commit message to avoid being marked red. You can add
-s
flag when usinggit commit
command. You may refer to this link for more information.[x] Follow the Commit Linting specification. You may refer to this link for more information.
Character Limit
[x] Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
[x] Commit Message per line must not exceed 80 characters (including spaces and special characters).
A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.