Skip to content

Commit dd2fb2a

Browse files
author
Keerthan Mala
committed
ref(swagger): update the server stubs according to the updated spec
1 parent 3fdab4f commit dd2fb2a

14 files changed

+42
-38
lines changed

pkg/swagger/models/cluster_detail.go pkg/swagger/models/cluster.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ import (
1010
"github.com/go-swagger/go-swagger/httpkit/validate"
1111
)
1212

13-
/*ClusterDetail cluster detail
13+
/*Cluster cluster
1414
15-
swagger:model clusterDetail
15+
swagger:model cluster
1616
*/
17-
type ClusterDetail struct {
17+
type Cluster struct {
1818

1919
/* components
2020
2121
Required: true
2222
*/
23-
Components []*ComponentDetail `json:"components"`
23+
Components []*ComponentVersion `json:"components"`
2424

2525
/* first seen
2626
*/
@@ -38,8 +38,8 @@ type ClusterDetail struct {
3838
LastSeen *strfmt.DateTime `json:"lastSeen,omitempty"`
3939
}
4040

41-
// Validate validates this cluster detail
42-
func (m *ClusterDetail) Validate(formats strfmt.Registry) error {
41+
// Validate validates this cluster
42+
func (m *Cluster) Validate(formats strfmt.Registry) error {
4343
var res []error
4444

4545
if err := m.validateComponents(formats); err != nil {
@@ -58,7 +58,7 @@ func (m *ClusterDetail) Validate(formats strfmt.Registry) error {
5858
return nil
5959
}
6060

61-
func (m *ClusterDetail) validateComponents(formats strfmt.Registry) error {
61+
func (m *Cluster) validateComponents(formats strfmt.Registry) error {
6262

6363
if err := validate.Required("components", "body", m.Components); err != nil {
6464
return err
@@ -78,7 +78,7 @@ func (m *ClusterDetail) validateComponents(formats strfmt.Registry) error {
7878
return nil
7979
}
8080

81-
func (m *ClusterDetail) validateID(formats strfmt.Registry) error {
81+
func (m *Cluster) validateID(formats strfmt.Registry) error {
8282

8383
if err := validate.RequiredString("id", "body", string(m.ID)); err != nil {
8484
return err

pkg/swagger/models/component_detail.go pkg/swagger/models/component_version.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@ import "github.com/go-swagger/go-swagger/strfmt"
55
// This file was generated by the swagger tool.
66
// Editing this file might prove futile when you re-run the swagger generate command
77

8-
/*ComponentDetail component detail
8+
/*ComponentVersion component version
99
10-
swagger:model componentDetail
10+
swagger:model componentVersion
1111
*/
12-
type ComponentDetail struct {
12+
type ComponentVersion struct {
1313

1414
/* component
1515
*/
1616
Component *Component `json:"component,omitempty"`
1717

18+
/* update available
19+
*/
20+
UpdateAvailable *string `json:"updateAvailable,omitempty"`
21+
1822
/* version
1923
*/
2024
Version *Version `json:"version,omitempty"`
2125
}
2226

23-
// Validate validates this component detail
24-
func (m *ComponentDetail) Validate(formats strfmt.Registry) error {
27+
// Validate validates this component version
28+
func (m *ComponentVersion) Validate(formats strfmt.Registry) error {
2529
return nil
2630
}

pkg/swagger/restapi/doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*Package restapi Workflow Manager
22
33
Schemes:
4-
https
54
http
5+
https
66
Host: localhost
77
BasePath: /
88
Version: 1.0.0

pkg/swagger/restapi/embedded_spec.go

+1-1
Large diffs are not rendered by default.

pkg/swagger/restapi/operations/create_cluster_details_parameters.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type CreateClusterDetailsParams struct {
2727
/*
2828
In: body
2929
*/
30-
Body *models.ClusterDetail
30+
Body *models.Cluster
3131
}
3232

3333
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
@@ -36,7 +36,7 @@ func (o *CreateClusterDetailsParams) BindRequest(r *http.Request, route *middlew
3636
var res []error
3737

3838
defer r.Body.Close()
39-
var body models.ClusterDetail
39+
var body models.Cluster
4040
if err := route.Consumer.Consume(r.Body, &body); err != nil {
4141
res = append(res, errors.NewParseError("body", "body", "", err))
4242
} else {

pkg/swagger/restapi/operations/create_cluster_details_responses.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ swagger:response createClusterDetailsOK
1818
type CreateClusterDetailsOK struct {
1919

2020
// In: body
21-
Payload *models.ClusterDetail `json:"body,omitempty"`
21+
Payload *models.Cluster `json:"body,omitempty"`
2222
}
2323

2424
// NewCreateClusterDetailsOK creates CreateClusterDetailsOK with default headers values
@@ -27,13 +27,13 @@ func NewCreateClusterDetailsOK() *CreateClusterDetailsOK {
2727
}
2828

2929
// WithPayload adds the payload to the create cluster details o k response
30-
func (o *CreateClusterDetailsOK) WithPayload(payload *models.ClusterDetail) *CreateClusterDetailsOK {
30+
func (o *CreateClusterDetailsOK) WithPayload(payload *models.Cluster) *CreateClusterDetailsOK {
3131
o.Payload = payload
3232
return o
3333
}
3434

3535
// SetPayload sets the payload to the create cluster details o k response
36-
func (o *CreateClusterDetailsOK) SetPayload(payload *models.ClusterDetail) {
36+
func (o *CreateClusterDetailsOK) SetPayload(payload *models.Cluster) {
3737
o.Payload = payload
3838
}
3939

pkg/swagger/restapi/operations/get_cluster_by_id_responses.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ swagger:response getClusterByIdOK
1818
type GetClusterByIDOK struct {
1919

2020
// In: body
21-
Payload *models.ClusterDetail `json:"body,omitempty"`
21+
Payload *models.Cluster `json:"body,omitempty"`
2222
}
2323

2424
// NewGetClusterByIDOK creates GetClusterByIDOK with default headers values
@@ -27,13 +27,13 @@ func NewGetClusterByIDOK() *GetClusterByIDOK {
2727
}
2828

2929
// WithPayload adds the payload to the get cluster by id o k response
30-
func (o *GetClusterByIDOK) WithPayload(payload *models.ClusterDetail) *GetClusterByIDOK {
30+
func (o *GetClusterByIDOK) WithPayload(payload *models.Cluster) *GetClusterByIDOK {
3131
o.Payload = payload
3232
return o
3333
}
3434

3535
// SetPayload sets the payload to the get cluster by id o k response
36-
func (o *GetClusterByIDOK) SetPayload(payload *models.ClusterDetail) {
36+
func (o *GetClusterByIDOK) SetPayload(payload *models.Cluster) {
3737
o.Payload = payload
3838
}
3939

pkg/swagger/restapi/operations/get_clusters_by_age.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ type GetClustersByAgeOKBodyBody struct {
6666
6767
Required: true
6868
*/
69-
Data []*models.ClusterDetail `json:"data"`
69+
Data []*models.Cluster `json:"data"`
7070
}
7171

7272
// Validate validates this get clusters by age o k body body

pkg/swagger/restapi/operations/get_component_by_latest_release_responses.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ swagger:response getComponentByLatestReleaseOK
1818
type GetComponentByLatestReleaseOK struct {
1919

2020
// In: body
21-
Payload *models.ComponentDetail `json:"body,omitempty"`
21+
Payload *models.ComponentVersion `json:"body,omitempty"`
2222
}
2323

2424
// NewGetComponentByLatestReleaseOK creates GetComponentByLatestReleaseOK with default headers values
@@ -27,13 +27,13 @@ func NewGetComponentByLatestReleaseOK() *GetComponentByLatestReleaseOK {
2727
}
2828

2929
// WithPayload adds the payload to the get component by latest release o k response
30-
func (o *GetComponentByLatestReleaseOK) WithPayload(payload *models.ComponentDetail) *GetComponentByLatestReleaseOK {
30+
func (o *GetComponentByLatestReleaseOK) WithPayload(payload *models.ComponentVersion) *GetComponentByLatestReleaseOK {
3131
o.Payload = payload
3232
return o
3333
}
3434

3535
// SetPayload sets the payload to the get component by latest release o k response
36-
func (o *GetComponentByLatestReleaseOK) SetPayload(payload *models.ComponentDetail) {
36+
func (o *GetComponentByLatestReleaseOK) SetPayload(payload *models.ComponentVersion) {
3737
o.Payload = payload
3838
}
3939

pkg/swagger/restapi/operations/get_component_by_name.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ type GetComponentByNameOKBodyBody struct {
6666
6767
Required: true
6868
*/
69-
Data []*models.ComponentDetail `json:"data"`
69+
Data []*models.ComponentVersion `json:"data"`
7070
}
7171

7272
// Validate validates this get component by name o k body body

pkg/swagger/restapi/operations/get_component_by_release_responses.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ swagger:response getComponentByReleaseOK
1818
type GetComponentByReleaseOK struct {
1919

2020
// In: body
21-
Payload *models.ComponentDetail `json:"body,omitempty"`
21+
Payload *models.ComponentVersion `json:"body,omitempty"`
2222
}
2323

2424
// NewGetComponentByReleaseOK creates GetComponentByReleaseOK with default headers values
@@ -27,13 +27,13 @@ func NewGetComponentByReleaseOK() *GetComponentByReleaseOK {
2727
}
2828

2929
// WithPayload adds the payload to the get component by release o k response
30-
func (o *GetComponentByReleaseOK) WithPayload(payload *models.ComponentDetail) *GetComponentByReleaseOK {
30+
func (o *GetComponentByReleaseOK) WithPayload(payload *models.ComponentVersion) *GetComponentByReleaseOK {
3131
o.Payload = payload
3232
return o
3333
}
3434

3535
// SetPayload sets the payload to the get component by release o k response
36-
func (o *GetComponentByReleaseOK) SetPayload(payload *models.ComponentDetail) {
36+
func (o *GetComponentByReleaseOK) SetPayload(payload *models.ComponentVersion) {
3737
o.Payload = payload
3838
}
3939

pkg/swagger/restapi/operations/get_components_by_latest_release.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type GetComponentsByLatestReleaseBody struct {
6565

6666
/* data
6767
*/
68-
Data []*models.ComponentDetail `json:"data,omitempty"`
68+
Data []*models.ComponentVersion `json:"data,omitempty"`
6969
}
7070

7171
// Validate validates this get components by latest release body
@@ -113,7 +113,7 @@ type GetComponentsByLatestReleaseOKBodyBody struct {
113113
114114
Required: true
115115
*/
116-
Data []*models.ComponentDetail `json:"data"`
116+
Data []*models.ComponentVersion `json:"data"`
117117
}
118118

119119
// Validate validates this get components by latest release o k body body

pkg/swagger/restapi/operations/publish_component_release_parameters.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type PublishComponentReleaseParams struct {
2929
/*
3030
In: body
3131
*/
32-
Body *models.ComponentDetail
32+
Body *models.ComponentVersion
3333
/*A component is a single deis component, e.g., deis-router
3434
Required: true
3535
In: path
@@ -53,7 +53,7 @@ func (o *PublishComponentReleaseParams) BindRequest(r *http.Request, route *midd
5353
var res []error
5454

5555
defer r.Body.Close()
56-
var body models.ComponentDetail
56+
var body models.ComponentVersion
5757
if err := route.Consumer.Consume(r.Body, &body); err != nil {
5858
res = append(res, errors.NewParseError("body", "body", "", err))
5959
} else {

pkg/swagger/restapi/operations/publish_component_release_responses.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ swagger:response publishComponentReleaseOK
1818
type PublishComponentReleaseOK struct {
1919

2020
// In: body
21-
Payload *models.ComponentDetail `json:"body,omitempty"`
21+
Payload *models.ComponentVersion `json:"body,omitempty"`
2222
}
2323

2424
// NewPublishComponentReleaseOK creates PublishComponentReleaseOK with default headers values
@@ -27,13 +27,13 @@ func NewPublishComponentReleaseOK() *PublishComponentReleaseOK {
2727
}
2828

2929
// WithPayload adds the payload to the publish component release o k response
30-
func (o *PublishComponentReleaseOK) WithPayload(payload *models.ComponentDetail) *PublishComponentReleaseOK {
30+
func (o *PublishComponentReleaseOK) WithPayload(payload *models.ComponentVersion) *PublishComponentReleaseOK {
3131
o.Payload = payload
3232
return o
3333
}
3434

3535
// SetPayload sets the payload to the publish component release o k response
36-
func (o *PublishComponentReleaseOK) SetPayload(payload *models.ComponentDetail) {
36+
func (o *PublishComponentReleaseOK) SetPayload(payload *models.ComponentVersion) {
3737
o.Payload = payload
3838
}
3939

0 commit comments

Comments
 (0)