Skip to content

Commit 2f6c033

Browse files
author
Keerthan Mala
committed
update the makefile to use the actual spec and regenerate the server stub
1 parent f1c957a commit 2f6c033

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build:
4646
${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE} goupx --strip-binary -9 ${BINARY_DEST_DIR}/${SHORT_NAME} || exit 1
4747

4848
swagger-serverstub:
49-
${SWAGGER_CMD} generate server -A WorkflowManager -t pkg/swagger -f https://raw.githubusercontent.com/deis/workflow-manager/swagger/api/swagger-spec/swagger.yml
49+
${SWAGGER_CMD} generate server -A WorkflowManager -t pkg/swagger -f https://raw.githubusercontent.com/deis/workflow-manager/master/api/swagger-spec/swagger.yml
5050

5151
test:
5252
${DEV_ENV_CMD} sh -c 'go test -tags testonly $$(glide nv)'

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-
http
54
https
5+
http
66
Host: localhost
77
BasePath: /
88
Version: 1.0.0

pkg/swagger/restapi/operations/get_components_by_latest_release.go

+22-22
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,19 @@ func (o *GetComponentsByLatestRelease) ServeHTTP(rw http.ResponseWriter, r *http
5757

5858
}
5959

60-
/*GetComponentsByLatestReleaseOKBodyBody get components by latest release o k body body
60+
/*GetComponentsByLatestReleaseBody get components by latest release body
6161
62-
swagger:model GetComponentsByLatestReleaseOKBodyBody
62+
swagger:model GetComponentsByLatestReleaseBody
6363
*/
64-
type GetComponentsByLatestReleaseOKBodyBody struct {
64+
type GetComponentsByLatestReleaseBody struct {
6565

6666
/* data
67-
68-
Required: true
69-
*/
70-
Data []*models.ComponentDetail `json:"data"`
67+
*/
68+
Data []*models.ComponentDetail `json:"data,omitempty"`
7169
}
7270

73-
// Validate validates this get components by latest release o k body body
74-
func (o *GetComponentsByLatestReleaseOKBodyBody) Validate(formats strfmt.Registry) error {
71+
// Validate validates this get components by latest release body
72+
func (o *GetComponentsByLatestReleaseBody) Validate(formats strfmt.Registry) error {
7573
var res []error
7674

7775
if err := o.validateData(formats); err != nil {
@@ -85,10 +83,10 @@ func (o *GetComponentsByLatestReleaseOKBodyBody) Validate(formats strfmt.Registr
8583
return nil
8684
}
8785

88-
func (o *GetComponentsByLatestReleaseOKBodyBody) validateData(formats strfmt.Registry) error {
86+
func (o *GetComponentsByLatestReleaseBody) validateData(formats strfmt.Registry) error {
8987

90-
if err := validate.Required("getComponentsByLatestReleaseOK"+"."+"data", "body", o.Data); err != nil {
91-
return err
88+
if swag.IsZero(o.Data) { // not required
89+
return nil
9290
}
9391

9492
for i := 0; i < len(o.Data); i++ {
@@ -105,19 +103,21 @@ func (o *GetComponentsByLatestReleaseOKBodyBody) validateData(formats strfmt.Reg
105103
return nil
106104
}
107105

108-
/*GetComponentsByLatestReleaseBody get components by latest release body
106+
/*GetComponentsByLatestReleaseOKBodyBody get components by latest release o k body body
109107
110-
swagger:model GetComponentsByLatestReleaseBody
108+
swagger:model GetComponentsByLatestReleaseOKBodyBody
111109
*/
112-
type GetComponentsByLatestReleaseBody struct {
110+
type GetComponentsByLatestReleaseOKBodyBody struct {
113111

114112
/* data
115-
*/
116-
Data []*models.ComponentDetail `json:"data,omitempty"`
113+
114+
Required: true
115+
*/
116+
Data []*models.ComponentDetail `json:"data"`
117117
}
118118

119-
// Validate validates this get components by latest release body
120-
func (o *GetComponentsByLatestReleaseBody) Validate(formats strfmt.Registry) error {
119+
// Validate validates this get components by latest release o k body body
120+
func (o *GetComponentsByLatestReleaseOKBodyBody) Validate(formats strfmt.Registry) error {
121121
var res []error
122122

123123
if err := o.validateData(formats); err != nil {
@@ -131,10 +131,10 @@ func (o *GetComponentsByLatestReleaseBody) Validate(formats strfmt.Registry) err
131131
return nil
132132
}
133133

134-
func (o *GetComponentsByLatestReleaseBody) validateData(formats strfmt.Registry) error {
134+
func (o *GetComponentsByLatestReleaseOKBodyBody) validateData(formats strfmt.Registry) error {
135135

136-
if swag.IsZero(o.Data) { // not required
137-
return nil
136+
if err := validate.Required("getComponentsByLatestReleaseOK"+"."+"data", "body", o.Data); err != nil {
137+
return err
138138
}
139139

140140
for i := 0; i < len(o.Data); i++ {

0 commit comments

Comments
 (0)