Skip to content

Commit

Permalink
Merge pull request #94 from etclabscore/fix/test-and-titles
Browse files Browse the repository at this point in the history
fix: test script wouldnt fail
  • Loading branch information
BelfordZ authored Jan 16, 2020
2 parents 42deecd + 7bd871a commit 64ae238
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 48 deletions.
10 changes: 7 additions & 3 deletions bin/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let openrpcDocument = "";
try {
openrpcDocument = readFileSync(process.cwd() + "/openrpc.json", "utf8");
} catch(e) {
console.error(e)
console.error(e);
fail("Could not find open rpc document");
}

Expand All @@ -19,9 +19,13 @@ try {

const isValid = validateOpenRPCDocument(openrpcDocumentObject);

if (isValid === true) { process.exit(0); }
if (isValid !== true) {
fail(isValid);
}

// Check that each schema has a name set

fail(isValid);
process.exit(0);


function fail(msg) {
Expand Down
5 changes: 5 additions & 0 deletions openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,7 @@
"description": "Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter",
"type": "array",
"items": {
"title": "transactionOrTransactionHash",
"oneOf": [
{
"$ref": "#/components/schemas/Transaction"
Expand Down Expand Up @@ -1677,6 +1678,7 @@
"name": "gasPrice",
"required": true,
"schema": {
"title": "gasPriceResult",
"description": "Integer of the current gas price",
"$ref": "#/components/schemas/Integer"
}
Expand All @@ -1692,6 +1694,7 @@
"name": "transactionResult",
"description": "Returns a transaction or null",
"schema": {
"title": "TransactionOrNull",
"oneOf": [
{
"$ref": "#/components/schemas/Transaction"
Expand Down Expand Up @@ -1779,6 +1782,7 @@
"name": "logs",
"description": "An array of all logs matching filter with given id.",
"schema": {
"title": "setOfLogs",
"type": "array",
"items": {
"$ref": "#/components/schemas/Log"
Expand All @@ -1795,6 +1799,7 @@
"name": "blockNumber",
"required": true,
"schema": {
"title": "blockNumberOrTag",
"oneOf": [
{
"$ref": "#/components/schemas/BlockNumber"
Expand Down
83 changes: 41 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"homepage": "https://github.com/etclabscore/ethereum-json-rpc-specification#readme",
"devDependencies": {
"@open-rpc/generator-client": "^1.14.2",
"@open-rpc/meta-schema": "^1.5.4",
"@open-rpc/schema-utils-js": "^1.11.6"
"@open-rpc/generator-client": "^1.14.4",
"@open-rpc/meta-schema": "^1.6.0",
"@open-rpc/schema-utils-js": "^1.12.0"
}
}

0 comments on commit 64ae238

Please sign in to comment.