Documentation: generate *.swagger.json using latest protoc-gen-swagger

release-3.5
shawwang 2020-03-04 22:36:13 +08:00
parent 6f850a65a1
commit c6fce8c320
3 changed files with 369 additions and 0 deletions

View File

@ -34,6 +34,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthenticateResponse" "$ref": "#/definitions/etcdserverpbAuthenticateResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -61,6 +67,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthDisableResponse" "$ref": "#/definitions/etcdserverpbAuthDisableResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -88,6 +100,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthEnableResponse" "$ref": "#/definitions/etcdserverpbAuthEnableResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -115,6 +133,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthRoleAddResponse" "$ref": "#/definitions/etcdserverpbAuthRoleAddResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -142,6 +166,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthRoleDeleteResponse" "$ref": "#/definitions/etcdserverpbAuthRoleDeleteResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -169,6 +199,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthRoleGetResponse" "$ref": "#/definitions/etcdserverpbAuthRoleGetResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -196,6 +232,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthRoleGrantPermissionResponse" "$ref": "#/definitions/etcdserverpbAuthRoleGrantPermissionResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -223,6 +265,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthRoleListResponse" "$ref": "#/definitions/etcdserverpbAuthRoleListResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -250,6 +298,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthRoleRevokePermissionResponse" "$ref": "#/definitions/etcdserverpbAuthRoleRevokePermissionResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -277,6 +331,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthStatusResponse" "$ref": "#/definitions/etcdserverpbAuthStatusResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -304,6 +364,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserAddResponse" "$ref": "#/definitions/etcdserverpbAuthUserAddResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -331,6 +397,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserChangePasswordResponse" "$ref": "#/definitions/etcdserverpbAuthUserChangePasswordResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -358,6 +430,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserDeleteResponse" "$ref": "#/definitions/etcdserverpbAuthUserDeleteResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -385,6 +463,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserGetResponse" "$ref": "#/definitions/etcdserverpbAuthUserGetResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -412,6 +496,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserGrantRoleResponse" "$ref": "#/definitions/etcdserverpbAuthUserGrantRoleResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -439,6 +529,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserListResponse" "$ref": "#/definitions/etcdserverpbAuthUserListResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -466,6 +562,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAuthUserRevokeRoleResponse" "$ref": "#/definitions/etcdserverpbAuthUserRevokeRoleResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -493,6 +595,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbMemberAddResponse" "$ref": "#/definitions/etcdserverpbMemberAddResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -520,6 +628,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbMemberListResponse" "$ref": "#/definitions/etcdserverpbMemberListResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -547,6 +661,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbMemberPromoteResponse" "$ref": "#/definitions/etcdserverpbMemberPromoteResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -574,6 +694,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbMemberRemoveResponse" "$ref": "#/definitions/etcdserverpbMemberRemoveResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -601,6 +727,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbMemberUpdateResponse" "$ref": "#/definitions/etcdserverpbMemberUpdateResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -628,6 +760,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbCompactionResponse" "$ref": "#/definitions/etcdserverpbCompactionResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -655,6 +793,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbDeleteRangeResponse" "$ref": "#/definitions/etcdserverpbDeleteRangeResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -682,6 +826,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseLeasesResponse" "$ref": "#/definitions/etcdserverpbLeaseLeasesResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -709,6 +859,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseRevokeResponse" "$ref": "#/definitions/etcdserverpbLeaseRevokeResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -736,6 +892,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseTimeToLiveResponse" "$ref": "#/definitions/etcdserverpbLeaseTimeToLiveResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -763,6 +925,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbPutResponse" "$ref": "#/definitions/etcdserverpbPutResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -790,6 +958,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbRangeResponse" "$ref": "#/definitions/etcdserverpbRangeResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -817,6 +991,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbTxnResponse" "$ref": "#/definitions/etcdserverpbTxnResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -844,6 +1024,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseGrantResponse" "$ref": "#/definitions/etcdserverpbLeaseGrantResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -881,6 +1067,12 @@
} }
} }
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -908,6 +1100,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseLeasesResponse" "$ref": "#/definitions/etcdserverpbLeaseLeasesResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -935,6 +1133,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseRevokeResponse" "$ref": "#/definitions/etcdserverpbLeaseRevokeResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -962,6 +1166,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbLeaseTimeToLiveResponse" "$ref": "#/definitions/etcdserverpbLeaseTimeToLiveResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -989,6 +1199,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbAlarmResponse" "$ref": "#/definitions/etcdserverpbAlarmResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -1016,6 +1232,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbDefragmentResponse" "$ref": "#/definitions/etcdserverpbDefragmentResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -1043,6 +1265,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbHashKVResponse" "$ref": "#/definitions/etcdserverpbHashKVResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -1079,6 +1307,12 @@
} }
} }
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -1106,6 +1340,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbStatusResponse" "$ref": "#/definitions/etcdserverpbStatusResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -1133,6 +1373,12 @@
"schema": { "schema": {
"$ref": "#/definitions/etcdserverpbMoveLeaderResponse" "$ref": "#/definitions/etcdserverpbMoveLeaderResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -1170,6 +1416,12 @@
} }
} }
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
} }
} }
@ -2665,6 +2917,27 @@
} }
} }
}, },
"runtimeError": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"runtimeStreamError": { "runtimeStreamError": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -21,6 +21,12 @@
"schema": { "schema": {
"$ref": "#/definitions/v3electionpbCampaignResponse" "$ref": "#/definitions/v3electionpbCampaignResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -48,6 +54,12 @@
"schema": { "schema": {
"$ref": "#/definitions/v3electionpbLeaderResponse" "$ref": "#/definitions/v3electionpbLeaderResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -84,6 +96,12 @@
}, },
"title": "Stream result of v3electionpbLeaderResponse" "title": "Stream result of v3electionpbLeaderResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -111,6 +129,12 @@
"schema": { "schema": {
"$ref": "#/definitions/v3electionpbProclaimResponse" "$ref": "#/definitions/v3electionpbProclaimResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -138,6 +162,12 @@
"schema": { "schema": {
"$ref": "#/definitions/v3electionpbResignResponse" "$ref": "#/definitions/v3electionpbResignResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -229,6 +259,27 @@
} }
} }
}, },
"runtimeError": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"runtimeStreamError": { "runtimeStreamError": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -21,6 +21,12 @@
"schema": { "schema": {
"$ref": "#/definitions/v3lockpbLockResponse" "$ref": "#/definitions/v3lockpbLockResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -48,6 +54,12 @@
"schema": { "schema": {
"$ref": "#/definitions/v3lockpbUnlockResponse" "$ref": "#/definitions/v3lockpbUnlockResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
} }
}, },
"parameters": [ "parameters": [
@ -92,6 +104,39 @@
} }
} }
}, },
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"runtimeError": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v3lockpbLockRequest": { "v3lockpbLockRequest": {
"type": "object", "type": "object",
"properties": { "properties": {