diff --git a/sherlock-go-client/client/chart_versions/chart_versions_client.go b/sherlock-go-client/client/chart_versions/chart_versions_client.go index 0bbcd4f3a..f8c0b46b7 100644 --- a/sherlock-go-client/client/chart_versions/chart_versions_client.go +++ b/sherlock-go-client/client/chart_versions/chart_versions_client.go @@ -30,6 +30,12 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + GetAPIChartVersionsProceduresV3Changelog(params *GetAPIChartVersionsProceduresV3ChangelogParams, opts ...ClientOption) (*GetAPIChartVersionsProceduresV3ChangelogOK, error) + + GetAPIChartVersionsV3(params *GetAPIChartVersionsV3Params, opts ...ClientOption) (*GetAPIChartVersionsV3OK, error) + + GetAPIChartVersionsV3Selector(params *GetAPIChartVersionsV3SelectorParams, opts ...ClientOption) (*GetAPIChartVersionsV3SelectorOK, error) + GetAPIV2ChartVersions(params *GetAPIV2ChartVersionsParams, opts ...ClientOption) (*GetAPIV2ChartVersionsOK, error) GetAPIV2ChartVersionsSelector(params *GetAPIV2ChartVersionsSelectorParams, opts ...ClientOption) (*GetAPIV2ChartVersionsSelectorOK, error) @@ -38,8 +44,12 @@ type ClientService interface { GetAPIV2SelectorsChartVersionsSelector(params *GetAPIV2SelectorsChartVersionsSelectorParams, opts ...ClientOption) (*GetAPIV2SelectorsChartVersionsSelectorOK, error) + PatchAPIChartVersionsV3Selector(params *PatchAPIChartVersionsV3SelectorParams, opts ...ClientOption) (*PatchAPIChartVersionsV3SelectorOK, error) + PatchAPIV2ChartVersionsSelector(params *PatchAPIV2ChartVersionsSelectorParams, opts ...ClientOption) (*PatchAPIV2ChartVersionsSelectorOK, error) + PostAPIChartVersionsV3(params *PostAPIChartVersionsV3Params, opts ...ClientOption) (*PostAPIChartVersionsV3Created, error) + PostAPIV2ChartVersions(params *PostAPIV2ChartVersionsParams, opts ...ClientOption) (*PostAPIV2ChartVersionsOK, *PostAPIV2ChartVersionsCreated, error) PutAPIV2ChartVersionsSelector(params *PutAPIV2ChartVersionsSelectorParams, opts ...ClientOption) (*PutAPIV2ChartVersionsSelectorOK, *PutAPIV2ChartVersionsSelectorCreated, error) @@ -47,6 +57,126 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* + GetAPIChartVersionsProceduresV3Changelog gets a changelog between two chart versions + + Get the path through parent references from a child ChartVersion (inclusive) to a parent ChartVersion (exclusive), if possible. Because parent references point from newer children to older parents, the newer ChartVersion should be the child. The result will always exclude the parent. +*/ +func (a *Client) GetAPIChartVersionsProceduresV3Changelog(params *GetAPIChartVersionsProceduresV3ChangelogParams, opts ...ClientOption) (*GetAPIChartVersionsProceduresV3ChangelogOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAPIChartVersionsProceduresV3ChangelogParams() + } + op := &runtime.ClientOperation{ + ID: "GetAPIChartVersionsProceduresV3Changelog", + Method: "GET", + PathPattern: "/api/chart-versions/procedures/v3/changelog", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GetAPIChartVersionsProceduresV3ChangelogReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAPIChartVersionsProceduresV3ChangelogOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetAPIChartVersionsProceduresV3Changelog: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetAPIChartVersionsV3 lists chart versions matching a filter + + List ChartVersions matching a filter. +*/ +func (a *Client) GetAPIChartVersionsV3(params *GetAPIChartVersionsV3Params, opts ...ClientOption) (*GetAPIChartVersionsV3OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAPIChartVersionsV3Params() + } + op := &runtime.ClientOperation{ + ID: "GetAPIChartVersionsV3", + Method: "GET", + PathPattern: "/api/chart-versions/v3", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GetAPIChartVersionsV3Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAPIChartVersionsV3OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetAPIChartVersionsV3: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetAPIChartVersionsV3Selector gets an individual chart version + + Get an individual ChartVersion. +*/ +func (a *Client) GetAPIChartVersionsV3Selector(params *GetAPIChartVersionsV3SelectorParams, opts ...ClientOption) (*GetAPIChartVersionsV3SelectorOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAPIChartVersionsV3SelectorParams() + } + op := &runtime.ClientOperation{ + ID: "GetAPIChartVersionsV3Selector", + Method: "GET", + PathPattern: "/api/chart-versions/v3/{selector}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GetAPIChartVersionsV3SelectorReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetAPIChartVersionsV3SelectorOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for GetAPIChartVersionsV3Selector: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* GetAPIV2ChartVersions lists chart version entries @@ -208,6 +338,46 @@ func (a *Client) GetAPIV2SelectorsChartVersionsSelector(params *GetAPIV2Selector panic(msg) } +/* + PatchAPIChartVersionsV3Selector edits an individual chart version + + Edit an individual ChartVersion. +*/ +func (a *Client) PatchAPIChartVersionsV3Selector(params *PatchAPIChartVersionsV3SelectorParams, opts ...ClientOption) (*PatchAPIChartVersionsV3SelectorOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPatchAPIChartVersionsV3SelectorParams() + } + op := &runtime.ClientOperation{ + ID: "PatchAPIChartVersionsV3Selector", + Method: "PATCH", + PathPattern: "/api/chart-versions/v3/{selector}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PatchAPIChartVersionsV3SelectorReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PatchAPIChartVersionsV3SelectorOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for PatchAPIChartVersionsV3Selector: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* PatchAPIV2ChartVersionsSelector edits a chart version entry @@ -248,6 +418,46 @@ func (a *Client) PatchAPIV2ChartVersionsSelector(params *PatchAPIV2ChartVersions panic(msg) } +/* + PostAPIChartVersionsV3 upserts a chart version + + Upsert a ChartVersion. +*/ +func (a *Client) PostAPIChartVersionsV3(params *PostAPIChartVersionsV3Params, opts ...ClientOption) (*PostAPIChartVersionsV3Created, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostAPIChartVersionsV3Params() + } + op := &runtime.ClientOperation{ + ID: "PostAPIChartVersionsV3", + Method: "POST", + PathPattern: "/api/chartVersions/v3", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &PostAPIChartVersionsV3Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostAPIChartVersionsV3Created) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for PostAPIChartVersionsV3: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* PostAPIV2ChartVersions creates a new chart version entry diff --git a/sherlock-go-client/client/chart_versions/get_api_chart_versions_procedures_v3_changelog_parameters.go b/sherlock-go-client/client/chart_versions/get_api_chart_versions_procedures_v3_changelog_parameters.go new file mode 100644 index 000000000..8bc0c2502 --- /dev/null +++ b/sherlock-go-client/client/chart_versions/get_api_chart_versions_procedures_v3_changelog_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetAPIChartVersionsProceduresV3ChangelogParams creates a new GetAPIChartVersionsProceduresV3ChangelogParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAPIChartVersionsProceduresV3ChangelogParams() *GetAPIChartVersionsProceduresV3ChangelogParams { + return &GetAPIChartVersionsProceduresV3ChangelogParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAPIChartVersionsProceduresV3ChangelogParamsWithTimeout creates a new GetAPIChartVersionsProceduresV3ChangelogParams object +// with the ability to set a timeout on a request. +func NewGetAPIChartVersionsProceduresV3ChangelogParamsWithTimeout(timeout time.Duration) *GetAPIChartVersionsProceduresV3ChangelogParams { + return &GetAPIChartVersionsProceduresV3ChangelogParams{ + timeout: timeout, + } +} + +// NewGetAPIChartVersionsProceduresV3ChangelogParamsWithContext creates a new GetAPIChartVersionsProceduresV3ChangelogParams object +// with the ability to set a context for a request. +func NewGetAPIChartVersionsProceduresV3ChangelogParamsWithContext(ctx context.Context) *GetAPIChartVersionsProceduresV3ChangelogParams { + return &GetAPIChartVersionsProceduresV3ChangelogParams{ + Context: ctx, + } +} + +// NewGetAPIChartVersionsProceduresV3ChangelogParamsWithHTTPClient creates a new GetAPIChartVersionsProceduresV3ChangelogParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetAPIChartVersionsProceduresV3ChangelogParamsWithHTTPClient(client *http.Client) *GetAPIChartVersionsProceduresV3ChangelogParams { + return &GetAPIChartVersionsProceduresV3ChangelogParams{ + HTTPClient: client, + } +} + +/* GetAPIChartVersionsProceduresV3ChangelogParams contains all the parameters to send to the API endpoint + for the get API chart versions procedures v3 changelog operation. + + Typically these are written to a http.Request. +*/ +type GetAPIChartVersionsProceduresV3ChangelogParams struct { + + /* Child. + + The selector of the newer ChartVersion for the changelog + */ + Child string + + /* Parent. + + The selector of the older ChartVersion for the changelog + */ + Parent string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get API chart versions procedures v3 changelog params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WithDefaults() *GetAPIChartVersionsProceduresV3ChangelogParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get API chart versions procedures v3 changelog params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WithTimeout(timeout time.Duration) *GetAPIChartVersionsProceduresV3ChangelogParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WithContext(ctx context.Context) *GetAPIChartVersionsProceduresV3ChangelogParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WithHTTPClient(client *http.Client) *GetAPIChartVersionsProceduresV3ChangelogParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChild adds the child to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WithChild(child string) *GetAPIChartVersionsProceduresV3ChangelogParams { + o.SetChild(child) + return o +} + +// SetChild adds the child to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) SetChild(child string) { + o.Child = child +} + +// WithParent adds the parent to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WithParent(parent string) *GetAPIChartVersionsProceduresV3ChangelogParams { + o.SetParent(parent) + return o +} + +// SetParent adds the parent to the get API chart versions procedures v3 changelog params +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) SetParent(parent string) { + o.Parent = parent +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAPIChartVersionsProceduresV3ChangelogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param child + qrChild := o.Child + qChild := qrChild + if qChild != "" { + + if err := r.SetQueryParam("child", qChild); err != nil { + return err + } + } + + // query param parent + qrParent := o.Parent + qParent := qrParent + if qParent != "" { + + if err := r.SetQueryParam("parent", qParent); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/sherlock-go-client/client/chart_versions/get_api_chart_versions_procedures_v3_changelog_responses.go b/sherlock-go-client/client/chart_versions/get_api_chart_versions_procedures_v3_changelog_responses.go new file mode 100644 index 000000000..e95874b6b --- /dev/null +++ b/sherlock-go-client/client/chart_versions/get_api_chart_versions_procedures_v3_changelog_responses.go @@ -0,0 +1,295 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// GetAPIChartVersionsProceduresV3ChangelogReader is a Reader for the GetAPIChartVersionsProceduresV3Changelog structure. +type GetAPIChartVersionsProceduresV3ChangelogReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAPIChartVersionsProceduresV3ChangelogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAPIChartVersionsProceduresV3ChangelogOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetAPIChartVersionsProceduresV3ChangelogBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAPIChartVersionsProceduresV3ChangelogForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAPIChartVersionsProceduresV3ChangelogNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 407: + result := NewGetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewGetAPIChartVersionsProceduresV3ChangelogConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAPIChartVersionsProceduresV3ChangelogInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetAPIChartVersionsProceduresV3ChangelogOK creates a GetAPIChartVersionsProceduresV3ChangelogOK with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogOK() *GetAPIChartVersionsProceduresV3ChangelogOK { + return &GetAPIChartVersionsProceduresV3ChangelogOK{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogOK describes a response with status code 200, with default header values. + +OK +*/ +type GetAPIChartVersionsProceduresV3ChangelogOK struct { + Payload *models.SherlockChartVersionV3ChangelogResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogOK) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogOK %+v", 200, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogOK) GetPayload() *models.SherlockChartVersionV3ChangelogResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SherlockChartVersionV3ChangelogResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsProceduresV3ChangelogBadRequest creates a GetAPIChartVersionsProceduresV3ChangelogBadRequest with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogBadRequest() *GetAPIChartVersionsProceduresV3ChangelogBadRequest { + return &GetAPIChartVersionsProceduresV3ChangelogBadRequest{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetAPIChartVersionsProceduresV3ChangelogBadRequest struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogBadRequest) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogBadRequest %+v", 400, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogBadRequest) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsProceduresV3ChangelogForbidden creates a GetAPIChartVersionsProceduresV3ChangelogForbidden with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogForbidden() *GetAPIChartVersionsProceduresV3ChangelogForbidden { + return &GetAPIChartVersionsProceduresV3ChangelogForbidden{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetAPIChartVersionsProceduresV3ChangelogForbidden struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogForbidden) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogForbidden %+v", 403, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogForbidden) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsProceduresV3ChangelogNotFound creates a GetAPIChartVersionsProceduresV3ChangelogNotFound with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogNotFound() *GetAPIChartVersionsProceduresV3ChangelogNotFound { + return &GetAPIChartVersionsProceduresV3ChangelogNotFound{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GetAPIChartVersionsProceduresV3ChangelogNotFound struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogNotFound) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogNotFound %+v", 404, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogNotFound) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired creates a GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired() *GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired { + return &GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired describes a response with status code 407, with default header values. + +Proxy Authentication Required +*/ +type GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogProxyAuthenticationRequired %+v", 407, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogProxyAuthenticationRequired) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsProceduresV3ChangelogConflict creates a GetAPIChartVersionsProceduresV3ChangelogConflict with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogConflict() *GetAPIChartVersionsProceduresV3ChangelogConflict { + return &GetAPIChartVersionsProceduresV3ChangelogConflict{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type GetAPIChartVersionsProceduresV3ChangelogConflict struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogConflict) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogConflict %+v", 409, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogConflict) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsProceduresV3ChangelogInternalServerError creates a GetAPIChartVersionsProceduresV3ChangelogInternalServerError with default headers values +func NewGetAPIChartVersionsProceduresV3ChangelogInternalServerError() *GetAPIChartVersionsProceduresV3ChangelogInternalServerError { + return &GetAPIChartVersionsProceduresV3ChangelogInternalServerError{} +} + +/* GetAPIChartVersionsProceduresV3ChangelogInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetAPIChartVersionsProceduresV3ChangelogInternalServerError struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogInternalServerError) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/procedures/v3/changelog][%d] getApiChartVersionsProceduresV3ChangelogInternalServerError %+v", 500, o.Payload) +} +func (o *GetAPIChartVersionsProceduresV3ChangelogInternalServerError) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsProceduresV3ChangelogInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_parameters.go b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_parameters.go new file mode 100644 index 000000000..534c7d52e --- /dev/null +++ b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_parameters.go @@ -0,0 +1,426 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAPIChartVersionsV3Params creates a new GetAPIChartVersionsV3Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAPIChartVersionsV3Params() *GetAPIChartVersionsV3Params { + return &GetAPIChartVersionsV3Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAPIChartVersionsV3ParamsWithTimeout creates a new GetAPIChartVersionsV3Params object +// with the ability to set a timeout on a request. +func NewGetAPIChartVersionsV3ParamsWithTimeout(timeout time.Duration) *GetAPIChartVersionsV3Params { + return &GetAPIChartVersionsV3Params{ + timeout: timeout, + } +} + +// NewGetAPIChartVersionsV3ParamsWithContext creates a new GetAPIChartVersionsV3Params object +// with the ability to set a context for a request. +func NewGetAPIChartVersionsV3ParamsWithContext(ctx context.Context) *GetAPIChartVersionsV3Params { + return &GetAPIChartVersionsV3Params{ + Context: ctx, + } +} + +// NewGetAPIChartVersionsV3ParamsWithHTTPClient creates a new GetAPIChartVersionsV3Params object +// with the ability to set a custom HTTPClient for a request. +func NewGetAPIChartVersionsV3ParamsWithHTTPClient(client *http.Client) *GetAPIChartVersionsV3Params { + return &GetAPIChartVersionsV3Params{ + HTTPClient: client, + } +} + +/* GetAPIChartVersionsV3Params contains all the parameters to send to the API endpoint + for the get API chart versions v3 operation. + + Typically these are written to a http.Request. +*/ +type GetAPIChartVersionsV3Params struct { + + /* Chart. + + Required when creating + */ + Chart *string + + /* ChartVersion. + + Required when creating + */ + ChartVersion *string + + // CreatedAt. + // + // Format: date-time + CreatedAt *strfmt.DateTime + + /* Description. + + Generally the Git commit message + */ + Description *string + + // ID. + ID *int64 + + /* Limit. + + Control how many ChartVersions are returned (default 100) + */ + Limit *int64 + + /* Offset. + + Control the offset for the returned ChartVersions (default 0) + */ + Offset *int64 + + // ParentChartVersion. + ParentChartVersion *string + + // UpdatedAt. + // + // Format: date-time + UpdatedAt *strfmt.DateTime + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get API chart versions v3 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIChartVersionsV3Params) WithDefaults() *GetAPIChartVersionsV3Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get API chart versions v3 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIChartVersionsV3Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithTimeout(timeout time.Duration) *GetAPIChartVersionsV3Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithContext(ctx context.Context) *GetAPIChartVersionsV3Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithHTTPClient(client *http.Client) *GetAPIChartVersionsV3Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChart adds the chart to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithChart(chart *string) *GetAPIChartVersionsV3Params { + o.SetChart(chart) + return o +} + +// SetChart adds the chart to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetChart(chart *string) { + o.Chart = chart +} + +// WithChartVersion adds the chartVersion to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithChartVersion(chartVersion *string) *GetAPIChartVersionsV3Params { + o.SetChartVersion(chartVersion) + return o +} + +// SetChartVersion adds the chartVersion to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetChartVersion(chartVersion *string) { + o.ChartVersion = chartVersion +} + +// WithCreatedAt adds the createdAt to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithCreatedAt(createdAt *strfmt.DateTime) *GetAPIChartVersionsV3Params { + o.SetCreatedAt(createdAt) + return o +} + +// SetCreatedAt adds the createdAt to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetCreatedAt(createdAt *strfmt.DateTime) { + o.CreatedAt = createdAt +} + +// WithDescription adds the description to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithDescription(description *string) *GetAPIChartVersionsV3Params { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetDescription(description *string) { + o.Description = description +} + +// WithID adds the id to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithID(id *int64) *GetAPIChartVersionsV3Params { + o.SetID(id) + return o +} + +// SetID adds the id to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetID(id *int64) { + o.ID = id +} + +// WithLimit adds the limit to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithLimit(limit *int64) *GetAPIChartVersionsV3Params { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithOffset(offset *int64) *GetAPIChartVersionsV3Params { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithParentChartVersion adds the parentChartVersion to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithParentChartVersion(parentChartVersion *string) *GetAPIChartVersionsV3Params { + o.SetParentChartVersion(parentChartVersion) + return o +} + +// SetParentChartVersion adds the parentChartVersion to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetParentChartVersion(parentChartVersion *string) { + o.ParentChartVersion = parentChartVersion +} + +// WithUpdatedAt adds the updatedAt to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) WithUpdatedAt(updatedAt *strfmt.DateTime) *GetAPIChartVersionsV3Params { + o.SetUpdatedAt(updatedAt) + return o +} + +// SetUpdatedAt adds the updatedAt to the get API chart versions v3 params +func (o *GetAPIChartVersionsV3Params) SetUpdatedAt(updatedAt *strfmt.DateTime) { + o.UpdatedAt = updatedAt +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAPIChartVersionsV3Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Chart != nil { + + // query param chart + var qrChart string + + if o.Chart != nil { + qrChart = *o.Chart + } + qChart := qrChart + if qChart != "" { + + if err := r.SetQueryParam("chart", qChart); err != nil { + return err + } + } + } + + if o.ChartVersion != nil { + + // query param chartVersion + var qrChartVersion string + + if o.ChartVersion != nil { + qrChartVersion = *o.ChartVersion + } + qChartVersion := qrChartVersion + if qChartVersion != "" { + + if err := r.SetQueryParam("chartVersion", qChartVersion); err != nil { + return err + } + } + } + + if o.CreatedAt != nil { + + // query param createdAt + var qrCreatedAt strfmt.DateTime + + if o.CreatedAt != nil { + qrCreatedAt = *o.CreatedAt + } + qCreatedAt := qrCreatedAt.String() + if qCreatedAt != "" { + + if err := r.SetQueryParam("createdAt", qCreatedAt); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID int64 + + if o.ID != nil { + qrID = *o.ID + } + qID := swag.FormatInt64(qrID) + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.ParentChartVersion != nil { + + // query param parentChartVersion + var qrParentChartVersion string + + if o.ParentChartVersion != nil { + qrParentChartVersion = *o.ParentChartVersion + } + qParentChartVersion := qrParentChartVersion + if qParentChartVersion != "" { + + if err := r.SetQueryParam("parentChartVersion", qParentChartVersion); err != nil { + return err + } + } + } + + if o.UpdatedAt != nil { + + // query param updatedAt + var qrUpdatedAt strfmt.DateTime + + if o.UpdatedAt != nil { + qrUpdatedAt = *o.UpdatedAt + } + qUpdatedAt := qrUpdatedAt.String() + if qUpdatedAt != "" { + + if err := r.SetQueryParam("updatedAt", qUpdatedAt); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_responses.go b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_responses.go new file mode 100644 index 000000000..6582badeb --- /dev/null +++ b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_responses.go @@ -0,0 +1,293 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// GetAPIChartVersionsV3Reader is a Reader for the GetAPIChartVersionsV3 structure. +type GetAPIChartVersionsV3Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAPIChartVersionsV3Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAPIChartVersionsV3OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetAPIChartVersionsV3BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAPIChartVersionsV3Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAPIChartVersionsV3NotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 407: + result := NewGetAPIChartVersionsV3ProxyAuthenticationRequired() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewGetAPIChartVersionsV3Conflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAPIChartVersionsV3InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetAPIChartVersionsV3OK creates a GetAPIChartVersionsV3OK with default headers values +func NewGetAPIChartVersionsV3OK() *GetAPIChartVersionsV3OK { + return &GetAPIChartVersionsV3OK{} +} + +/* GetAPIChartVersionsV3OK describes a response with status code 200, with default header values. + +OK +*/ +type GetAPIChartVersionsV3OK struct { + Payload []*models.SherlockChartVersionV3 +} + +func (o *GetAPIChartVersionsV3OK) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3OK %+v", 200, o.Payload) +} +func (o *GetAPIChartVersionsV3OK) GetPayload() []*models.SherlockChartVersionV3 { + return o.Payload +} + +func (o *GetAPIChartVersionsV3OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3BadRequest creates a GetAPIChartVersionsV3BadRequest with default headers values +func NewGetAPIChartVersionsV3BadRequest() *GetAPIChartVersionsV3BadRequest { + return &GetAPIChartVersionsV3BadRequest{} +} + +/* GetAPIChartVersionsV3BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetAPIChartVersionsV3BadRequest struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3BadRequest) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3BadRequest %+v", 400, o.Payload) +} +func (o *GetAPIChartVersionsV3BadRequest) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3Forbidden creates a GetAPIChartVersionsV3Forbidden with default headers values +func NewGetAPIChartVersionsV3Forbidden() *GetAPIChartVersionsV3Forbidden { + return &GetAPIChartVersionsV3Forbidden{} +} + +/* GetAPIChartVersionsV3Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetAPIChartVersionsV3Forbidden struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3Forbidden) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3Forbidden %+v", 403, o.Payload) +} +func (o *GetAPIChartVersionsV3Forbidden) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3NotFound creates a GetAPIChartVersionsV3NotFound with default headers values +func NewGetAPIChartVersionsV3NotFound() *GetAPIChartVersionsV3NotFound { + return &GetAPIChartVersionsV3NotFound{} +} + +/* GetAPIChartVersionsV3NotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GetAPIChartVersionsV3NotFound struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3NotFound) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3NotFound %+v", 404, o.Payload) +} +func (o *GetAPIChartVersionsV3NotFound) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3NotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3ProxyAuthenticationRequired creates a GetAPIChartVersionsV3ProxyAuthenticationRequired with default headers values +func NewGetAPIChartVersionsV3ProxyAuthenticationRequired() *GetAPIChartVersionsV3ProxyAuthenticationRequired { + return &GetAPIChartVersionsV3ProxyAuthenticationRequired{} +} + +/* GetAPIChartVersionsV3ProxyAuthenticationRequired describes a response with status code 407, with default header values. + +Proxy Authentication Required +*/ +type GetAPIChartVersionsV3ProxyAuthenticationRequired struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3ProxyAuthenticationRequired) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3ProxyAuthenticationRequired %+v", 407, o.Payload) +} +func (o *GetAPIChartVersionsV3ProxyAuthenticationRequired) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3ProxyAuthenticationRequired) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3Conflict creates a GetAPIChartVersionsV3Conflict with default headers values +func NewGetAPIChartVersionsV3Conflict() *GetAPIChartVersionsV3Conflict { + return &GetAPIChartVersionsV3Conflict{} +} + +/* GetAPIChartVersionsV3Conflict describes a response with status code 409, with default header values. + +Conflict +*/ +type GetAPIChartVersionsV3Conflict struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3Conflict) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3Conflict %+v", 409, o.Payload) +} +func (o *GetAPIChartVersionsV3Conflict) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3Conflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3InternalServerError creates a GetAPIChartVersionsV3InternalServerError with default headers values +func NewGetAPIChartVersionsV3InternalServerError() *GetAPIChartVersionsV3InternalServerError { + return &GetAPIChartVersionsV3InternalServerError{} +} + +/* GetAPIChartVersionsV3InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetAPIChartVersionsV3InternalServerError struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3InternalServerError) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3][%d] getApiChartVersionsV3InternalServerError %+v", 500, o.Payload) +} +func (o *GetAPIChartVersionsV3InternalServerError) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_selector_parameters.go b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_selector_parameters.go new file mode 100644 index 000000000..2147081a7 --- /dev/null +++ b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_selector_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetAPIChartVersionsV3SelectorParams creates a new GetAPIChartVersionsV3SelectorParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetAPIChartVersionsV3SelectorParams() *GetAPIChartVersionsV3SelectorParams { + return &GetAPIChartVersionsV3SelectorParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetAPIChartVersionsV3SelectorParamsWithTimeout creates a new GetAPIChartVersionsV3SelectorParams object +// with the ability to set a timeout on a request. +func NewGetAPIChartVersionsV3SelectorParamsWithTimeout(timeout time.Duration) *GetAPIChartVersionsV3SelectorParams { + return &GetAPIChartVersionsV3SelectorParams{ + timeout: timeout, + } +} + +// NewGetAPIChartVersionsV3SelectorParamsWithContext creates a new GetAPIChartVersionsV3SelectorParams object +// with the ability to set a context for a request. +func NewGetAPIChartVersionsV3SelectorParamsWithContext(ctx context.Context) *GetAPIChartVersionsV3SelectorParams { + return &GetAPIChartVersionsV3SelectorParams{ + Context: ctx, + } +} + +// NewGetAPIChartVersionsV3SelectorParamsWithHTTPClient creates a new GetAPIChartVersionsV3SelectorParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetAPIChartVersionsV3SelectorParamsWithHTTPClient(client *http.Client) *GetAPIChartVersionsV3SelectorParams { + return &GetAPIChartVersionsV3SelectorParams{ + HTTPClient: client, + } +} + +/* GetAPIChartVersionsV3SelectorParams contains all the parameters to send to the API endpoint + for the get API chart versions v3 selector operation. + + Typically these are written to a http.Request. +*/ +type GetAPIChartVersionsV3SelectorParams struct { + + /* Selector. + + The selector of the ChartVersion, which can be either a numeric ID or chart/version. + */ + Selector string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get API chart versions v3 selector params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIChartVersionsV3SelectorParams) WithDefaults() *GetAPIChartVersionsV3SelectorParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get API chart versions v3 selector params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetAPIChartVersionsV3SelectorParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) WithTimeout(timeout time.Duration) *GetAPIChartVersionsV3SelectorParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) WithContext(ctx context.Context) *GetAPIChartVersionsV3SelectorParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) WithHTTPClient(client *http.Client) *GetAPIChartVersionsV3SelectorParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSelector adds the selector to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) WithSelector(selector string) *GetAPIChartVersionsV3SelectorParams { + o.SetSelector(selector) + return o +} + +// SetSelector adds the selector to the get API chart versions v3 selector params +func (o *GetAPIChartVersionsV3SelectorParams) SetSelector(selector string) { + o.Selector = selector +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAPIChartVersionsV3SelectorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param selector + if err := r.SetPathParam("selector", o.Selector); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_selector_responses.go b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_selector_responses.go new file mode 100644 index 000000000..691d30fcf --- /dev/null +++ b/sherlock-go-client/client/chart_versions/get_api_chart_versions_v3_selector_responses.go @@ -0,0 +1,295 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// GetAPIChartVersionsV3SelectorReader is a Reader for the GetAPIChartVersionsV3Selector structure. +type GetAPIChartVersionsV3SelectorReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAPIChartVersionsV3SelectorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAPIChartVersionsV3SelectorOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewGetAPIChartVersionsV3SelectorBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAPIChartVersionsV3SelectorForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAPIChartVersionsV3SelectorNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 407: + result := NewGetAPIChartVersionsV3SelectorProxyAuthenticationRequired() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewGetAPIChartVersionsV3SelectorConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAPIChartVersionsV3SelectorInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetAPIChartVersionsV3SelectorOK creates a GetAPIChartVersionsV3SelectorOK with default headers values +func NewGetAPIChartVersionsV3SelectorOK() *GetAPIChartVersionsV3SelectorOK { + return &GetAPIChartVersionsV3SelectorOK{} +} + +/* GetAPIChartVersionsV3SelectorOK describes a response with status code 200, with default header values. + +OK +*/ +type GetAPIChartVersionsV3SelectorOK struct { + Payload *models.SherlockChartVersionV3 +} + +func (o *GetAPIChartVersionsV3SelectorOK) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorOK %+v", 200, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorOK) GetPayload() *models.SherlockChartVersionV3 { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SherlockChartVersionV3) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3SelectorBadRequest creates a GetAPIChartVersionsV3SelectorBadRequest with default headers values +func NewGetAPIChartVersionsV3SelectorBadRequest() *GetAPIChartVersionsV3SelectorBadRequest { + return &GetAPIChartVersionsV3SelectorBadRequest{} +} + +/* GetAPIChartVersionsV3SelectorBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type GetAPIChartVersionsV3SelectorBadRequest struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3SelectorBadRequest) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorBadRequest %+v", 400, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorBadRequest) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3SelectorForbidden creates a GetAPIChartVersionsV3SelectorForbidden with default headers values +func NewGetAPIChartVersionsV3SelectorForbidden() *GetAPIChartVersionsV3SelectorForbidden { + return &GetAPIChartVersionsV3SelectorForbidden{} +} + +/* GetAPIChartVersionsV3SelectorForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type GetAPIChartVersionsV3SelectorForbidden struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3SelectorForbidden) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorForbidden %+v", 403, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorForbidden) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3SelectorNotFound creates a GetAPIChartVersionsV3SelectorNotFound with default headers values +func NewGetAPIChartVersionsV3SelectorNotFound() *GetAPIChartVersionsV3SelectorNotFound { + return &GetAPIChartVersionsV3SelectorNotFound{} +} + +/* GetAPIChartVersionsV3SelectorNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type GetAPIChartVersionsV3SelectorNotFound struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3SelectorNotFound) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorNotFound %+v", 404, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorNotFound) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3SelectorProxyAuthenticationRequired creates a GetAPIChartVersionsV3SelectorProxyAuthenticationRequired with default headers values +func NewGetAPIChartVersionsV3SelectorProxyAuthenticationRequired() *GetAPIChartVersionsV3SelectorProxyAuthenticationRequired { + return &GetAPIChartVersionsV3SelectorProxyAuthenticationRequired{} +} + +/* GetAPIChartVersionsV3SelectorProxyAuthenticationRequired describes a response with status code 407, with default header values. + +Proxy Authentication Required +*/ +type GetAPIChartVersionsV3SelectorProxyAuthenticationRequired struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3SelectorProxyAuthenticationRequired) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorProxyAuthenticationRequired %+v", 407, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorProxyAuthenticationRequired) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorProxyAuthenticationRequired) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3SelectorConflict creates a GetAPIChartVersionsV3SelectorConflict with default headers values +func NewGetAPIChartVersionsV3SelectorConflict() *GetAPIChartVersionsV3SelectorConflict { + return &GetAPIChartVersionsV3SelectorConflict{} +} + +/* GetAPIChartVersionsV3SelectorConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type GetAPIChartVersionsV3SelectorConflict struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3SelectorConflict) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorConflict %+v", 409, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorConflict) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAPIChartVersionsV3SelectorInternalServerError creates a GetAPIChartVersionsV3SelectorInternalServerError with default headers values +func NewGetAPIChartVersionsV3SelectorInternalServerError() *GetAPIChartVersionsV3SelectorInternalServerError { + return &GetAPIChartVersionsV3SelectorInternalServerError{} +} + +/* GetAPIChartVersionsV3SelectorInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type GetAPIChartVersionsV3SelectorInternalServerError struct { + Payload *models.ErrorsErrorResponse +} + +func (o *GetAPIChartVersionsV3SelectorInternalServerError) Error() string { + return fmt.Sprintf("[GET /api/chart-versions/v3/{selector}][%d] getApiChartVersionsV3SelectorInternalServerError %+v", 500, o.Payload) +} +func (o *GetAPIChartVersionsV3SelectorInternalServerError) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *GetAPIChartVersionsV3SelectorInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/sherlock-go-client/client/chart_versions/patch_api_chart_versions_v3_selector_parameters.go b/sherlock-go-client/client/chart_versions/patch_api_chart_versions_v3_selector_parameters.go new file mode 100644 index 000000000..ea85662b9 --- /dev/null +++ b/sherlock-go-client/client/chart_versions/patch_api_chart_versions_v3_selector_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// NewPatchAPIChartVersionsV3SelectorParams creates a new PatchAPIChartVersionsV3SelectorParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPatchAPIChartVersionsV3SelectorParams() *PatchAPIChartVersionsV3SelectorParams { + return &PatchAPIChartVersionsV3SelectorParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPatchAPIChartVersionsV3SelectorParamsWithTimeout creates a new PatchAPIChartVersionsV3SelectorParams object +// with the ability to set a timeout on a request. +func NewPatchAPIChartVersionsV3SelectorParamsWithTimeout(timeout time.Duration) *PatchAPIChartVersionsV3SelectorParams { + return &PatchAPIChartVersionsV3SelectorParams{ + timeout: timeout, + } +} + +// NewPatchAPIChartVersionsV3SelectorParamsWithContext creates a new PatchAPIChartVersionsV3SelectorParams object +// with the ability to set a context for a request. +func NewPatchAPIChartVersionsV3SelectorParamsWithContext(ctx context.Context) *PatchAPIChartVersionsV3SelectorParams { + return &PatchAPIChartVersionsV3SelectorParams{ + Context: ctx, + } +} + +// NewPatchAPIChartVersionsV3SelectorParamsWithHTTPClient creates a new PatchAPIChartVersionsV3SelectorParams object +// with the ability to set a custom HTTPClient for a request. +func NewPatchAPIChartVersionsV3SelectorParamsWithHTTPClient(client *http.Client) *PatchAPIChartVersionsV3SelectorParams { + return &PatchAPIChartVersionsV3SelectorParams{ + HTTPClient: client, + } +} + +/* PatchAPIChartVersionsV3SelectorParams contains all the parameters to send to the API endpoint + for the patch API chart versions v3 selector operation. + + Typically these are written to a http.Request. +*/ +type PatchAPIChartVersionsV3SelectorParams struct { + + /* ChartVersion. + + The edits to make to the ChartVersion + */ + ChartVersion *models.SherlockChartVersionV3Edit + + /* Selector. + + The selector of the ChartVersion, which can be either a numeric ID or chart/version. + */ + Selector string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the patch API chart versions v3 selector params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PatchAPIChartVersionsV3SelectorParams) WithDefaults() *PatchAPIChartVersionsV3SelectorParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the patch API chart versions v3 selector params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PatchAPIChartVersionsV3SelectorParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) WithTimeout(timeout time.Duration) *PatchAPIChartVersionsV3SelectorParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) WithContext(ctx context.Context) *PatchAPIChartVersionsV3SelectorParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) WithHTTPClient(client *http.Client) *PatchAPIChartVersionsV3SelectorParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChartVersion adds the chartVersion to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) WithChartVersion(chartVersion *models.SherlockChartVersionV3Edit) *PatchAPIChartVersionsV3SelectorParams { + o.SetChartVersion(chartVersion) + return o +} + +// SetChartVersion adds the chartVersion to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) SetChartVersion(chartVersion *models.SherlockChartVersionV3Edit) { + o.ChartVersion = chartVersion +} + +// WithSelector adds the selector to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) WithSelector(selector string) *PatchAPIChartVersionsV3SelectorParams { + o.SetSelector(selector) + return o +} + +// SetSelector adds the selector to the patch API chart versions v3 selector params +func (o *PatchAPIChartVersionsV3SelectorParams) SetSelector(selector string) { + o.Selector = selector +} + +// WriteToRequest writes these params to a swagger request +func (o *PatchAPIChartVersionsV3SelectorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.ChartVersion != nil { + if err := r.SetBodyParam(o.ChartVersion); err != nil { + return err + } + } + + // path param selector + if err := r.SetPathParam("selector", o.Selector); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/sherlock-go-client/client/chart_versions/patch_api_chart_versions_v3_selector_responses.go b/sherlock-go-client/client/chart_versions/patch_api_chart_versions_v3_selector_responses.go new file mode 100644 index 000000000..4d9c369a6 --- /dev/null +++ b/sherlock-go-client/client/chart_versions/patch_api_chart_versions_v3_selector_responses.go @@ -0,0 +1,295 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// PatchAPIChartVersionsV3SelectorReader is a Reader for the PatchAPIChartVersionsV3Selector structure. +type PatchAPIChartVersionsV3SelectorReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PatchAPIChartVersionsV3SelectorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPatchAPIChartVersionsV3SelectorOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPatchAPIChartVersionsV3SelectorBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPatchAPIChartVersionsV3SelectorForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPatchAPIChartVersionsV3SelectorNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 407: + result := NewPatchAPIChartVersionsV3SelectorProxyAuthenticationRequired() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewPatchAPIChartVersionsV3SelectorConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPatchAPIChartVersionsV3SelectorInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPatchAPIChartVersionsV3SelectorOK creates a PatchAPIChartVersionsV3SelectorOK with default headers values +func NewPatchAPIChartVersionsV3SelectorOK() *PatchAPIChartVersionsV3SelectorOK { + return &PatchAPIChartVersionsV3SelectorOK{} +} + +/* PatchAPIChartVersionsV3SelectorOK describes a response with status code 200, with default header values. + +OK +*/ +type PatchAPIChartVersionsV3SelectorOK struct { + Payload *models.SherlockChartVersionV3 +} + +func (o *PatchAPIChartVersionsV3SelectorOK) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorOK %+v", 200, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorOK) GetPayload() *models.SherlockChartVersionV3 { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SherlockChartVersionV3) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchAPIChartVersionsV3SelectorBadRequest creates a PatchAPIChartVersionsV3SelectorBadRequest with default headers values +func NewPatchAPIChartVersionsV3SelectorBadRequest() *PatchAPIChartVersionsV3SelectorBadRequest { + return &PatchAPIChartVersionsV3SelectorBadRequest{} +} + +/* PatchAPIChartVersionsV3SelectorBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PatchAPIChartVersionsV3SelectorBadRequest struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PatchAPIChartVersionsV3SelectorBadRequest) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorBadRequest %+v", 400, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorBadRequest) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchAPIChartVersionsV3SelectorForbidden creates a PatchAPIChartVersionsV3SelectorForbidden with default headers values +func NewPatchAPIChartVersionsV3SelectorForbidden() *PatchAPIChartVersionsV3SelectorForbidden { + return &PatchAPIChartVersionsV3SelectorForbidden{} +} + +/* PatchAPIChartVersionsV3SelectorForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PatchAPIChartVersionsV3SelectorForbidden struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PatchAPIChartVersionsV3SelectorForbidden) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorForbidden %+v", 403, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorForbidden) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchAPIChartVersionsV3SelectorNotFound creates a PatchAPIChartVersionsV3SelectorNotFound with default headers values +func NewPatchAPIChartVersionsV3SelectorNotFound() *PatchAPIChartVersionsV3SelectorNotFound { + return &PatchAPIChartVersionsV3SelectorNotFound{} +} + +/* PatchAPIChartVersionsV3SelectorNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PatchAPIChartVersionsV3SelectorNotFound struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PatchAPIChartVersionsV3SelectorNotFound) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorNotFound %+v", 404, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorNotFound) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchAPIChartVersionsV3SelectorProxyAuthenticationRequired creates a PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired with default headers values +func NewPatchAPIChartVersionsV3SelectorProxyAuthenticationRequired() *PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired { + return &PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired{} +} + +/* PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired describes a response with status code 407, with default header values. + +Proxy Authentication Required +*/ +type PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorProxyAuthenticationRequired %+v", 407, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorProxyAuthenticationRequired) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchAPIChartVersionsV3SelectorConflict creates a PatchAPIChartVersionsV3SelectorConflict with default headers values +func NewPatchAPIChartVersionsV3SelectorConflict() *PatchAPIChartVersionsV3SelectorConflict { + return &PatchAPIChartVersionsV3SelectorConflict{} +} + +/* PatchAPIChartVersionsV3SelectorConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type PatchAPIChartVersionsV3SelectorConflict struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PatchAPIChartVersionsV3SelectorConflict) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorConflict %+v", 409, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorConflict) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPatchAPIChartVersionsV3SelectorInternalServerError creates a PatchAPIChartVersionsV3SelectorInternalServerError with default headers values +func NewPatchAPIChartVersionsV3SelectorInternalServerError() *PatchAPIChartVersionsV3SelectorInternalServerError { + return &PatchAPIChartVersionsV3SelectorInternalServerError{} +} + +/* PatchAPIChartVersionsV3SelectorInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PatchAPIChartVersionsV3SelectorInternalServerError struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PatchAPIChartVersionsV3SelectorInternalServerError) Error() string { + return fmt.Sprintf("[PATCH /api/chart-versions/v3/{selector}][%d] patchApiChartVersionsV3SelectorInternalServerError %+v", 500, o.Payload) +} +func (o *PatchAPIChartVersionsV3SelectorInternalServerError) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PatchAPIChartVersionsV3SelectorInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/sherlock-go-client/client/chart_versions/post_api_chart_versions_v3_parameters.go b/sherlock-go-client/client/chart_versions/post_api_chart_versions_v3_parameters.go new file mode 100644 index 000000000..ca170a290 --- /dev/null +++ b/sherlock-go-client/client/chart_versions/post_api_chart_versions_v3_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// NewPostAPIChartVersionsV3Params creates a new PostAPIChartVersionsV3Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPostAPIChartVersionsV3Params() *PostAPIChartVersionsV3Params { + return &PostAPIChartVersionsV3Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostAPIChartVersionsV3ParamsWithTimeout creates a new PostAPIChartVersionsV3Params object +// with the ability to set a timeout on a request. +func NewPostAPIChartVersionsV3ParamsWithTimeout(timeout time.Duration) *PostAPIChartVersionsV3Params { + return &PostAPIChartVersionsV3Params{ + timeout: timeout, + } +} + +// NewPostAPIChartVersionsV3ParamsWithContext creates a new PostAPIChartVersionsV3Params object +// with the ability to set a context for a request. +func NewPostAPIChartVersionsV3ParamsWithContext(ctx context.Context) *PostAPIChartVersionsV3Params { + return &PostAPIChartVersionsV3Params{ + Context: ctx, + } +} + +// NewPostAPIChartVersionsV3ParamsWithHTTPClient creates a new PostAPIChartVersionsV3Params object +// with the ability to set a custom HTTPClient for a request. +func NewPostAPIChartVersionsV3ParamsWithHTTPClient(client *http.Client) *PostAPIChartVersionsV3Params { + return &PostAPIChartVersionsV3Params{ + HTTPClient: client, + } +} + +/* PostAPIChartVersionsV3Params contains all the parameters to send to the API endpoint + for the post API chart versions v3 operation. + + Typically these are written to a http.Request. +*/ +type PostAPIChartVersionsV3Params struct { + + /* ChartVersion. + + The ChartVersion to upsert + */ + ChartVersion *models.SherlockChartVersionV3Create + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post API chart versions v3 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostAPIChartVersionsV3Params) WithDefaults() *PostAPIChartVersionsV3Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post API chart versions v3 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostAPIChartVersionsV3Params) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) WithTimeout(timeout time.Duration) *PostAPIChartVersionsV3Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) WithContext(ctx context.Context) *PostAPIChartVersionsV3Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) WithHTTPClient(client *http.Client) *PostAPIChartVersionsV3Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChartVersion adds the chartVersion to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) WithChartVersion(chartVersion *models.SherlockChartVersionV3Create) *PostAPIChartVersionsV3Params { + o.SetChartVersion(chartVersion) + return o +} + +// SetChartVersion adds the chartVersion to the post API chart versions v3 params +func (o *PostAPIChartVersionsV3Params) SetChartVersion(chartVersion *models.SherlockChartVersionV3Create) { + o.ChartVersion = chartVersion +} + +// WriteToRequest writes these params to a swagger request +func (o *PostAPIChartVersionsV3Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.ChartVersion != nil { + if err := r.SetBodyParam(o.ChartVersion); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/sherlock-go-client/client/chart_versions/post_api_chart_versions_v3_responses.go b/sherlock-go-client/client/chart_versions/post_api_chart_versions_v3_responses.go new file mode 100644 index 000000000..c7cb5dc07 --- /dev/null +++ b/sherlock-go-client/client/chart_versions/post_api_chart_versions_v3_responses.go @@ -0,0 +1,295 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package chart_versions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/broadinstitute/sherlock/sherlock-go-client/client/models" +) + +// PostAPIChartVersionsV3Reader is a Reader for the PostAPIChartVersionsV3 structure. +type PostAPIChartVersionsV3Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostAPIChartVersionsV3Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostAPIChartVersionsV3Created() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPostAPIChartVersionsV3BadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostAPIChartVersionsV3Forbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostAPIChartVersionsV3NotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 407: + result := NewPostAPIChartVersionsV3ProxyAuthenticationRequired() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewPostAPIChartVersionsV3Conflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostAPIChartVersionsV3InternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostAPIChartVersionsV3Created creates a PostAPIChartVersionsV3Created with default headers values +func NewPostAPIChartVersionsV3Created() *PostAPIChartVersionsV3Created { + return &PostAPIChartVersionsV3Created{} +} + +/* PostAPIChartVersionsV3Created describes a response with status code 201, with default header values. + +Created +*/ +type PostAPIChartVersionsV3Created struct { + Payload *models.SherlockChartVersionV3 +} + +func (o *PostAPIChartVersionsV3Created) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3Created %+v", 201, o.Payload) +} +func (o *PostAPIChartVersionsV3Created) GetPayload() *models.SherlockChartVersionV3 { + return o.Payload +} + +func (o *PostAPIChartVersionsV3Created) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SherlockChartVersionV3) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAPIChartVersionsV3BadRequest creates a PostAPIChartVersionsV3BadRequest with default headers values +func NewPostAPIChartVersionsV3BadRequest() *PostAPIChartVersionsV3BadRequest { + return &PostAPIChartVersionsV3BadRequest{} +} + +/* PostAPIChartVersionsV3BadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PostAPIChartVersionsV3BadRequest struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PostAPIChartVersionsV3BadRequest) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3BadRequest %+v", 400, o.Payload) +} +func (o *PostAPIChartVersionsV3BadRequest) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PostAPIChartVersionsV3BadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAPIChartVersionsV3Forbidden creates a PostAPIChartVersionsV3Forbidden with default headers values +func NewPostAPIChartVersionsV3Forbidden() *PostAPIChartVersionsV3Forbidden { + return &PostAPIChartVersionsV3Forbidden{} +} + +/* PostAPIChartVersionsV3Forbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PostAPIChartVersionsV3Forbidden struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PostAPIChartVersionsV3Forbidden) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3Forbidden %+v", 403, o.Payload) +} +func (o *PostAPIChartVersionsV3Forbidden) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PostAPIChartVersionsV3Forbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAPIChartVersionsV3NotFound creates a PostAPIChartVersionsV3NotFound with default headers values +func NewPostAPIChartVersionsV3NotFound() *PostAPIChartVersionsV3NotFound { + return &PostAPIChartVersionsV3NotFound{} +} + +/* PostAPIChartVersionsV3NotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PostAPIChartVersionsV3NotFound struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PostAPIChartVersionsV3NotFound) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3NotFound %+v", 404, o.Payload) +} +func (o *PostAPIChartVersionsV3NotFound) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PostAPIChartVersionsV3NotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAPIChartVersionsV3ProxyAuthenticationRequired creates a PostAPIChartVersionsV3ProxyAuthenticationRequired with default headers values +func NewPostAPIChartVersionsV3ProxyAuthenticationRequired() *PostAPIChartVersionsV3ProxyAuthenticationRequired { + return &PostAPIChartVersionsV3ProxyAuthenticationRequired{} +} + +/* PostAPIChartVersionsV3ProxyAuthenticationRequired describes a response with status code 407, with default header values. + +Proxy Authentication Required +*/ +type PostAPIChartVersionsV3ProxyAuthenticationRequired struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PostAPIChartVersionsV3ProxyAuthenticationRequired) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3ProxyAuthenticationRequired %+v", 407, o.Payload) +} +func (o *PostAPIChartVersionsV3ProxyAuthenticationRequired) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PostAPIChartVersionsV3ProxyAuthenticationRequired) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAPIChartVersionsV3Conflict creates a PostAPIChartVersionsV3Conflict with default headers values +func NewPostAPIChartVersionsV3Conflict() *PostAPIChartVersionsV3Conflict { + return &PostAPIChartVersionsV3Conflict{} +} + +/* PostAPIChartVersionsV3Conflict describes a response with status code 409, with default header values. + +Conflict +*/ +type PostAPIChartVersionsV3Conflict struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PostAPIChartVersionsV3Conflict) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3Conflict %+v", 409, o.Payload) +} +func (o *PostAPIChartVersionsV3Conflict) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PostAPIChartVersionsV3Conflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAPIChartVersionsV3InternalServerError creates a PostAPIChartVersionsV3InternalServerError with default headers values +func NewPostAPIChartVersionsV3InternalServerError() *PostAPIChartVersionsV3InternalServerError { + return &PostAPIChartVersionsV3InternalServerError{} +} + +/* PostAPIChartVersionsV3InternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PostAPIChartVersionsV3InternalServerError struct { + Payload *models.ErrorsErrorResponse +} + +func (o *PostAPIChartVersionsV3InternalServerError) Error() string { + return fmt.Sprintf("[POST /api/chartVersions/v3][%d] postApiChartVersionsV3InternalServerError %+v", 500, o.Payload) +} +func (o *PostAPIChartVersionsV3InternalServerError) GetPayload() *models.ErrorsErrorResponse { + return o.Payload +} + +func (o *PostAPIChartVersionsV3InternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorsErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/sherlock-go-client/client/models/sherlock_chart_version_v3.go b/sherlock-go-client/client/models/sherlock_chart_version_v3.go new file mode 100644 index 000000000..b8901af7e --- /dev/null +++ b/sherlock-go-client/client/models/sherlock_chart_version_v3.go @@ -0,0 +1,209 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SherlockChartVersionV3 sherlock chart version v3 +// +// swagger:model sherlock.ChartVersionV3 +type SherlockChartVersionV3 struct { + + // Required when creating + Chart string `json:"chart,omitempty"` + + // chart info + ChartInfo *SherlockChartV3 `json:"chartInfo,omitempty"` + + // Required when creating + ChartVersion string `json:"chartVersion,omitempty"` + + // ci identifier + CiIdentifier *SherlockCiIdentifierV3 `json:"ciIdentifier,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` + + // Generally the Git commit message + Description string `json:"description,omitempty"` + + // id + ID int64 `json:"id,omitempty"` + + // parent chart version + ParentChartVersion string `json:"parentChartVersion,omitempty"` + + // parent chart version info + ParentChartVersionInfo interface{} `json:"parentChartVersionInfo,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"` +} + +// Validate validates this sherlock chart version v3 +func (m *SherlockChartVersionV3) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateChartInfo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCiIdentifier(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SherlockChartVersionV3) validateChartInfo(formats strfmt.Registry) error { + if swag.IsZero(m.ChartInfo) { // not required + return nil + } + + if m.ChartInfo != nil { + if err := m.ChartInfo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("chartInfo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("chartInfo") + } + return err + } + } + + return nil +} + +func (m *SherlockChartVersionV3) validateCiIdentifier(formats strfmt.Registry) error { + if swag.IsZero(m.CiIdentifier) { // not required + return nil + } + + if m.CiIdentifier != nil { + if err := m.CiIdentifier.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ciIdentifier") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ciIdentifier") + } + return err + } + } + + return nil +} + +func (m *SherlockChartVersionV3) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("createdAt", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *SherlockChartVersionV3) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this sherlock chart version v3 based on the context it is used +func (m *SherlockChartVersionV3) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateChartInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCiIdentifier(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SherlockChartVersionV3) contextValidateChartInfo(ctx context.Context, formats strfmt.Registry) error { + + if m.ChartInfo != nil { + if err := m.ChartInfo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("chartInfo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("chartInfo") + } + return err + } + } + + return nil +} + +func (m *SherlockChartVersionV3) contextValidateCiIdentifier(ctx context.Context, formats strfmt.Registry) error { + + if m.CiIdentifier != nil { + if err := m.CiIdentifier.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ciIdentifier") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ciIdentifier") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SherlockChartVersionV3) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SherlockChartVersionV3) UnmarshalBinary(b []byte) error { + var res SherlockChartVersionV3 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/sherlock-go-client/client/models/sherlock_chart_version_v3_changelog_response.go b/sherlock-go-client/client/models/sherlock_chart_version_v3_changelog_response.go new file mode 100644 index 000000000..042b54459 --- /dev/null +++ b/sherlock-go-client/client/models/sherlock_chart_version_v3_changelog_response.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SherlockChartVersionV3ChangelogResponse sherlock chart version v3 changelog response +// +// swagger:model sherlock.ChartVersionV3ChangelogResponse +type SherlockChartVersionV3ChangelogResponse struct { + + // changelog + Changelog []*SherlockChartVersionV3 `json:"changelog"` + + // complete + Complete bool `json:"complete,omitempty"` +} + +// Validate validates this sherlock chart version v3 changelog response +func (m *SherlockChartVersionV3ChangelogResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateChangelog(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SherlockChartVersionV3ChangelogResponse) validateChangelog(formats strfmt.Registry) error { + if swag.IsZero(m.Changelog) { // not required + return nil + } + + for i := 0; i < len(m.Changelog); i++ { + if swag.IsZero(m.Changelog[i]) { // not required + continue + } + + if m.Changelog[i] != nil { + if err := m.Changelog[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("changelog" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("changelog" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this sherlock chart version v3 changelog response based on the context it is used +func (m *SherlockChartVersionV3ChangelogResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateChangelog(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SherlockChartVersionV3ChangelogResponse) contextValidateChangelog(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Changelog); i++ { + + if m.Changelog[i] != nil { + if err := m.Changelog[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("changelog" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("changelog" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SherlockChartVersionV3ChangelogResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SherlockChartVersionV3ChangelogResponse) UnmarshalBinary(b []byte) error { + var res SherlockChartVersionV3ChangelogResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/sherlock-go-client/client/models/sherlock_chart_version_v3_create.go b/sherlock-go-client/client/models/sherlock_chart_version_v3_create.go new file mode 100644 index 000000000..68ebcf2b7 --- /dev/null +++ b/sherlock-go-client/client/models/sherlock_chart_version_v3_create.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SherlockChartVersionV3Create sherlock chart version v3 create +// +// swagger:model sherlock.ChartVersionV3Create +type SherlockChartVersionV3Create struct { + + // Required when creating + Chart string `json:"chart,omitempty"` + + // Required when creating + ChartVersion string `json:"chartVersion,omitempty"` + + // Generally the Git commit message + Description string `json:"description,omitempty"` + + // parent chart version + ParentChartVersion string `json:"parentChartVersion,omitempty"` +} + +// Validate validates this sherlock chart version v3 create +func (m *SherlockChartVersionV3Create) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this sherlock chart version v3 create based on context it is used +func (m *SherlockChartVersionV3Create) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SherlockChartVersionV3Create) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SherlockChartVersionV3Create) UnmarshalBinary(b []byte) error { + var res SherlockChartVersionV3Create + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/sherlock-go-client/client/models/sherlock_chart_version_v3_edit.go b/sherlock-go-client/client/models/sherlock_chart_version_v3_edit.go new file mode 100644 index 000000000..50354b02d --- /dev/null +++ b/sherlock-go-client/client/models/sherlock_chart_version_v3_edit.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SherlockChartVersionV3Edit sherlock chart version v3 edit +// +// swagger:model sherlock.ChartVersionV3Edit +type SherlockChartVersionV3Edit struct { + + // Generally the Git commit message + Description string `json:"description,omitempty"` +} + +// Validate validates this sherlock chart version v3 edit +func (m *SherlockChartVersionV3Edit) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this sherlock chart version v3 edit based on context it is used +func (m *SherlockChartVersionV3Edit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SherlockChartVersionV3Edit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SherlockChartVersionV3Edit) UnmarshalBinary(b []byte) error { + var res SherlockChartVersionV3Edit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/sherlock-typescript-client/.openapi-generator/FILES b/sherlock-typescript-client/.openapi-generator/FILES index ef690e493..c7e40bbe1 100644 --- a/sherlock-typescript-client/.openapi-generator/FILES +++ b/sherlock-typescript-client/.openapi-generator/FILES @@ -32,6 +32,10 @@ src/models/SherlockAppVersionV3Edit.ts src/models/SherlockChartV3.ts src/models/SherlockChartV3Create.ts src/models/SherlockChartV3Edit.ts +src/models/SherlockChartVersionV3.ts +src/models/SherlockChartVersionV3ChangelogResponse.ts +src/models/SherlockChartVersionV3Create.ts +src/models/SherlockChartVersionV3Edit.ts src/models/SherlockCiIdentifierV3.ts src/models/SherlockCiRunV3.ts src/models/SherlockCiRunV3Upsert.ts diff --git a/sherlock-typescript-client/README.md b/sherlock-typescript-client/README.md index fd9f6e839..d8b43f8df 100644 --- a/sherlock-typescript-client/README.md +++ b/sherlock-typescript-client/README.md @@ -1,4 +1,4 @@ -## @sherlock-js-client/sherlock@v0.2.8 +## @sherlock-js-client/sherlock@v0.2.9 This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install @sherlock-js-client/sherlock@v0.2.8 --save +npm install @sherlock-js-client/sherlock@v0.2.9 --save ``` _unPublished (not recommended):_ diff --git a/sherlock-typescript-client/package-lock.json b/sherlock-typescript-client/package-lock.json index a7c36e3fe..7106e1756 100644 --- a/sherlock-typescript-client/package-lock.json +++ b/sherlock-typescript-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sherlock-js-client/sherlock", - "version": "v0.2.8", + "version": "v0.2.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sherlock-js-client/sherlock", - "version": "v0.2.8", + "version": "v0.2.9", "devDependencies": { "typescript": "^4.0" } diff --git a/sherlock-typescript-client/package.json b/sherlock-typescript-client/package.json index 2be05e77e..e7d30c0a4 100644 --- a/sherlock-typescript-client/package.json +++ b/sherlock-typescript-client/package.json @@ -1,6 +1,6 @@ { "name": "@sherlock-js-client/sherlock", - "version": "v0.2.8", + "version": "v0.2.9", "description": "OpenAPI client for @sherlock-js-client/sherlock", "author": "OpenAPI-Generator", "repository": { diff --git a/sherlock-typescript-client/src/apis/ChartVersionsApi.ts b/sherlock-typescript-client/src/apis/ChartVersionsApi.ts index 76d4ef196..d34777d92 100644 --- a/sherlock-typescript-client/src/apis/ChartVersionsApi.ts +++ b/sherlock-typescript-client/src/apis/ChartVersionsApi.ts @@ -16,6 +16,10 @@ import * as runtime from '../runtime'; import type { ErrorsErrorResponse, + SherlockChartVersionV3, + SherlockChartVersionV3ChangelogResponse, + SherlockChartVersionV3Create, + SherlockChartVersionV3Edit, V2controllersChartVersion, V2controllersCreatableChartVersion, V2controllersEditableChartVersion, @@ -23,6 +27,14 @@ import type { import { ErrorsErrorResponseFromJSON, ErrorsErrorResponseToJSON, + SherlockChartVersionV3FromJSON, + SherlockChartVersionV3ToJSON, + SherlockChartVersionV3ChangelogResponseFromJSON, + SherlockChartVersionV3ChangelogResponseToJSON, + SherlockChartVersionV3CreateFromJSON, + SherlockChartVersionV3CreateToJSON, + SherlockChartVersionV3EditFromJSON, + SherlockChartVersionV3EditToJSON, V2controllersChartVersionFromJSON, V2controllersChartVersionToJSON, V2controllersCreatableChartVersionFromJSON, @@ -31,6 +43,36 @@ import { V2controllersEditableChartVersionToJSON, } from '../models/index'; +export interface ApiChartVersionsProceduresV3ChangelogGetRequest { + child: string; + parent: string; +} + +export interface ApiChartVersionsV3GetRequest { + chart?: string; + chartVersion?: string; + createdAt?: Date; + description?: string; + id?: number; + parentChartVersion?: string; + updatedAt?: Date; + limit?: number; + offset?: number; +} + +export interface ApiChartVersionsV3PostRequest { + chartVersion: SherlockChartVersionV3Create; +} + +export interface ApiChartVersionsV3SelectorGetRequest { + selector: string; +} + +export interface ApiChartVersionsV3SelectorPatchRequest { + selector: string; + chartVersion: SherlockChartVersionV3Edit; +} + export interface ApiV2ChartVersionsGetRequest { chart?: string; chartVersion?: string; @@ -74,6 +116,220 @@ export interface ApiV2SelectorsChartVersionsSelectorGetRequest { */ export class ChartVersionsApi extends runtime.BaseAPI { + /** + * Get the path through parent references from a child ChartVersion (inclusive) to a parent ChartVersion (exclusive), if possible. Because parent references point from newer children to older parents, the newer ChartVersion should be the child. The result will always exclude the parent. + * Get a changelog between two ChartVersions + */ + async apiChartVersionsProceduresV3ChangelogGetRaw(requestParameters: ApiChartVersionsProceduresV3ChangelogGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.child === null || requestParameters.child === undefined) { + throw new runtime.RequiredError('child','Required parameter requestParameters.child was null or undefined when calling apiChartVersionsProceduresV3ChangelogGet.'); + } + + if (requestParameters.parent === null || requestParameters.parent === undefined) { + throw new runtime.RequiredError('parent','Required parameter requestParameters.parent was null or undefined when calling apiChartVersionsProceduresV3ChangelogGet.'); + } + + const queryParameters: any = {}; + + if (requestParameters.child !== undefined) { + queryParameters['child'] = requestParameters.child; + } + + if (requestParameters.parent !== undefined) { + queryParameters['parent'] = requestParameters.parent; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api/chart-versions/procedures/v3/changelog`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SherlockChartVersionV3ChangelogResponseFromJSON(jsonValue)); + } + + /** + * Get the path through parent references from a child ChartVersion (inclusive) to a parent ChartVersion (exclusive), if possible. Because parent references point from newer children to older parents, the newer ChartVersion should be the child. The result will always exclude the parent. + * Get a changelog between two ChartVersions + */ + async apiChartVersionsProceduresV3ChangelogGet(requestParameters: ApiChartVersionsProceduresV3ChangelogGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiChartVersionsProceduresV3ChangelogGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List ChartVersions matching a filter. + * List ChartVersions matching a filter + */ + async apiChartVersionsV3GetRaw(requestParameters: ApiChartVersionsV3GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters.chart !== undefined) { + queryParameters['chart'] = requestParameters.chart; + } + + if (requestParameters.chartVersion !== undefined) { + queryParameters['chartVersion'] = requestParameters.chartVersion; + } + + if (requestParameters.createdAt !== undefined) { + queryParameters['createdAt'] = (requestParameters.createdAt as any).toISOString(); + } + + if (requestParameters.description !== undefined) { + queryParameters['description'] = requestParameters.description; + } + + if (requestParameters.id !== undefined) { + queryParameters['id'] = requestParameters.id; + } + + if (requestParameters.parentChartVersion !== undefined) { + queryParameters['parentChartVersion'] = requestParameters.parentChartVersion; + } + + if (requestParameters.updatedAt !== undefined) { + queryParameters['updatedAt'] = (requestParameters.updatedAt as any).toISOString(); + } + + if (requestParameters.limit !== undefined) { + queryParameters['limit'] = requestParameters.limit; + } + + if (requestParameters.offset !== undefined) { + queryParameters['offset'] = requestParameters.offset; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api/chart-versions/v3`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SherlockChartVersionV3FromJSON)); + } + + /** + * List ChartVersions matching a filter. + * List ChartVersions matching a filter + */ + async apiChartVersionsV3Get(requestParameters: ApiChartVersionsV3GetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.apiChartVersionsV3GetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Upsert a ChartVersion. + * Upsert a ChartVersion + */ + async apiChartVersionsV3PostRaw(requestParameters: ApiChartVersionsV3PostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.chartVersion === null || requestParameters.chartVersion === undefined) { + throw new runtime.RequiredError('chartVersion','Required parameter requestParameters.chartVersion was null or undefined when calling apiChartVersionsV3Post.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/chartVersions/v3`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SherlockChartVersionV3CreateToJSON(requestParameters.chartVersion), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SherlockChartVersionV3FromJSON(jsonValue)); + } + + /** + * Upsert a ChartVersion. + * Upsert a ChartVersion + */ + async apiChartVersionsV3Post(requestParameters: ApiChartVersionsV3PostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiChartVersionsV3PostRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get an individual ChartVersion. + * Get an individual ChartVersion + */ + async apiChartVersionsV3SelectorGetRaw(requestParameters: ApiChartVersionsV3SelectorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.selector === null || requestParameters.selector === undefined) { + throw new runtime.RequiredError('selector','Required parameter requestParameters.selector was null or undefined when calling apiChartVersionsV3SelectorGet.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api/chart-versions/v3/{selector}`.replace(`{${"selector"}}`, encodeURIComponent(String(requestParameters.selector))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SherlockChartVersionV3FromJSON(jsonValue)); + } + + /** + * Get an individual ChartVersion. + * Get an individual ChartVersion + */ + async apiChartVersionsV3SelectorGet(requestParameters: ApiChartVersionsV3SelectorGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiChartVersionsV3SelectorGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Edit an individual ChartVersion. + * Edit an individual ChartVersion + */ + async apiChartVersionsV3SelectorPatchRaw(requestParameters: ApiChartVersionsV3SelectorPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.selector === null || requestParameters.selector === undefined) { + throw new runtime.RequiredError('selector','Required parameter requestParameters.selector was null or undefined when calling apiChartVersionsV3SelectorPatch.'); + } + + if (requestParameters.chartVersion === null || requestParameters.chartVersion === undefined) { + throw new runtime.RequiredError('chartVersion','Required parameter requestParameters.chartVersion was null or undefined when calling apiChartVersionsV3SelectorPatch.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/api/chart-versions/v3/{selector}`.replace(`{${"selector"}}`, encodeURIComponent(String(requestParameters.selector))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: SherlockChartVersionV3EditToJSON(requestParameters.chartVersion), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SherlockChartVersionV3FromJSON(jsonValue)); + } + + /** + * Edit an individual ChartVersion. + * Edit an individual ChartVersion + */ + async apiChartVersionsV3SelectorPatch(requestParameters: ApiChartVersionsV3SelectorPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.apiChartVersionsV3SelectorPatchRaw(requestParameters, initOverrides); + return await response.value(); + } + /** * List existing ChartVersion entries, ordered by most recently updated. * List ChartVersion entries diff --git a/sherlock-typescript-client/src/models/SherlockChartVersionV3.ts b/sherlock-typescript-client/src/models/SherlockChartVersionV3.ts new file mode 100644 index 000000000..6a9572994 --- /dev/null +++ b/sherlock-typescript-client/src/models/SherlockChartVersionV3.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Sherlock + * The Data Science Platform\'s source-of-truth service. Note: this API will try to load and return associations in responses, so clients won\'t need to make as many requests. This behavior isn\'t recursive, though, so associations of associations are *not* fully loaded (even if it might seem that way from looking at the data types). + * + * The version of the OpenAPI document: development + * Contact: dsp-devops@broadinstitute.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SherlockChartV3 } from './SherlockChartV3'; +import { + SherlockChartV3FromJSON, + SherlockChartV3FromJSONTyped, + SherlockChartV3ToJSON, +} from './SherlockChartV3'; +import type { SherlockCiIdentifierV3 } from './SherlockCiIdentifierV3'; +import { + SherlockCiIdentifierV3FromJSON, + SherlockCiIdentifierV3FromJSONTyped, + SherlockCiIdentifierV3ToJSON, +} from './SherlockCiIdentifierV3'; + +/** + * + * @export + * @interface SherlockChartVersionV3 + */ +export interface SherlockChartVersionV3 { + /** + * Required when creating + * @type {string} + * @memberof SherlockChartVersionV3 + */ + chart?: string; + /** + * + * @type {SherlockChartV3} + * @memberof SherlockChartVersionV3 + */ + chartInfo?: SherlockChartV3; + /** + * Required when creating + * @type {string} + * @memberof SherlockChartVersionV3 + */ + chartVersion?: string; + /** + * + * @type {SherlockCiIdentifierV3} + * @memberof SherlockChartVersionV3 + */ + ciIdentifier?: SherlockCiIdentifierV3; + /** + * + * @type {Date} + * @memberof SherlockChartVersionV3 + */ + createdAt?: Date; + /** + * Generally the Git commit message + * @type {string} + * @memberof SherlockChartVersionV3 + */ + description?: string; + /** + * + * @type {number} + * @memberof SherlockChartVersionV3 + */ + id?: number; + /** + * + * @type {string} + * @memberof SherlockChartVersionV3 + */ + parentChartVersion?: string; + /** + * + * @type {object} + * @memberof SherlockChartVersionV3 + */ + parentChartVersionInfo?: object; + /** + * + * @type {Date} + * @memberof SherlockChartVersionV3 + */ + updatedAt?: Date; +} + +/** + * Check if a given object implements the SherlockChartVersionV3 interface. + */ +export function instanceOfSherlockChartVersionV3(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function SherlockChartVersionV3FromJSON(json: any): SherlockChartVersionV3 { + return SherlockChartVersionV3FromJSONTyped(json, false); +} + +export function SherlockChartVersionV3FromJSONTyped(json: any, ignoreDiscriminator: boolean): SherlockChartVersionV3 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'chart': !exists(json, 'chart') ? undefined : json['chart'], + 'chartInfo': !exists(json, 'chartInfo') ? undefined : SherlockChartV3FromJSON(json['chartInfo']), + 'chartVersion': !exists(json, 'chartVersion') ? undefined : json['chartVersion'], + 'ciIdentifier': !exists(json, 'ciIdentifier') ? undefined : SherlockCiIdentifierV3FromJSON(json['ciIdentifier']), + 'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])), + 'description': !exists(json, 'description') ? undefined : json['description'], + 'id': !exists(json, 'id') ? undefined : json['id'], + 'parentChartVersion': !exists(json, 'parentChartVersion') ? undefined : json['parentChartVersion'], + 'parentChartVersionInfo': !exists(json, 'parentChartVersionInfo') ? undefined : json['parentChartVersionInfo'], + 'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])), + }; +} + +export function SherlockChartVersionV3ToJSON(value?: SherlockChartVersionV3 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'chart': value.chart, + 'chartInfo': SherlockChartV3ToJSON(value.chartInfo), + 'chartVersion': value.chartVersion, + 'ciIdentifier': SherlockCiIdentifierV3ToJSON(value.ciIdentifier), + 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()), + 'description': value.description, + 'id': value.id, + 'parentChartVersion': value.parentChartVersion, + 'parentChartVersionInfo': value.parentChartVersionInfo, + 'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()), + }; +} + diff --git a/sherlock-typescript-client/src/models/SherlockChartVersionV3ChangelogResponse.ts b/sherlock-typescript-client/src/models/SherlockChartVersionV3ChangelogResponse.ts new file mode 100644 index 000000000..e67b35d0d --- /dev/null +++ b/sherlock-typescript-client/src/models/SherlockChartVersionV3ChangelogResponse.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Sherlock + * The Data Science Platform\'s source-of-truth service. Note: this API will try to load and return associations in responses, so clients won\'t need to make as many requests. This behavior isn\'t recursive, though, so associations of associations are *not* fully loaded (even if it might seem that way from looking at the data types). + * + * The version of the OpenAPI document: development + * Contact: dsp-devops@broadinstitute.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SherlockChartVersionV3 } from './SherlockChartVersionV3'; +import { + SherlockChartVersionV3FromJSON, + SherlockChartVersionV3FromJSONTyped, + SherlockChartVersionV3ToJSON, +} from './SherlockChartVersionV3'; + +/** + * + * @export + * @interface SherlockChartVersionV3ChangelogResponse + */ +export interface SherlockChartVersionV3ChangelogResponse { + /** + * + * @type {Array} + * @memberof SherlockChartVersionV3ChangelogResponse + */ + changelog?: Array; + /** + * + * @type {boolean} + * @memberof SherlockChartVersionV3ChangelogResponse + */ + complete?: boolean; +} + +/** + * Check if a given object implements the SherlockChartVersionV3ChangelogResponse interface. + */ +export function instanceOfSherlockChartVersionV3ChangelogResponse(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function SherlockChartVersionV3ChangelogResponseFromJSON(json: any): SherlockChartVersionV3ChangelogResponse { + return SherlockChartVersionV3ChangelogResponseFromJSONTyped(json, false); +} + +export function SherlockChartVersionV3ChangelogResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SherlockChartVersionV3ChangelogResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'changelog': !exists(json, 'changelog') ? undefined : ((json['changelog'] as Array).map(SherlockChartVersionV3FromJSON)), + 'complete': !exists(json, 'complete') ? undefined : json['complete'], + }; +} + +export function SherlockChartVersionV3ChangelogResponseToJSON(value?: SherlockChartVersionV3ChangelogResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'changelog': value.changelog === undefined ? undefined : ((value.changelog as Array).map(SherlockChartVersionV3ToJSON)), + 'complete': value.complete, + }; +} + diff --git a/sherlock-typescript-client/src/models/SherlockChartVersionV3Create.ts b/sherlock-typescript-client/src/models/SherlockChartVersionV3Create.ts new file mode 100644 index 000000000..99a8b1ded --- /dev/null +++ b/sherlock-typescript-client/src/models/SherlockChartVersionV3Create.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Sherlock + * The Data Science Platform\'s source-of-truth service. Note: this API will try to load and return associations in responses, so clients won\'t need to make as many requests. This behavior isn\'t recursive, though, so associations of associations are *not* fully loaded (even if it might seem that way from looking at the data types). + * + * The version of the OpenAPI document: development + * Contact: dsp-devops@broadinstitute.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SherlockChartVersionV3Create + */ +export interface SherlockChartVersionV3Create { + /** + * Required when creating + * @type {string} + * @memberof SherlockChartVersionV3Create + */ + chart?: string; + /** + * Required when creating + * @type {string} + * @memberof SherlockChartVersionV3Create + */ + chartVersion?: string; + /** + * Generally the Git commit message + * @type {string} + * @memberof SherlockChartVersionV3Create + */ + description?: string; + /** + * + * @type {string} + * @memberof SherlockChartVersionV3Create + */ + parentChartVersion?: string; +} + +/** + * Check if a given object implements the SherlockChartVersionV3Create interface. + */ +export function instanceOfSherlockChartVersionV3Create(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function SherlockChartVersionV3CreateFromJSON(json: any): SherlockChartVersionV3Create { + return SherlockChartVersionV3CreateFromJSONTyped(json, false); +} + +export function SherlockChartVersionV3CreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SherlockChartVersionV3Create { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'chart': !exists(json, 'chart') ? undefined : json['chart'], + 'chartVersion': !exists(json, 'chartVersion') ? undefined : json['chartVersion'], + 'description': !exists(json, 'description') ? undefined : json['description'], + 'parentChartVersion': !exists(json, 'parentChartVersion') ? undefined : json['parentChartVersion'], + }; +} + +export function SherlockChartVersionV3CreateToJSON(value?: SherlockChartVersionV3Create | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'chart': value.chart, + 'chartVersion': value.chartVersion, + 'description': value.description, + 'parentChartVersion': value.parentChartVersion, + }; +} + diff --git a/sherlock-typescript-client/src/models/SherlockChartVersionV3Edit.ts b/sherlock-typescript-client/src/models/SherlockChartVersionV3Edit.ts new file mode 100644 index 000000000..4e09867bc --- /dev/null +++ b/sherlock-typescript-client/src/models/SherlockChartVersionV3Edit.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Sherlock + * The Data Science Platform\'s source-of-truth service. Note: this API will try to load and return associations in responses, so clients won\'t need to make as many requests. This behavior isn\'t recursive, though, so associations of associations are *not* fully loaded (even if it might seem that way from looking at the data types). + * + * The version of the OpenAPI document: development + * Contact: dsp-devops@broadinstitute.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface SherlockChartVersionV3Edit + */ +export interface SherlockChartVersionV3Edit { + /** + * Generally the Git commit message + * @type {string} + * @memberof SherlockChartVersionV3Edit + */ + description?: string; +} + +/** + * Check if a given object implements the SherlockChartVersionV3Edit interface. + */ +export function instanceOfSherlockChartVersionV3Edit(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function SherlockChartVersionV3EditFromJSON(json: any): SherlockChartVersionV3Edit { + return SherlockChartVersionV3EditFromJSONTyped(json, false); +} + +export function SherlockChartVersionV3EditFromJSONTyped(json: any, ignoreDiscriminator: boolean): SherlockChartVersionV3Edit { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'description': !exists(json, 'description') ? undefined : json['description'], + }; +} + +export function SherlockChartVersionV3EditToJSON(value?: SherlockChartVersionV3Edit | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'description': value.description, + }; +} + diff --git a/sherlock-typescript-client/src/models/index.ts b/sherlock-typescript-client/src/models/index.ts index c671ad1a3..a203f17dc 100644 --- a/sherlock-typescript-client/src/models/index.ts +++ b/sherlock-typescript-client/src/models/index.ts @@ -14,6 +14,10 @@ export * from './SherlockAppVersionV3Edit'; export * from './SherlockChartV3'; export * from './SherlockChartV3Create'; export * from './SherlockChartV3Edit'; +export * from './SherlockChartVersionV3'; +export * from './SherlockChartVersionV3ChangelogResponse'; +export * from './SherlockChartVersionV3Create'; +export * from './SherlockChartVersionV3Edit'; export * from './SherlockCiIdentifierV3'; export * from './SherlockCiRunV3'; export * from './SherlockCiRunV3Upsert'; diff --git a/sherlock/docs/docs.go b/sherlock/docs/docs.go index 58a883f43..d44f45cfa 100644 --- a/sherlock/docs/docs.go +++ b/sherlock/docs/docs.go @@ -430,6 +430,398 @@ const docTemplate = `{ } } }, + "/api/chart-versions/procedures/v3/changelog": { + "get": { + "description": "Get the path through parent references from a child ChartVersion (inclusive) to a parent ChartVersion (exclusive), if possible. Because parent references point from newer children to older parents, the newer ChartVersion should be the child. The result will always exclude the parent.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Get a changelog between two ChartVersions", + "parameters": [ + { + "type": "string", + "description": "The selector of the newer ChartVersion for the changelog", + "name": "child", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "The selector of the older ChartVersion for the changelog", + "name": "parent", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3ChangelogResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, + "/api/chart-versions/v3": { + "get": { + "description": "List ChartVersions matching a filter.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "List ChartVersions matching a filter", + "parameters": [ + { + "type": "string", + "description": "Required when creating", + "name": "chart", + "in": "query" + }, + { + "type": "string", + "description": "Required when creating", + "name": "chartVersion", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", + "description": "Generally the Git commit message", + "name": "description", + "in": "query" + }, + { + "type": "integer", + "name": "id", + "in": "query" + }, + { + "type": "string", + "name": "parentChartVersion", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "name": "updatedAt", + "in": "query" + }, + { + "type": "integer", + "description": "Control how many ChartVersions are returned (default 100)", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "Control the offset for the returned ChartVersions (default 0)", + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, + "/api/chart-versions/v3/{selector}": { + "get": { + "description": "Get an individual ChartVersion.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Get an individual ChartVersion", + "parameters": [ + { + "type": "string", + "description": "The selector of the ChartVersion, which can be either a numeric ID or chart/version.", + "name": "selector", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + }, + "patch": { + "description": "Edit an individual ChartVersion.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Edit an individual ChartVersion", + "parameters": [ + { + "type": "string", + "description": "The selector of the ChartVersion, which can be either a numeric ID or chart/version.", + "name": "selector", + "in": "path", + "required": true + }, + { + "description": "The edits to make to the ChartVersion", + "name": "chartVersion", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3Edit" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, + "/api/chartVersions/v3": { + "post": { + "description": "Upsert a ChartVersion.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Upsert a ChartVersion", + "parameters": [ + { + "description": "The ChartVersion to upsert", + "name": "chartVersion", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3Create" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, "/api/charts/v3": { "get": { "description": "List Charts matching a filter.", @@ -10015,6 +10407,89 @@ const docTemplate = `{ } } }, + "sherlock.ChartVersionV3": { + "type": "object", + "properties": { + "chart": { + "description": "Required when creating", + "type": "string" + }, + "chartInfo": { + "$ref": "#/definitions/sherlock.ChartV3" + }, + "chartVersion": { + "description": "Required when creating", + "type": "string" + }, + "ciIdentifier": { + "$ref": "#/definitions/sherlock.CiIdentifierV3" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "description": { + "description": "Generally the Git commit message", + "type": "string" + }, + "id": { + "type": "integer" + }, + "parentChartVersion": { + "type": "string" + }, + "parentChartVersionInfo": { + "type": "object" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "sherlock.ChartVersionV3ChangelogResponse": { + "type": "object", + "properties": { + "changelog": { + "type": "array", + "items": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "complete": { + "type": "boolean" + } + } + }, + "sherlock.ChartVersionV3Create": { + "type": "object", + "properties": { + "chart": { + "description": "Required when creating", + "type": "string" + }, + "chartVersion": { + "description": "Required when creating", + "type": "string" + }, + "description": { + "description": "Generally the Git commit message", + "type": "string" + }, + "parentChartVersion": { + "type": "string" + } + } + }, + "sherlock.ChartVersionV3Edit": { + "type": "object", + "properties": { + "description": { + "description": "Generally the Git commit message", + "type": "string" + } + } + }, "sherlock.CiIdentifierV3": { "type": "object", "properties": { diff --git a/sherlock/docs/swagger.json b/sherlock/docs/swagger.json index d26c08cf4..3b481aa53 100644 --- a/sherlock/docs/swagger.json +++ b/sherlock/docs/swagger.json @@ -426,6 +426,398 @@ } } }, + "/api/chart-versions/procedures/v3/changelog": { + "get": { + "description": "Get the path through parent references from a child ChartVersion (inclusive) to a parent ChartVersion (exclusive), if possible. Because parent references point from newer children to older parents, the newer ChartVersion should be the child. The result will always exclude the parent.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Get a changelog between two ChartVersions", + "parameters": [ + { + "type": "string", + "description": "The selector of the newer ChartVersion for the changelog", + "name": "child", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "The selector of the older ChartVersion for the changelog", + "name": "parent", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3ChangelogResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, + "/api/chart-versions/v3": { + "get": { + "description": "List ChartVersions matching a filter.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "List ChartVersions matching a filter", + "parameters": [ + { + "type": "string", + "description": "Required when creating", + "name": "chart", + "in": "query" + }, + { + "type": "string", + "description": "Required when creating", + "name": "chartVersion", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "name": "createdAt", + "in": "query" + }, + { + "type": "string", + "description": "Generally the Git commit message", + "name": "description", + "in": "query" + }, + { + "type": "integer", + "name": "id", + "in": "query" + }, + { + "type": "string", + "name": "parentChartVersion", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "name": "updatedAt", + "in": "query" + }, + { + "type": "integer", + "description": "Control how many ChartVersions are returned (default 100)", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "Control the offset for the returned ChartVersions (default 0)", + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, + "/api/chart-versions/v3/{selector}": { + "get": { + "description": "Get an individual ChartVersion.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Get an individual ChartVersion", + "parameters": [ + { + "type": "string", + "description": "The selector of the ChartVersion, which can be either a numeric ID or chart/version.", + "name": "selector", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + }, + "patch": { + "description": "Edit an individual ChartVersion.", + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Edit an individual ChartVersion", + "parameters": [ + { + "type": "string", + "description": "The selector of the ChartVersion, which can be either a numeric ID or chart/version.", + "name": "selector", + "in": "path", + "required": true + }, + { + "description": "The edits to make to the ChartVersion", + "name": "chartVersion", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3Edit" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, + "/api/chartVersions/v3": { + "post": { + "description": "Upsert a ChartVersion.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "ChartVersions" + ], + "summary": "Upsert a ChartVersion", + "parameters": [ + { + "description": "The ChartVersion to upsert", + "name": "chartVersion", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3Create" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "407": { + "description": "Proxy Authentication Required", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "409": { + "description": "Conflict", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/errors.ErrorResponse" + } + } + } + } + }, "/api/charts/v3": { "get": { "description": "List Charts matching a filter.", @@ -10011,6 +10403,89 @@ } } }, + "sherlock.ChartVersionV3": { + "type": "object", + "properties": { + "chart": { + "description": "Required when creating", + "type": "string" + }, + "chartInfo": { + "$ref": "#/definitions/sherlock.ChartV3" + }, + "chartVersion": { + "description": "Required when creating", + "type": "string" + }, + "ciIdentifier": { + "$ref": "#/definitions/sherlock.CiIdentifierV3" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "description": { + "description": "Generally the Git commit message", + "type": "string" + }, + "id": { + "type": "integer" + }, + "parentChartVersion": { + "type": "string" + }, + "parentChartVersionInfo": { + "type": "object" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "sherlock.ChartVersionV3ChangelogResponse": { + "type": "object", + "properties": { + "changelog": { + "type": "array", + "items": { + "$ref": "#/definitions/sherlock.ChartVersionV3" + } + }, + "complete": { + "type": "boolean" + } + } + }, + "sherlock.ChartVersionV3Create": { + "type": "object", + "properties": { + "chart": { + "description": "Required when creating", + "type": "string" + }, + "chartVersion": { + "description": "Required when creating", + "type": "string" + }, + "description": { + "description": "Generally the Git commit message", + "type": "string" + }, + "parentChartVersion": { + "type": "string" + } + } + }, + "sherlock.ChartVersionV3Edit": { + "type": "object", + "properties": { + "description": { + "description": "Generally the Git commit message", + "type": "string" + } + } + }, "sherlock.CiIdentifierV3": { "type": "object", "properties": { diff --git a/sherlock/docs/swagger.yaml b/sherlock/docs/swagger.yaml index bc2a8c65e..dc29b7572 100644 --- a/sherlock/docs/swagger.yaml +++ b/sherlock/docs/swagger.yaml @@ -239,6 +239,63 @@ definitions: playbookURL: type: string type: object + sherlock.ChartVersionV3: + properties: + chart: + description: Required when creating + type: string + chartInfo: + $ref: '#/definitions/sherlock.ChartV3' + chartVersion: + description: Required when creating + type: string + ciIdentifier: + $ref: '#/definitions/sherlock.CiIdentifierV3' + createdAt: + format: date-time + type: string + description: + description: Generally the Git commit message + type: string + id: + type: integer + parentChartVersion: + type: string + parentChartVersionInfo: + type: object + updatedAt: + format: date-time + type: string + type: object + sherlock.ChartVersionV3ChangelogResponse: + properties: + changelog: + items: + $ref: '#/definitions/sherlock.ChartVersionV3' + type: array + complete: + type: boolean + type: object + sherlock.ChartVersionV3Create: + properties: + chart: + description: Required when creating + type: string + chartVersion: + description: Required when creating + type: string + description: + description: Generally the Git commit message + type: string + parentChartVersion: + type: string + type: object + sherlock.ChartVersionV3Edit: + properties: + description: + description: Generally the Git commit message + type: string + type: object sherlock.CiIdentifierV3: properties: ciRuns: @@ -2266,6 +2323,270 @@ paths: summary: Upsert a AppVersion tags: - AppVersions + /api/chart-versions/procedures/v3/changelog: + get: + description: Get the path through parent references from a child ChartVersion + (inclusive) to a parent ChartVersion (exclusive), if possible. Because parent + references point from newer children to older parents, the newer ChartVersion + should be the child. The result will always exclude the parent. + parameters: + - description: The selector of the newer ChartVersion for the changelog + in: query + name: child + required: true + type: string + - description: The selector of the older ChartVersion for the changelog + in: query + name: parent + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/sherlock.ChartVersionV3ChangelogResponse' + "400": + description: Bad Request + schema: + $ref: '#/definitions/errors.ErrorResponse' + "403": + description: Forbidden + schema: + $ref: '#/definitions/errors.ErrorResponse' + "404": + description: Not Found + schema: + $ref: '#/definitions/errors.ErrorResponse' + "407": + description: Proxy Authentication Required + schema: + $ref: '#/definitions/errors.ErrorResponse' + "409": + description: Conflict + schema: + $ref: '#/definitions/errors.ErrorResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/errors.ErrorResponse' + summary: Get a changelog between two ChartVersions + tags: + - ChartVersions + /api/chart-versions/v3: + get: + description: List ChartVersions matching a filter. + parameters: + - description: Required when creating + in: query + name: chart + type: string + - description: Required when creating + in: query + name: chartVersion + type: string + - format: date-time + in: query + name: createdAt + type: string + - description: Generally the Git commit message + in: query + name: description + type: string + - in: query + name: id + type: integer + - in: query + name: parentChartVersion + type: string + - format: date-time + in: query + name: updatedAt + type: string + - description: Control how many ChartVersions are returned (default 100) + in: query + name: limit + type: integer + - description: Control the offset for the returned ChartVersions (default 0) + in: query + name: offset + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/sherlock.ChartVersionV3' + type: array + "400": + description: Bad Request + schema: + $ref: '#/definitions/errors.ErrorResponse' + "403": + description: Forbidden + schema: + $ref: '#/definitions/errors.ErrorResponse' + "404": + description: Not Found + schema: + $ref: '#/definitions/errors.ErrorResponse' + "407": + description: Proxy Authentication Required + schema: + $ref: '#/definitions/errors.ErrorResponse' + "409": + description: Conflict + schema: + $ref: '#/definitions/errors.ErrorResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/errors.ErrorResponse' + summary: List ChartVersions matching a filter + tags: + - ChartVersions + /api/chart-versions/v3/{selector}: + get: + description: Get an individual ChartVersion. + parameters: + - description: The selector of the ChartVersion, which can be either a numeric + ID or chart/version. + in: path + name: selector + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/sherlock.ChartVersionV3' + "400": + description: Bad Request + schema: + $ref: '#/definitions/errors.ErrorResponse' + "403": + description: Forbidden + schema: + $ref: '#/definitions/errors.ErrorResponse' + "404": + description: Not Found + schema: + $ref: '#/definitions/errors.ErrorResponse' + "407": + description: Proxy Authentication Required + schema: + $ref: '#/definitions/errors.ErrorResponse' + "409": + description: Conflict + schema: + $ref: '#/definitions/errors.ErrorResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/errors.ErrorResponse' + summary: Get an individual ChartVersion + tags: + - ChartVersions + patch: + description: Edit an individual ChartVersion. + parameters: + - description: The selector of the ChartVersion, which can be either a numeric + ID or chart/version. + in: path + name: selector + required: true + type: string + - description: The edits to make to the ChartVersion + in: body + name: chartVersion + required: true + schema: + $ref: '#/definitions/sherlock.ChartVersionV3Edit' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/sherlock.ChartVersionV3' + "400": + description: Bad Request + schema: + $ref: '#/definitions/errors.ErrorResponse' + "403": + description: Forbidden + schema: + $ref: '#/definitions/errors.ErrorResponse' + "404": + description: Not Found + schema: + $ref: '#/definitions/errors.ErrorResponse' + "407": + description: Proxy Authentication Required + schema: + $ref: '#/definitions/errors.ErrorResponse' + "409": + description: Conflict + schema: + $ref: '#/definitions/errors.ErrorResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/errors.ErrorResponse' + summary: Edit an individual ChartVersion + tags: + - ChartVersions + /api/chartVersions/v3: + post: + consumes: + - application/json + description: Upsert a ChartVersion. + parameters: + - description: The ChartVersion to upsert + in: body + name: chartVersion + required: true + schema: + $ref: '#/definitions/sherlock.ChartVersionV3Create' + produces: + - application/json + responses: + "201": + description: Created + schema: + $ref: '#/definitions/sherlock.ChartVersionV3' + "400": + description: Bad Request + schema: + $ref: '#/definitions/errors.ErrorResponse' + "403": + description: Forbidden + schema: + $ref: '#/definitions/errors.ErrorResponse' + "404": + description: Not Found + schema: + $ref: '#/definitions/errors.ErrorResponse' + "407": + description: Proxy Authentication Required + schema: + $ref: '#/definitions/errors.ErrorResponse' + "409": + description: Conflict + schema: + $ref: '#/definitions/errors.ErrorResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/errors.ErrorResponse' + summary: Upsert a ChartVersion + tags: + - ChartVersions /api/charts/v3: get: description: List Charts matching a filter. diff --git a/sherlock/internal/api/sherlock/chart_version_procedures_v3_changelog.go b/sherlock/internal/api/sherlock/chart_version_procedures_v3_changelog.go index 134f16be7..18c2eb6cf 100644 --- a/sherlock/internal/api/sherlock/chart_version_procedures_v3_changelog.go +++ b/sherlock/internal/api/sherlock/chart_version_procedures_v3_changelog.go @@ -24,7 +24,7 @@ type ChartVersionV3ChangelogResponse struct { // @produce json // @param child query string true "The selector of the newer ChartVersion for the changelog" // @param parent query string true "The selector of the older ChartVersion for the changelog" -// @success 200 {object} ChartVersionV3ChangelogResponse +// @success 200 {object} ChartVersionV3ChangelogResponse // @failure 400,403,404,407,409,500 {object} errors.ErrorResponse // @router /api/chart-versions/procedures/v3/changelog [get] func chartVersionsProceduresV3Changelog(ctx *gin.Context) { diff --git a/sherlock/internal/api/sherlock/chart_version_v3_list.go b/sherlock/internal/api/sherlock/chart_version_v3_list.go index 13fa3e21a..9a1521185 100644 --- a/sherlock/internal/api/sherlock/chart_version_v3_list.go +++ b/sherlock/internal/api/sherlock/chart_version_v3_list.go @@ -17,8 +17,8 @@ import ( // @tags ChartVersions // @produce json // @param filter query ChartVersionV3 false "Filter the returned ChartVersions" -// @param limit query int false "Control how many ChartVersions are returned (default 100)" -// @param offset query int false "Control the offset for the returned ChartVersions (default 0)" +// @param limit query int false "Control how many ChartVersions are returned (default 100)" +// @param offset query int false "Control the offset for the returned ChartVersions (default 0)" // @success 200 {array} ChartVersionV3 // @failure 400,403,404,407,409,500 {object} errors.ErrorResponse // @router /api/chart-versions/v3 [get] diff --git a/sherlock/internal/api/sherlock/chart_version_v3_upsert.go b/sherlock/internal/api/sherlock/chart_version_v3_upsert.go index 70af44ce4..db39bb48d 100644 --- a/sherlock/internal/api/sherlock/chart_version_v3_upsert.go +++ b/sherlock/internal/api/sherlock/chart_version_v3_upsert.go @@ -18,7 +18,7 @@ import ( // @tags ChartVersions // @accept json // @produce json -// @param chartVersion body ChartVersionV3Create true "The ChartVersion to upsert" +// @param chartVersion body ChartVersionV3Create true "The ChartVersion to upsert" // @success 201 {object} ChartVersionV3 // @failure 400,403,404,407,409,500 {object} errors.ErrorResponse // @router /api/chartVersions/v3 [post]