Generate ErrorResponse struct from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: bc757385455dee272ca563031afece05c935320b Component: engine
This commit is contained in:
File diff suppressed because it is too large
Load Diff
17
components/engine/api/types/error_response.go
Normal file
17
components/engine/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 \
|
||||
|
||||
Reference in New Issue
Block a user