fix(swagger): synchronize enum with defined error constants
parent
20637adf10
commit
290d06f98f
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
// Some error code constant, ideally we want define common platform codes here
|
// 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.
|
// 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 (
|
const (
|
||||||
EInternal = "internal error"
|
EInternal = "internal error"
|
||||||
ENotFound = "not found"
|
ENotFound = "not found"
|
||||||
|
|
|
@ -5877,13 +5877,18 @@ components:
|
||||||
description: code is the machine-readable error code.
|
description: code is the machine-readable error code.
|
||||||
readOnly: true
|
readOnly: true
|
||||||
type: string
|
type: string
|
||||||
|
# This set of enumerations must remain in sync with the constants defined in errors.go
|
||||||
enum:
|
enum:
|
||||||
- internal error
|
- internal error
|
||||||
- not found
|
- not found
|
||||||
- conflict
|
- conflict
|
||||||
- invalid
|
- invalid
|
||||||
|
- unprocessable entity
|
||||||
- empty value
|
- empty value
|
||||||
- unavailable
|
- unavailable
|
||||||
|
- forbidden
|
||||||
|
- unauthorized
|
||||||
|
- method not allowed
|
||||||
message:
|
message:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
description: message is a human-readable message.
|
description: message is a human-readable message.
|
||||||
|
|
Loading…
Reference in New Issue