chore: update openapi (#488)

This commit is contained in:
Jeffrey Smith II
2023-04-03 16:20:33 -04:00
committed by GitHub
parent 88517ea782
commit 02a094a4b1
2 changed files with 4 additions and 3 deletions

View File

@ -21,6 +21,7 @@ type ErrorCode string
// List of ErrorCode // List of ErrorCode
const ( const (
ERRORCODE_INTERNAL_ERROR ErrorCode = "internal error" ERRORCODE_INTERNAL_ERROR ErrorCode = "internal error"
ERRORCODE_NOT_IMPLEMENTED ErrorCode = "not implemented"
ERRORCODE_NOT_FOUND ErrorCode = "not found" ERRORCODE_NOT_FOUND ErrorCode = "not found"
ERRORCODE_CONFLICT ErrorCode = "conflict" ERRORCODE_CONFLICT ErrorCode = "conflict"
ERRORCODE_INVALID ErrorCode = "invalid" ERRORCODE_INVALID ErrorCode = "invalid"
@ -36,7 +37,7 @@ const (
) )
func ErrorCodeValues() []ErrorCode { func ErrorCodeValues() []ErrorCode {
return []ErrorCode{"internal error", "not found", "conflict", "invalid", "unprocessable entity", "empty value", "unavailable", "forbidden", "too many requests", "unauthorized", "method not allowed", "request too large", "unsupported media type"} return []ErrorCode{"internal error", "not implemented", "not found", "conflict", "invalid", "unprocessable entity", "empty value", "unavailable", "forbidden", "too many requests", "unauthorized", "method not allowed", "request too large", "unsupported media type"}
} }
func (v *ErrorCode) UnmarshalJSON(src []byte) error { func (v *ErrorCode) UnmarshalJSON(src []byte) error {
@ -46,7 +47,7 @@ func (v *ErrorCode) UnmarshalJSON(src []byte) error {
return err return err
} }
enumTypeValue := ErrorCode(value) enumTypeValue := ErrorCode(value)
for _, existing := range []ErrorCode{"internal error", "not found", "conflict", "invalid", "unprocessable entity", "empty value", "unavailable", "forbidden", "too many requests", "unauthorized", "method not allowed", "request too large", "unsupported media type"} { for _, existing := range []ErrorCode{"internal error", "not implemented", "not found", "conflict", "invalid", "unprocessable entity", "empty value", "unavailable", "forbidden", "too many requests", "unauthorized", "method not allowed", "request too large", "unsupported media type"} {
if existing == enumTypeValue { if existing == enumTypeValue {
*v = enumTypeValue *v = enumTypeValue
return nil return nil