-
Notifications
You must be signed in to change notification settings - Fork 112
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
Fix OpenAPI bugs related to path parameters #3132
Conversation
Signed-off-by: Long Nguyen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #3132 +/- ##
=========================================
Coverage 88.29% 88.30%
- Complexity 2392 2393 +1
=========================================
Files 485 485
Lines 13567 13567
Branches 1264 1264
=========================================
+ Hits 11979 11980 +1
Misses 1275 1275
+ Partials 313 312 -1
Continue to review full report at Codecov.
|
This looks to be mostly a duplicate of #3108 ? The |
Ah, I didn't notice that! That is a big PR too—we noticed this when trying to update our Circle nodes. Thanks so much! I believe this can be closed then. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't notice that! That is a big PR too—we noticed this when trying to update our Circle nodes. Thanks so much! I believe this can be closed then. :)
Oh, looks like that PR is borked since I last checked after a merge from main. We've closed that one in favor of your PR. Just one change needed. Thanks!
@@ -114,8 +114,7 @@ paths: | |||
description: Returns a list of all ContractResults for a contract's function executions. | |||
operationId: listContractResults | |||
parameters: | |||
- $ref: '#/components/parameters/entityIdPathParam' | |||
- $ref: '#/components/parameters/fromQueryParam' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert removal of fromQueryParam
. This is a valid parameter that had a wrong name
attribute that was fixed in a previous commit. I think that should already address whatever error you were getting if you can confirm.
Signed-off-by: Long Nguyen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Fix OpenAPI bugs related to path parameters Signed-off-by: Long Nguyen <[email protected]>
* Fix OpenAPI bugs related to path parameters Signed-off-by: Long Nguyen <[email protected]> Co-authored-by: Long Nguyen <[email protected]>
Signed-off-by: Long Nguyen [email protected]
Description:
This PR modifies the
openapi.yaml
spec to fix two bugs.Fixes
fromQueryPathParam
is not valid at all and breaks generated Java code. This is for the/api/v1/contracts/{contractId}/results
endpoint, which does not use such a parameter. See https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#contract-results.entityIdPathParam
ref for everything. OpenAPI does not know how to replace the name argument, and there is no way to override specific fields after using a ref either. You end up having wrong code that doesn't even call out with the proper arguments. We need to duplicate the schema, but with different names (since we can't override names). See [Question] Extend/override properties of a parameter OAI/OpenAPI-Specification#2026.Notes for reviewer:
Please be careful with OpenAPI updates in the future.