From 0407cd52589dfc7bc8667a70e42c50bc67ea0c76 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Wed, 28 Apr 2021 11:08:42 -0400 Subject: [PATCH] github: fix linter configuration errors and occluded errors (#6400) --- .github/workflows/linter.yml | 2 +- rpc/openapi/openapi.yaml | 37 ++++++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index cc1a269e2..9b705ff32 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -28,5 +28,5 @@ jobs: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_MD: true - VALIDATE_OPAENAPI: true + VALIDATE_OPENAPI: true VALIDATE_YAML: true diff --git a/rpc/openapi/openapi.yaml b/rpc/openapi/openapi.yaml index 008357fef..32e516b22 100644 --- a/rpc/openapi/openapi.yaml +++ b/rpc/openapi/openapi.yaml @@ -537,8 +537,7 @@ paths: type: array items: type: string - example: - ["f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656"] + example: "f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656" responses: "200": description: Dialing seeds in progress. See /net_info for details @@ -588,8 +587,7 @@ paths: type: array items: type: string - example: - ["f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656"] + example: "f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656" responses: "200": description: Dialing seeds in progress. See /net_info for details @@ -724,7 +722,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BlockResultsResponse" + $ref: "#/components/schemas/BlockSearchResponse" "500": description: Error content: @@ -1069,7 +1067,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/BlockSearchResponse" + $ref: "#/components/schemas/BlockResultsResponse" "500": description: Error content: @@ -2747,6 +2745,33 @@ components: type: string example: "Dialing seeds in progress. See /net_info for details" + BlockSearchResponse: + type: object + required: + - "jsonrpc" + - "id" + - "result" + properties: + jsonrpc: + type: string + example: "2.0" + id: + type: integer + example: 0 + result: + required: + - "blocks" + - "total_count" + properties: + blocks: + type: array + items: + $ref: "#/components/schemas/BlockComplete" + total_count: + type: integer + example: 2 + type: object + ###### Reuseable types ###### # Validator type with proposer prioirty