proto-gorm.swagger.json 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "proto-gorm/api/proto-gorm.proto",
  5. "version": "version not set"
  6. },
  7. "tags": [
  8. {
  9. "name": "IntPointService"
  10. },
  11. {
  12. "name": "IntPointTxn"
  13. }
  14. ],
  15. "consumes": [
  16. "application/json"
  17. ],
  18. "produces": [
  19. "application/json"
  20. ],
  21. "paths": {
  22. "/v1/point": {
  23. "post": {
  24. "summary": "The convention requires the rpc names have Create/Read/Update/List/Delete\nas a prefix. The type is inferred from the response (except for delete),\nso multiple objects can have CURDL handlers in the same service, provided\nthey are given unique suffixes",
  25. "operationId": "IntPointService_Create",
  26. "responses": {
  27. "200": {
  28. "description": "A successful response.",
  29. "schema": {
  30. "$ref": "#/definitions/proto_gormCreateIntPointResponse"
  31. }
  32. },
  33. "default": {
  34. "description": "An unexpected error response.",
  35. "schema": {
  36. "$ref": "#/definitions/rpcStatus"
  37. }
  38. }
  39. },
  40. "parameters": [
  41. {
  42. "name": "body",
  43. "description": "Convention dictates that this field be of the given type, and be\nnamed 'payload' in order to autogenerate the handler",
  44. "in": "body",
  45. "required": true,
  46. "schema": {
  47. "$ref": "#/definitions/proto_gormIntPoint"
  48. }
  49. }
  50. ],
  51. "tags": [
  52. "IntPointService"
  53. ]
  54. }
  55. },
  56. "/v1/point/{id}": {
  57. "get": {
  58. "operationId": "IntPointService_Read",
  59. "responses": {
  60. "200": {
  61. "description": "A successful response.",
  62. "schema": {
  63. "$ref": "#/definitions/proto_gormReadIntPointResponse"
  64. }
  65. },
  66. "default": {
  67. "description": "An unexpected error response.",
  68. "schema": {
  69. "$ref": "#/definitions/rpcStatus"
  70. }
  71. }
  72. },
  73. "parameters": [
  74. {
  75. "name": "id",
  76. "description": "For a read request, the id field is the only to be specified",
  77. "in": "path",
  78. "required": true,
  79. "type": "integer",
  80. "format": "int64"
  81. }
  82. ],
  83. "tags": [
  84. "IntPointService"
  85. ]
  86. },
  87. "delete": {
  88. "summary": "rpc List ( ListIntPointRequest ) returns ( ListIntPointResponse ) {\n option (google.api.http) = {\n get: \"/v1/point\"\n };\n}\nrpc ListSomething( google.protobuf.Empty ) returns ( ListSomethingResponse ) {}",
  89. "operationId": "IntPointService_Delete",
  90. "responses": {
  91. "200": {
  92. "description": "A successful response.",
  93. "schema": {
  94. "$ref": "#/definitions/proto_gormDeleteIntPointResponse"
  95. }
  96. },
  97. "default": {
  98. "description": "An unexpected error response.",
  99. "schema": {
  100. "$ref": "#/definitions/rpcStatus"
  101. }
  102. }
  103. },
  104. "parameters": [
  105. {
  106. "name": "id",
  107. "description": "Only the id is needed for a delete request",
  108. "in": "path",
  109. "required": true,
  110. "type": "integer",
  111. "format": "int64"
  112. }
  113. ],
  114. "tags": [
  115. "IntPointService"
  116. ]
  117. }
  118. },
  119. "/v1/point/{payload.id}": {
  120. "patch": {
  121. "operationId": "IntPointService_Update",
  122. "responses": {
  123. "200": {
  124. "description": "A successful response.",
  125. "schema": {
  126. "$ref": "#/definitions/proto_gormUpdateIntPointResponse"
  127. }
  128. },
  129. "default": {
  130. "description": "An unexpected error response.",
  131. "schema": {
  132. "$ref": "#/definitions/rpcStatus"
  133. }
  134. }
  135. },
  136. "parameters": [
  137. {
  138. "name": "payload.id",
  139. "in": "path",
  140. "required": true,
  141. "type": "integer",
  142. "format": "int64"
  143. },
  144. {
  145. "name": "body",
  146. "in": "body",
  147. "required": true,
  148. "schema": {
  149. "$ref": "#/definitions/proto_gormIntPoint"
  150. }
  151. },
  152. {
  153. "name": "gerogeriGegege",
  154. "in": "query",
  155. "required": false,
  156. "type": "string"
  157. }
  158. ],
  159. "tags": [
  160. "IntPointService"
  161. ]
  162. }
  163. }
  164. },
  165. "definitions": {
  166. "proto_gormCreateIntPointResponse": {
  167. "type": "object",
  168. "properties": {
  169. "result": {
  170. "$ref": "#/definitions/proto_gormIntPoint",
  171. "title": "Convention also requires that the return type be the same and named 'result'"
  172. }
  173. }
  174. },
  175. "proto_gormDeleteIntPointResponse": {
  176. "type": "object",
  177. "title": "By convention, on DELETE no response data is given, so either a\ngoogle.protobuf.empty, or an empty struct is sufficient"
  178. },
  179. "proto_gormIntPoint": {
  180. "type": "object",
  181. "properties": {
  182. "id": {
  183. "type": "integer",
  184. "format": "int64"
  185. },
  186. "x": {
  187. "type": "integer",
  188. "format": "int32"
  189. },
  190. "y": {
  191. "type": "integer",
  192. "format": "int32"
  193. }
  194. },
  195. "title": "IntPoint is a basic message type representing a single cartesian point\nthat we want to store in a database"
  196. },
  197. "proto_gormReadIntPointResponse": {
  198. "type": "object",
  199. "properties": {
  200. "result": {
  201. "$ref": "#/definitions/proto_gormIntPoint",
  202. "title": "Again the type with 'result' name"
  203. }
  204. }
  205. },
  206. "proto_gormUpdateIntPointResponse": {
  207. "type": "object",
  208. "properties": {
  209. "result": {
  210. "$ref": "#/definitions/proto_gormIntPoint"
  211. }
  212. }
  213. },
  214. "proto_gormUpdateSetIntPointResponse": {
  215. "type": "object",
  216. "properties": {
  217. "results": {
  218. "type": "array",
  219. "items": {
  220. "$ref": "#/definitions/proto_gormIntPoint"
  221. }
  222. }
  223. }
  224. },
  225. "protobufAny": {
  226. "type": "object",
  227. "properties": {
  228. "@type": {
  229. "type": "string"
  230. }
  231. },
  232. "additionalProperties": {}
  233. },
  234. "rpcStatus": {
  235. "type": "object",
  236. "properties": {
  237. "code": {
  238. "type": "integer",
  239. "format": "int32"
  240. },
  241. "message": {
  242. "type": "string"
  243. },
  244. "details": {
  245. "type": "array",
  246. "items": {
  247. "$ref": "#/definitions/protobufAny"
  248. }
  249. }
  250. }
  251. },
  252. "v1Field": {
  253. "type": "object",
  254. "properties": {
  255. "name": {
  256. "type": "string"
  257. },
  258. "subs": {
  259. "type": "object",
  260. "additionalProperties": {
  261. "$ref": "#/definitions/v1Field"
  262. }
  263. }
  264. },
  265. "description": "Field represents a single field for an object.\nIt contains fields name and also may contain a group of sub-fields for cases\nwhen a fields represents some structure."
  266. },
  267. "v1FieldSelection": {
  268. "type": "string",
  269. "format": "string",
  270. "properties": {
  271. "fields": {
  272. "type": "object",
  273. "additionalProperties": {
  274. "$ref": "#/definitions/v1Field"
  275. }
  276. }
  277. },
  278. "description": "atlas.api.field_selection",
  279. "title": "FieldSelection represents a group of fields for some object.\nMain use case for if is to store information about object fields that\nneed to be ratained prior to sending object as a response"
  280. }
  281. }
  282. }