Skip to content

Commit

Permalink
fix: remove unneeded allOf usages
Browse files Browse the repository at this point in the history
  • Loading branch information
jeluard committed Jan 15, 2024
1 parent d4f5ecf commit 3858d81
Show file tree
Hide file tree
Showing 62 changed files with 465 additions and 607 deletions.
12 changes: 6 additions & 6 deletions apis/beacon/blob_sidecars/blob_sidecars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
12 changes: 6 additions & 6 deletions apis/beacon/blocks/attestations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
18 changes: 8 additions & 10 deletions apis/beacon/blocks/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,18 @@ get:
content:
application/json:
schema:
allOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
- example:
code: 400
message: "Invalid block ID: current"
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
allOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
- example:
code: 404
message: "Block not found"
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
6 changes: 3 additions & 3 deletions apis/beacon/blocks/blinded_blocks.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ post:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block: missing signature"
example:
code: 400
message: "Invalid block: missing signature"
"415":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType'
"500":
Expand Down
6 changes: 3 additions & 3 deletions apis/beacon/blocks/blinded_blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ post:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block: missing signature"
example:
code: 400
message: "Invalid block: missing signature"
"415":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType'
"500":
Expand Down
12 changes: 6 additions & 6 deletions apis/beacon/blocks/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
12 changes: 6 additions & 6 deletions apis/beacon/blocks/block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"

9 changes: 4 additions & 5 deletions apis/beacon/blocks/blocks.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ post:
content:
application/json:
schema:
allOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
- example:
code: 400
message: "Invalid block: missing signature"
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block: missing signature"
"415":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType'
"500":
Expand Down
9 changes: 4 additions & 5 deletions apis/beacon/blocks/blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ post:
content:
application/json:
schema:
allOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
- example:
code: 400
message: "Invalid block: missing signature"
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block: missing signature"
"415":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType'
"500":
Expand Down
12 changes: 6 additions & 6 deletions apis/beacon/blocks/header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
14 changes: 5 additions & 9 deletions apis/beacon/blocks/headers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ get:
in: query
required: false
schema:
allOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64"
- example: ""
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64"
- name: parent_root
in: query
required: false
schema:
allOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Root"
- example: ""
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Root"

responses:
"200":
Expand Down Expand Up @@ -52,8 +48,8 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
17 changes: 8 additions & 9 deletions apis/beacon/blocks/root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,25 @@ get:
required: [root]
properties:
root:
allOf:
- description: HashTreeRoot of BeaconBlock/BeaconBlockHeader object
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Root'
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Root'
description: HashTreeRoot of BeaconBlock/BeaconBlockHeader object
"400":
description: "The block ID supplied could not be parsed"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block ID: current"
example:
code: 400
message: "Invalid block ID: current"
"404":
description: "Block not found"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Block not found"
example:
code: 404
message: "Block not found"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
9 changes: 4 additions & 5 deletions apis/beacon/deposit_snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
content:
application/json:
schema:
allOf:
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
- example:
code: 404
message: "No Finalized Snapshot Available"
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "No Finalized Snapshot Available"
"500":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'
6 changes: 3 additions & 3 deletions apis/beacon/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
application/json:
schema:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "Chain genesis info is not yet known"
example:
code: 404
message: "Chain genesis info is not yet known"
"500":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'
18 changes: 9 additions & 9 deletions apis/beacon/light_client/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 400
message: "Invalid block root value"
example:
code: 400
message: "Invalid block root value"
"404":
description: "`LightClientBootstrap` instance cannot be produced for the given block root"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "LC bootstrap unavailable"
example:
code: 404
message: "LC bootstrap unavailable"
"406":
description: Unacceptable media type
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 406
message: "Accepted media type not supported"
example:
code: 406
message: "Accepted media type not supported"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
12 changes: 6 additions & 6 deletions apis/beacon/light_client/finality_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "LC finality update unavailable"
example:
code: 404
message: "LC finality update unavailable"
"406":
description: Unacceptable media type
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 406
message: "Accepted media type not supported"
example:
code: 406
message: "Accepted media type not supported"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
12 changes: 6 additions & 6 deletions apis/beacon/light_client/optimistic_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 404
message: "LC optimistic update unavailable"
example:
code: 404
message: "LC optimistic update unavailable"
"406":
description: Unacceptable media type
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 406
message: "Accepted media type not supported"
example:
code: 406
message: "Accepted media type not supported"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
6 changes: 3 additions & 3 deletions apis/beacon/light_client/updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ get:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
example:
code: 406
message: "Accepted media type not supported"
example:
code: 406
message: "Accepted media type not supported"
"500":
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"
Loading

0 comments on commit 3858d81

Please sign in to comment.