diff --git a/errors.go b/errors.go index 4ac86b5b31..ad17e0fe8f 100644 --- a/errors.go +++ b/errors.go @@ -9,6 +9,7 @@ import ( // Some error code constant, ideally we want define common platform codes here // projects on use platform's error, should have their own central place like this. +// Any time this set of constants changes, you must also update the swagger for Error.properties.code.enum. const ( EInternal = "internal error" ENotFound = "not found" diff --git a/http/swagger.yml b/http/swagger.yml index 0059f1b8b9..1e57472a62 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -5877,13 +5877,18 @@ components: description: code is the machine-readable error code. readOnly: true type: string + # This set of enumerations must remain in sync with the constants defined in errors.go enum: - internal error - not found - conflict - invalid + - unprocessable entity - empty value - unavailable + - forbidden + - unauthorized + - method not allowed message: readOnly: true description: message is a human-readable message.