fix(swagger): synchronize enum with defined error constants

pull/12304/head
Mark Rushakoff 2019-03-01 10:43:22 -08:00 committed by Mark Rushakoff
parent 20637adf10
commit 290d06f98f
2 changed files with 6 additions and 0 deletions

View File

@ -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"

View File

@ -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.