Skip to content
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(connector-ethereum): add missing openapi.json paths vendor extensions #2872

Closed
petermetz opened this issue Nov 10, 2023 · 0 comments · Fixed by #2873
Closed

fix(connector-ethereum): add missing openapi.json paths vendor extensions #2872

petermetz opened this issue Nov 10, 2023 · 0 comments · Fixed by #2873
Assignees
Labels
API_Server bug Something isn't working P2 Priority 2: High
Milestone

Comments

@petermetz
Copy link
Contributor

Description

yarn custom-checks returns with the following errors on the main branch as of 2023-11-10:

ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json is missing "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract"."post"."x-hyperledger-cactus" from the path definition of /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/deploy-contract. Please add it. If you do not know how to, search for existing examples in other openapi.json files within the project for the string "x-hyperledger-cactus"
ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json is missing "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction"."post"."x-hyperledger-cactus" from the path definition of /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/run-transaction. Please add it. If you do not know how to, search for existing examples in other openapi.json files within the project for the string "x-hyperledger-cactus"
ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json is missing "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract"."post"."x-hyperledger-cactus" from the path definition of /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-contract. Please add it. If you do not know how to, search for existing examples in other openapi.json files within the project for the string "x-hyperledger-cactus"
ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json is missing "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics"."get"."x-hyperledger-cactus" from the path definition of /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/get-prometheus-exporter-metrics. Please add it. If you do not know how to, search for existing examples in other openapi.json files within the project for the string "x-hyperledger-cactus"
ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json is missing "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method"."post"."x-hyperledger-cactus" from the path definition of /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-method. Please add it. If you do not know how to, search for existing examples in other openapi.json files within the project for the string "x-hyperledger-cactus"
ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json is missing "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract"."post"."x-hyperledger-cactus" from the path definition of /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/invoke-raw-web3eth-contract. Please add it. If you do not know how to, search for existing examples in other openapi.json files within the project for the string "x-hyperledger-cactus"
ERROR: packages/cactus-plugin-ledger-connector-ethereum/src/main/json/openapi.json "paths"."/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-ethereum/json-rpc"."summary" must be an object
ERROR: examples/cactus-example-cbdc-bridging-frontend/package.json the package itself incorrectly has version 0.1.0. Expected 2.0.0-alpha.2
ERROR: Packages packages/cactus-plugin-ledger-connector-ethereum/package.json is not sorted
ERROR: Packages packages/cactus-plugin-ledger-connector-sawtooth/package.json is not sorted
ERROR: Packages examples/cactus-example-cbdc-bridging-frontend/package.json is not sorted

Acceptance Criteria

  1. yarn custom-checks passes without errors
@petermetz petermetz added bug Something isn't working API_Server P2 Priority 2: High labels Nov 10, 2023
@petermetz petermetz added this to the v2.0.0 milestone Nov 10, 2023
@petermetz petermetz self-assigned this Nov 10, 2023
petermetz added a commit to petermetz/cacti that referenced this issue Nov 10, 2023
1. Did a complete find & replace of the old vendor extensions and the
new ones. In theory this is a change that the compiler guarantees for us
to verify completely, but even with that said, I'll leave the CI on so
that we can double check to be sure.
This is also a BREAKING CHANGE because if someone had installed the older
packages and they imported endpoint definitions from the OAS spec based
on the vendor extensions then their could would stop compiling. Therefore
this change must be done before we issue the 2.0.0 release.
2. Also added a bug-fix to tools/custom-checks/check-open-api-json-specs.ts
because it wasn't just validating HTTP verbs within "paths" but also
any property that was in there such as "summary" or "description" but
of course those are string properties so they won't pass the validation
we impose on HTTP verb definitions for the endpoints.

Fixes hyperledger-cacti#2872

Signed-off-by: Peter Somogyvari <[email protected]>
petermetz added a commit to petermetz/cacti that referenced this issue Nov 15, 2023
1. Did a complete find & replace of the old vendor extensions and the
new ones. In theory this is a change that the compiler guarantees for us
to verify completely, but even with that said, I'll leave the CI on so
that we can double check to be sure.
This is also a BREAKING CHANGE because if someone had installed the older
packages and they imported endpoint definitions from the OAS spec based
on the vendor extensions then their could would stop compiling. Therefore
this change must be done before we issue the 2.0.0 release.
2. Also added a bug-fix to tools/custom-checks/check-open-api-json-specs.ts
because it wasn't just validating HTTP verbs within "paths" but also
any property that was in there such as "summary" or "description" but
of course those are string properties so they won't pass the validation
we impose on HTTP verb definitions for the endpoints.

Fixes hyperledger-cacti#2872

Signed-off-by: Peter Somogyvari <[email protected]>
petermetz added a commit that referenced this issue Nov 15, 2023
1. Did a complete find & replace of the old vendor extensions and the
new ones. In theory this is a change that the compiler guarantees for us
to verify completely, but even with that said, I'll leave the CI on so
that we can double check to be sure.
This is also a BREAKING CHANGE because if someone had installed the older
packages and they imported endpoint definitions from the OAS spec based
on the vendor extensions then their could would stop compiling. Therefore
this change must be done before we issue the 2.0.0 release.
2. Also added a bug-fix to tools/custom-checks/check-open-api-json-specs.ts
because it wasn't just validating HTTP verbs within "paths" but also
any property that was in there such as "summary" or "description" but
of course those are string properties so they won't pass the validation
we impose on HTTP verb definitions for the endpoints.

Fixes #2872

Signed-off-by: Peter Somogyvari <[email protected]>
sandeepnRES pushed a commit to sandeepnRES/cacti that referenced this issue Dec 21, 2023
1. Did a complete find & replace of the old vendor extensions and the
new ones. In theory this is a change that the compiler guarantees for us
to verify completely, but even with that said, I'll leave the CI on so
that we can double check to be sure.
This is also a BREAKING CHANGE because if someone had installed the older
packages and they imported endpoint definitions from the OAS spec based
on the vendor extensions then their could would stop compiling. Therefore
this change must be done before we issue the 2.0.0 release.
2. Also added a bug-fix to tools/custom-checks/check-open-api-json-specs.ts
because it wasn't just validating HTTP verbs within "paths" but also
any property that was in there such as "summary" or "description" but
of course those are string properties so they won't pass the validation
we impose on HTTP verb definitions for the endpoints.

Fixes hyperledger-cacti#2872

Signed-off-by: Peter Somogyvari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API_Server bug Something isn't working P2 Priority 2: High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant