Generate ErrorResponse struct from swagger spec.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-10-06 12:40:38 -04:00
parent 84a39c0830
commit bc75738545
4 changed files with 176 additions and 163 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
package types
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
/*ErrorResponse Represents an error.
swagger:model ErrorResponse
*/
type ErrorResponse struct {
/* The error message.
Required: true
*/
Message string `json:"message"`
}

View file

@ -1,6 +0,0 @@
package types
// ErrorResponse is the response body of API errors.
type ErrorResponse struct {
Message string `json:"message"`
}

View file

@ -6,7 +6,8 @@ swagger generate model -f api/swagger.yaml \
-n Volume \
-n Port \
-n ImageSummary \
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
-n ErrorResponse
swagger generate operation -f api/swagger.yaml \
-t api -s server -a types -m types \