From c56d75967354418978a863e63645fd1e86c46364 Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:46:32 +0100 Subject: [PATCH] Add peers v2 without meta --- apis/node/peers.v2.yaml | 39 +++++++++++++++++++++++++++++++++++++++ beacon-node-oapi.yaml | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 apis/node/peers.v2.yaml diff --git a/apis/node/peers.v2.yaml b/apis/node/peers.v2.yaml new file mode 100644 index 00000000..1b68acc8 --- /dev/null +++ b/apis/node/peers.v2.yaml @@ -0,0 +1,39 @@ +get: + operationId: getPeersV2 + tags: + - Node + summary: "Get node network peers" + description: "Retrieves data about the node's network peers. By default this returns all peers. Multiple query params are combined using AND conditions" + parameters: + - name: state + in: query + required: false + schema: + type: array + uniqueItems: true + items: + $ref: "../../beacon-node-oapi.yaml#/components/schemas/PeerConnectionState" + - name: direction + in: query + required: false + schema: + type: array + uniqueItems: true + items: + $ref: "../../beacon-node-oapi.yaml#/components/schemas/PeerConnectionDirection" + responses: + "200": + description: Request successful + content: + application/json: + schema: + title: GetPeersV2Response + type: object + properties: + data: + type: array + items: + $ref: "../../beacon-node-oapi.yaml#/components/schemas/Peer" + + "500": + $ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError" diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 4b6477cb..70b4bd2f 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -148,6 +148,8 @@ paths: $ref: "./apis/node/identity.yaml" /eth/v1/node/peers: $ref: "./apis/node/peers.yaml" + /eth/v2/node/peers: + $ref: "./apis/node/peers.v2.yaml" /eth/v1/node/peers/{peer_id}: $ref: "./apis/node/peer.yaml" /eth/v1/node/peer_count: