Generate ErrorResponse struct from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
84a39c0830
commit
bc75738545
4 changed files with 176 additions and 163 deletions
313
api/swagger.yaml
313
api/swagger.yaml
File diff suppressed because it is too large
Load diff
17
api/types/error_response.go
Normal file
17
api/types/error_response.go
Normal 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"`
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package types
|
||||
|
||||
// ErrorResponse is the response body of API errors.
|
||||
type ErrorResponse struct {
|
||||
Message string `json:"message"`
|
||||
}
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue