From e46bd0c52605e5ae35393e933609358196022bf3 Mon Sep 17 00:00:00 2001 From: Jacob Shufro <116244+jshufro@users.noreply.github.com> Date: Tue, 20 Jun 2023 21:56:31 -0400 Subject: [PATCH] Use HTTP 414 status code for GET maxItems enforcement (#329) Co-authored-by: Paul Harris --- apis/beacon/states/validator_balances.yaml | 9 +++++++++ apis/beacon/states/validators.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/apis/beacon/states/validator_balances.yaml b/apis/beacon/states/validator_balances.yaml index c68b208c..a04089a6 100644 --- a/apis/beacon/states/validator_balances.yaml +++ b/apis/beacon/states/validator_balances.yaml @@ -52,6 +52,15 @@ get: example: code: 400 message: "Invalid state ID: current" + "414": + description: "Too many validator IDs" + content: + application/json: + schema: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" + example: + code: 414 + message: "Too many validator IDs in request" "500": $ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError' diff --git a/apis/beacon/states/validators.yaml b/apis/beacon/states/validators.yaml index de7ba26b..855dd5b0 100644 --- a/apis/beacon/states/validators.yaml +++ b/apis/beacon/states/validators.yaml @@ -72,5 +72,14 @@ get: example: code: 404 message: "State not found" + "414": + description: "Too many validator IDs" + content: + application/json: + schema: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" + example: + code: 414 + message: "Too many validator IDs in request" "500": $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"