Skip to content

Commit

Permalink
chore(sdk): generate go extend sdk (2024-05-20T19:58:08+00:00)
Browse files Browse the repository at this point in the history
generated from openapi spec commit: 592dc4d7538833485d032b8c6973a11d2837710d
add migration guide
updated getting started go sum
  • Loading branch information
Ubuntu authored and elmernocon committed May 21, 2024
1 parent 1835386 commit 0cacd30
Show file tree
Hide file tree
Showing 237 changed files with 27,303 additions and 9,608 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<a name="v0.70.0"></a>
## [v0.70.0]
### test
- **integration:** temporarily disable session browser
- **integration:** chat - update test
### docs
- **common-use-case:** update


<a name="v0.69.0"></a>
## [v0.69.0]
### test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ func (o *AdminCreateChallengeReader) ReadResponse(response runtime.ClientRespons
return nil, err
}
return result, nil
case 400:
result := NewAdminCreateChallengeBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewAdminCreateChallengeUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
Expand Down Expand Up @@ -127,6 +133,59 @@ func (o *AdminCreateChallengeCreated) readResponse(response runtime.ClientRespon
return nil
}

// NewAdminCreateChallengeBadRequest creates a AdminCreateChallengeBadRequest with default headers values
func NewAdminCreateChallengeBadRequest() *AdminCreateChallengeBadRequest {
return &AdminCreateChallengeBadRequest{}
}

/*AdminCreateChallengeBadRequest handles this case with default header values.
<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20018</td><td>bad request: {{message}}</td></tr></table>
*/
type AdminCreateChallengeBadRequest struct {
Payload *challengeclientmodels.ResponseError
}

func (o *AdminCreateChallengeBadRequest) Error() string {
return fmt.Sprintf("[POST /challenge/v1/admin/namespaces/{namespace}/challenges][%d] adminCreateChallengeBadRequest %+v", 400, o.ToJSONString())
}

func (o *AdminCreateChallengeBadRequest) ToJSONString() string {
if o.Payload == nil {
return "{}"
}

b, err := json.Marshal(o.Payload)
if err != nil {
fmt.Println(err)

return fmt.Sprintf("Failed to marshal the payload: %+v", o.Payload)
}

return fmt.Sprintf("%+v", string(b))
}

func (o *AdminCreateChallengeBadRequest) GetPayload() *challengeclientmodels.ResponseError {
return o.Payload
}

func (o *AdminCreateChallengeBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// handle file responses
contentDisposition := response.GetHeader("Content-Disposition")
if strings.Contains(strings.ToLower(contentDisposition), "filename=") {
consumer = runtime.ByteStreamConsumer()
}

o.Payload = new(challengeclientmodels.ResponseError)

// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}

return nil
}

// NewAdminCreateChallengeUnauthorized creates a AdminCreateChallengeUnauthorized with default headers values
func NewAdminCreateChallengeUnauthorized() *AdminCreateChallengeUnauthorized {
return &AdminCreateChallengeUnauthorized{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ func (o *AdminUpdateChallengeReader) ReadResponse(response runtime.ClientRespons
return nil, err
}
return result, nil
case 400:
result := NewAdminUpdateChallengeBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewAdminUpdateChallengeUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
Expand Down Expand Up @@ -127,6 +133,59 @@ func (o *AdminUpdateChallengeOK) readResponse(response runtime.ClientResponse, c
return nil
}

// NewAdminUpdateChallengeBadRequest creates a AdminUpdateChallengeBadRequest with default headers values
func NewAdminUpdateChallengeBadRequest() *AdminUpdateChallengeBadRequest {
return &AdminUpdateChallengeBadRequest{}
}

/*AdminUpdateChallengeBadRequest handles this case with default header values.
<table><tr><td>errorCode</td><td>errorMessage</td></tr><tr><td>20018</td><td>bad request: {{message}}</td></tr></table>
*/
type AdminUpdateChallengeBadRequest struct {
Payload *challengeclientmodels.ResponseError
}

func (o *AdminUpdateChallengeBadRequest) Error() string {
return fmt.Sprintf("[PUT /challenge/v1/admin/namespaces/{namespace}/challenges/{challengeCode}][%d] adminUpdateChallengeBadRequest %+v", 400, o.ToJSONString())
}

func (o *AdminUpdateChallengeBadRequest) ToJSONString() string {
if o.Payload == nil {
return "{}"
}

b, err := json.Marshal(o.Payload)
if err != nil {
fmt.Println(err)

return fmt.Sprintf("Failed to marshal the payload: %+v", o.Payload)
}

return fmt.Sprintf("%+v", string(b))
}

func (o *AdminUpdateChallengeBadRequest) GetPayload() *challengeclientmodels.ResponseError {
return o.Payload
}

func (o *AdminUpdateChallengeBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// handle file responses
contentDisposition := response.GetHeader("Content-Disposition")
if strings.Contains(strings.ToLower(contentDisposition), "filename=") {
consumer = runtime.ByteStreamConsumer()
}

o.Payload = new(challengeclientmodels.ResponseError)

// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}

return nil
}

// NewAdminUpdateChallengeUnauthorized creates a AdminUpdateChallengeUnauthorized with default headers values
func NewAdminUpdateChallengeUnauthorized() *AdminUpdateChallengeUnauthorized {
return &AdminUpdateChallengeUnauthorized{}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0cacd30

Please sign in to comment.