Skip to content

Commit

Permalink
build(openapi): license presence check
Browse files Browse the repository at this point in the history
1. Adds a custom check that ensures that all the properties of the
license object are specified (name, identifier, url).
2. Optimized the custom-check that verifies the opan API json specs so
that it ignores **/node_modules/ not just node_modules (meaning that it
was only excluding the root dir not all sub-dirs of the packages as well)

Fixes #490

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Aug 1, 2023
1 parent dc85c27 commit 7780170
Show file tree
Hide file tree
Showing 27 changed files with 10,736 additions and 11,359 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

594 changes: 296 additions & 298 deletions extensions/cactus-plugin-htlc-coordinator-besu/src/main/json/openapi.json

Large diffs are not rendered by default.

180 changes: 89 additions & 91 deletions extensions/cactus-plugin-object-store-ipfs/src/main/json/openapi.json
Original file line number Diff line number Diff line change
@@ -1,105 +1,103 @@
{
"openapi": "3.0.3",
"info": {
"title": "Hyperledger Cactus Plugin - Object Store - IPFS ",
"description": "Contains/describes the Hyperledger Cactus Object Store IPFS plugin.",
"version": "0.2.0",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
"openapi": "3.1.0",
"info": {
"title": "Hyperledger Cactus Plugin - Object Store - IPFS ",
"description": "Contains/describes the Hyperledger Cactus Object Store IPFS plugin.",
"version": "0.2.0",
"license": {
"name": "Apache-2.0",
"identifier": "Apache-2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "https://www.cactus.stream/{basePath}",
"description": "Public test instance",
"variables": {
"basePath": {
"default": ""
}
}
},
"servers": [
{
"url": "https://www.cactus.stream/{basePath}",
"description": "Public test instance",
"variables": {
"basePath": {
"default": ""
}
}
{
"url": "http://localhost:4000/{basePath}",
"description": "Local test instance",
"variables": {
"basePath": {
"default": ""
}
}
}
],
"components": {
"schemas": {},
"requestBodies": {},
"responses": {}
},
"paths": {
"/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object": {
"post": {
"x-hyperledger-cactus": {
"http": {
"verbLowerCase": "post",
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object"
}
},
"operationId": "getObjectV1",
"summary": "Retrieves an object from the object store.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_get_object_v1_request_body"
},
{
"url": "http://localhost:4000/{basePath}",
"description": "Local test instance",
"variables": {
"basePath": {
"default": ""
}
}
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_get_object_v1_response_body"
}
}
],
"components": {
"schemas": {
}
},
"/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object": {
"post": {
"x-hyperledger-cactus": {
"http": {
"verbLowerCase": "post",
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object"
}
},
"requestBodies": {
"operationId": "setObjectV1",
"summary": "Sets an object in the object store under the specified key.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_set_object_v1_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_set_object_v1_response_body"
}
}
}
},
"paths": {
"/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object": {
"post": {
"x-hyperledger-cactus": {
"http": {
"verbLowerCase": "post",
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/get-object"
}
},
"operationId": "getObjectV1",
"summary": "Retrieves an object from the object store.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_get_object_v1_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_get_object_v1_response_body"
}
}
}
"/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object": {
"post": {
"x-hyperledger-cactus": {
"http": {
"verbLowerCase": "post",
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object"
}
},
"/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object": {
"post": {
"x-hyperledger-cactus": {
"http": {
"verbLowerCase": "post",
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/set-object"
}
},
"operationId": "setObjectV1",
"summary": "Sets an object in the object store under the specified key.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_set_object_v1_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_set_object_v1_response_body"
}
}
}
"operationId": "hasObjectV1",
"summary": "Checks the presence of an object in the object store.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_has_object_v1_request_body"
},
"/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object": {
"post": {
"x-hyperledger-cactus": {
"http": {
"verbLowerCase": "post",
"path": "/api/v1/plugins/@hyperledger/cactus-plugin-object-store-ipfs/has-object"
}
},
"operationId": "hasObjectV1",
"summary": "Checks the presence of an object in the object store.",
"parameters": [],
"requestBody": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/requestBodies/object_store_has_object_v1_request_body"
},
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_has_object_v1_response_body"
}
}
}
"responses": {
"200": {
"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/4bf8038ea4c0c341cef3a63b59f77c12cec65a46/packages/cactus-core-api/src/main/json/openapi.json#/components/responses/object_store_has_object_v1_response_body"
}
}
}
}
}
}
}
Loading

0 comments on commit 7780170

Please sign in to comment.