No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

299 líneas
7.3 KiB

  1. {
  2. "apiVersion": "1.0.0",
  3. "swaggerVersion": "1.2",
  4. "basePath": "http://petstore.swagger.io/api",
  5. "resourcePath": "/user",
  6. "produces": [
  7. "application/json"
  8. ],
  9. "apis": [
  10. {
  11. "path": "/user",
  12. "operations": [
  13. {
  14. "method": "POST",
  15. "summary": "Create user",
  16. "notes": "This can only be done by the logged in user.",
  17. "type": "void",
  18. "nickname": "createUser",
  19. "authorizations": {
  20. "oauth2": [
  21. {
  22. "scope": "test:anything",
  23. "description": "anything"
  24. }
  25. ]
  26. },
  27. "parameters": [
  28. {
  29. "name": "body",
  30. "description": "Created user object",
  31. "required": true,
  32. "type": "User",
  33. "paramType": "body"
  34. }
  35. ]
  36. }
  37. ]
  38. },
  39. {
  40. "path": "/user/logout",
  41. "operations": [
  42. {
  43. "method": "GET",
  44. "summary": "Logs out current logged in user session",
  45. "notes": "",
  46. "type": "void",
  47. "nickname": "logoutUser",
  48. "authorizations": {},
  49. "parameters": []
  50. }
  51. ]
  52. },
  53. {
  54. "path": "/user/createWithArray",
  55. "operations": [
  56. {
  57. "method": "POST",
  58. "summary": "Creates list of users with given input array",
  59. "notes": "",
  60. "type": "void",
  61. "nickname": "createUsersWithArrayInput",
  62. "authorizations": {
  63. "oauth2": [
  64. {
  65. "scope": "test:anything",
  66. "description": "anything"
  67. }
  68. ]
  69. },
  70. "parameters": [
  71. {
  72. "name": "body",
  73. "description": "List of user object",
  74. "required": true,
  75. "type": "array",
  76. "items": {
  77. "$ref": "User"
  78. },
  79. "paramType": "body"
  80. }
  81. ]
  82. }
  83. ]
  84. },
  85. {
  86. "path": "/user/createWithList",
  87. "operations": [
  88. {
  89. "method": "POST",
  90. "summary": "Creates list of users with given list input",
  91. "notes": "",
  92. "type": "void",
  93. "nickname": "createUsersWithListInput",
  94. "authorizations": {
  95. "oauth2": [
  96. {
  97. "scope": "test:anything",
  98. "description": "anything"
  99. }
  100. ]
  101. },
  102. "parameters": [
  103. {
  104. "name": "body",
  105. "description": "List of user object",
  106. "required": true,
  107. "type": "array",
  108. "items": {
  109. "$ref": "User"
  110. },
  111. "paramType": "body"
  112. }
  113. ]
  114. }
  115. ]
  116. },
  117. {
  118. "path": "/user/{username}",
  119. "operations": [
  120. {
  121. "method": "PUT",
  122. "summary": "Updated user",
  123. "notes": "This can only be done by the logged in user.",
  124. "type": "void",
  125. "nickname": "updateUser",
  126. "authorizations": {
  127. "oauth2": [
  128. {
  129. "scope": "test:anything",
  130. "description": "anything"
  131. }
  132. ]
  133. },
  134. "parameters": [
  135. {
  136. "name": "username",
  137. "description": "name that need to be deleted",
  138. "required": true,
  139. "type": "string",
  140. "paramType": "path"
  141. },
  142. {
  143. "name": "body",
  144. "description": "Updated user object",
  145. "required": true,
  146. "type": "User",
  147. "paramType": "body"
  148. }
  149. ],
  150. "responseMessages": [
  151. {
  152. "code": 400,
  153. "message": "Invalid username supplied"
  154. },
  155. {
  156. "code": 404,
  157. "message": "User not found"
  158. }
  159. ]
  160. },
  161. {
  162. "method": "DELETE",
  163. "summary": "Delete user",
  164. "notes": "This can only be done by the logged in user.",
  165. "type": "void",
  166. "nickname": "deleteUser",
  167. "authorizations": {
  168. "oauth2": [
  169. {
  170. "scope": "test:anything",
  171. "description": "anything"
  172. }
  173. ]
  174. },
  175. "parameters": [
  176. {
  177. "name": "username",
  178. "description": "The name that needs to be deleted",
  179. "required": true,
  180. "type": "string",
  181. "paramType": "path"
  182. }
  183. ],
  184. "responseMessages": [
  185. {
  186. "code": 400,
  187. "message": "Invalid username supplied"
  188. },
  189. {
  190. "code": 404,
  191. "message": "User not found"
  192. }
  193. ]
  194. },
  195. {
  196. "method": "GET",
  197. "summary": "Get user by user name",
  198. "notes": "",
  199. "type": "User",
  200. "nickname": "getUserByName",
  201. "authorizations": {},
  202. "parameters": [
  203. {
  204. "name": "username",
  205. "description": "The name that needs to be fetched. Use user1 for testing.",
  206. "required": true,
  207. "type": "string",
  208. "paramType": "path"
  209. }
  210. ],
  211. "responseMessages": [
  212. {
  213. "code": 400,
  214. "message": "Invalid username supplied"
  215. },
  216. {
  217. "code": 404,
  218. "message": "User not found"
  219. }
  220. ]
  221. }
  222. ]
  223. },
  224. {
  225. "path": "/user/login",
  226. "operations": [
  227. {
  228. "method": "GET",
  229. "summary": "Logs user into the system",
  230. "notes": "",
  231. "type": "string",
  232. "nickname": "loginUser",
  233. "authorizations": {},
  234. "parameters": [
  235. {
  236. "name": "username",
  237. "description": "The user name for login",
  238. "required": true,
  239. "type": "string",
  240. "paramType": "query"
  241. },
  242. {
  243. "name": "password",
  244. "description": "The password for login in clear text",
  245. "required": true,
  246. "type": "string",
  247. "paramType": "query"
  248. }
  249. ],
  250. "responseMessages": [
  251. {
  252. "code": 400,
  253. "message": "Invalid username and password combination"
  254. }
  255. ]
  256. }
  257. ]
  258. }
  259. ],
  260. "models": {
  261. "User": {
  262. "id": "User",
  263. "properties": {
  264. "id": {
  265. "type": "integer",
  266. "format": "int64"
  267. },
  268. "firstName": {
  269. "type": "string"
  270. },
  271. "username": {
  272. "type": "string"
  273. },
  274. "lastName": {
  275. "type": "string"
  276. },
  277. "email": {
  278. "type": "string"
  279. },
  280. "password": {
  281. "type": "string"
  282. },
  283. "phone": {
  284. "type": "string"
  285. },
  286. "userStatus": {
  287. "type": "integer",
  288. "format": "int32",
  289. "description": "User Status",
  290. "enum": [
  291. "1-registered",
  292. "2-active",
  293. "3-closed"
  294. ]
  295. }
  296. }
  297. }
  298. }
  299. }