From 937f59bf4e2044bcc5f14038c47b7867e898d4d8 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Sun, 8 Apr 2018 14:03:54 +0800 Subject: [PATCH] fix: make json ID be Id to be compatibl Signed-off-by: Allen Sun --- apis/swagger.yml | 10 +++++----- apis/types/exec_create_resp.go | 6 +++--- apis/types/image_info.go | 4 ++-- apis/types/network_create_resp.go | 4 ++-- apis/types/network_info.go | 4 ++-- apis/types/network_inspect_resp.go | 10 +++++----- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apis/swagger.yml b/apis/swagger.yml index 3d0480785..7c508ffb5 100644 --- a/apis/swagger.yml +++ b/apis/swagger.yml @@ -2443,7 +2443,7 @@ definitions: description: "An object containing all details of an image at API side" type: "object" properties: - ID: + Id: description: "ID of an image." type: "string" x-nullable: false @@ -2650,7 +2650,7 @@ definitions: ExecCreateResp: type: "object" properties: - ID: + Id: type: "string" ExecStartConfig: @@ -2994,7 +2994,7 @@ definitions: type: "object" description: "contains the response for the remote API: POST /networks/create" properties: - ID: + Id: description: "ID is the id of the network." type: "string" Warning: @@ -3035,7 +3035,7 @@ definitions: Name: type: "string" description: "Name is the requested name of the network" - ID: + Id: type: "string" description: "ID uniquely identifies a network on a single machine" Scope: @@ -3072,7 +3072,7 @@ definitions: Name: description: "Name is the name of the network." type: "string" - ID: + Id: type: "string" description: "ID uniquely identifies a network on a single machine" Driver: diff --git a/apis/types/exec_create_resp.go b/apis/types/exec_create_resp.go index b824edf87..a522703a7 100644 --- a/apis/types/exec_create_resp.go +++ b/apis/types/exec_create_resp.go @@ -17,11 +17,11 @@ import ( type ExecCreateResp struct { - // ID - ID string `json:"ID,omitempty"` + // Id + ID string `json:"Id,omitempty"` } -/* polymorph ExecCreateResp ID false */ +/* polymorph ExecCreateResp Id false */ // Validate validates this exec create resp func (m *ExecCreateResp) Validate(formats strfmt.Registry) error { diff --git a/apis/types/image_info.go b/apis/types/image_info.go index 7cc772ea5..1e189d2b6 100644 --- a/apis/types/image_info.go +++ b/apis/types/image_info.go @@ -28,7 +28,7 @@ type ImageInfo struct { CreatedAt string `json:"CreatedAt,omitempty"` // ID of an image. - ID string `json:"ID,omitempty"` + ID string `json:"Id,omitempty"` // the name of the operating system. Os string `json:"Os,omitempty"` @@ -52,7 +52,7 @@ type ImageInfo struct { /* polymorph ImageInfo CreatedAt false */ -/* polymorph ImageInfo ID false */ +/* polymorph ImageInfo Id false */ /* polymorph ImageInfo Os false */ diff --git a/apis/types/network_create_resp.go b/apis/types/network_create_resp.go index e874550c7..49f43a455 100644 --- a/apis/types/network_create_resp.go +++ b/apis/types/network_create_resp.go @@ -18,13 +18,13 @@ import ( type NetworkCreateResp struct { // ID is the id of the network. - ID string `json:"ID,omitempty"` + ID string `json:"Id,omitempty"` // Warning means the message of create network result. Warning string `json:"Warning,omitempty"` } -/* polymorph NetworkCreateResp ID false */ +/* polymorph NetworkCreateResp Id false */ /* polymorph NetworkCreateResp Warning false */ diff --git a/apis/types/network_info.go b/apis/types/network_info.go index 6bd382879..9b5641755 100644 --- a/apis/types/network_info.go +++ b/apis/types/network_info.go @@ -21,7 +21,7 @@ type NetworkInfo struct { Driver string `json:"Driver,omitempty"` // ID uniquely identifies a network on a single machine - ID string `json:"ID,omitempty"` + ID string `json:"Id,omitempty"` // Name is the name of the network. Name string `json:"Name,omitempty"` @@ -32,7 +32,7 @@ type NetworkInfo struct { /* polymorph NetworkInfo Driver false */ -/* polymorph NetworkInfo ID false */ +/* polymorph NetworkInfo Id false */ /* polymorph NetworkInfo Name false */ diff --git a/apis/types/network_inspect_resp.go b/apis/types/network_inspect_resp.go index 5e4a0e5f3..a3fbf0152 100644 --- a/apis/types/network_inspect_resp.go +++ b/apis/types/network_inspect_resp.go @@ -23,12 +23,12 @@ type NetworkInspectResp struct { // EnableIPv6 represents whether to enable IPv6. EnableIPV6 bool `json:"EnableIPv6,omitempty"` - // ID uniquely identifies a network on a single machine - ID string `json:"ID,omitempty"` - // IPAM is the network's IP Address Management. IPAM *IPAM `json:"IPAM,omitempty"` + // ID uniquely identifies a network on a single machine + ID string `json:"Id,omitempty"` + // Internal checks the network is internal network or not. Internal bool `json:"Internal,omitempty"` @@ -49,10 +49,10 @@ type NetworkInspectResp struct { /* polymorph NetworkInspectResp EnableIPv6 false */ -/* polymorph NetworkInspectResp ID false */ - /* polymorph NetworkInspectResp IPAM false */ +/* polymorph NetworkInspectResp Id false */ + /* polymorph NetworkInspectResp Internal false */ /* polymorph NetworkInspectResp Labels false */