Guest User

4.0

a guest
Apr 23rd, 2018
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.77 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
  4. version: "1.0.0"
  5. title: "Swagger Petstore"
  6. termsOfService: "http://swagger.io/terms/"
  7. contact:
  8. license:
  9. name: "Apache 2.0"
  10. url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  11. host: "dados.ufrn.br"
  12. basePath: "/api/3/action/"
  13. tags:
  14. - name: "DataSet"
  15. description: "Everything about your DataSet"
  16. externalDocs:
  17. description: "Find out more"
  18. url: "http://swagger.io"
  19. - name: "store"
  20. description: "Access to Petstore orders"
  21. - name: "user"
  22. description: "Operations about user"
  23. externalDocs:
  24. description: "Find out more about our store"
  25. url: "http://swagger.io"
  26. schemes:
  27. - "http"
  28. paths:
  29. /package_list:
  30. get:
  31. tags:
  32. - "DataSet"
  33. summary: "Retorna uma lista dos nomes dos conjuntos de dados do site"
  34. description: "Retorna uma lista dos nomes dos conjuntos de dados do site (pacotes)."
  35. operationId: ""
  36. consumes:
  37. - "application/json"
  38. - "application/xml"
  39. produces:
  40. - "application/json"
  41. parameters:
  42. - in: "body"
  43. name: "limit"
  44. description: "se fornecido, a lista de conjuntos de dados será dividida em páginas de no máximo conjuntos de dados por página e somente uma página será retornada por vez."
  45. required: false
  46. schema:
  47. $ref: "#/definitions/DataSet"
  48. responses:
  49. 200:
  50. description: "successful operation"
  51. schema:
  52. type: "array"
  53. items:
  54. $ref: "#/definitions/DataSet"
  55. 400:
  56. description: "Invalid status value"
  57. 404:
  58. description: "Invalid resource_id"
  59. security:
  60. - petstore_auth:
  61. - "write:pets"
  62. - "read:pets"
  63.  
  64. /datastore_search/{resource_id}:
  65. get:
  66. tags:
  67. - "DataSet"
  68. summary: "Finds datasets by UFRN"
  69. description: "Multiple status values can be provided with comma separated strings"
  70. operationId: "findPetsByStatus"
  71. produces:
  72. - "application/xml"
  73. - "application/json"
  74. parameters:
  75. - name: "resource_id"
  76. in: "path"
  77. description: "ID of dateSet"
  78. required: true
  79. type: "string"
  80. format: "int64"
  81. responses:
  82. 200:
  83. description: "successful operation"
  84. schema:
  85. type: "array"
  86. items:
  87. $ref: "#/definitions/DataSet"
  88. 400:
  89. description: "Invalid status value"
  90. 404:
  91. description: "Invalid resource_id"
  92. security:
  93. - petstore_auth:
  94. - "write:pets"
  95. - "read:pets"
  96. /resource_view_show/{id}:
  97. get:
  98. tags:
  99. - "DataSet"
  100. summary: ""
  101. description: "Retorna os metadados de uma 'resource_view'"
  102. operationId: "findResourceById"
  103. produces:
  104. - "application/xml"
  105. - "application/json"
  106. parameters:
  107. - name: "id"
  108. in: "path"
  109. description: "ID of resource_view"
  110. required: true
  111. type: "string"
  112. format: "int64"
  113. responses:
  114. 200:
  115. description: "successful operation"
  116. schema:
  117. type: "array"
  118. items:
  119. $ref: "#/definitions/DataSet"
  120. 400:
  121. description: "Invalid status value"
  122. 404:
  123. description: "Invalid id"
  124. security:
  125. - petstore_auth:
  126. - "write:pets"
  127. - "read:pets"
  128. /resource_view_list/{id}:
  129. get:
  130. tags:
  131. - "DataSet"
  132. summary: ""
  133. description: "Retorna os metadados de uma 'resource_view'"
  134.  
  135. produces:
  136. - "application/xml"
  137. - "application/json"
  138. parameters:
  139. - name: "id"
  140. in: "path"
  141. description: "ID of resource_view"
  142. required: true
  143. type: "string"
  144. format: "int64"
  145. responses:
  146. 200:
  147. description: "successful operation"
  148. schema:
  149. type: "array"
  150. items:
  151. $ref: "#/definitions/DataSet"
  152. 400:
  153. description: "Invalid status value"
  154. 404:
  155. description: "Invalid id"
  156. security:
  157. - petstore_auth:
  158. - "write:pets"
  159. - "read:pets"
  160. /revision_show/{id}:
  161. get:
  162. tags:
  163. - "DataSet"
  164. summary: ""
  165. description: "Retorna os detalhes de uma revisão"
  166.  
  167. produces:
  168. - "application/xml"
  169. - "application/json"
  170. parameters:
  171. - name: "id"
  172. in: "path"
  173. description: "ID of review"
  174. required: true
  175. type: "string"
  176. format: "int64"
  177. responses:
  178. 200:
  179. description: "successful operation"
  180. schema:
  181. type: "array"
  182. items:
  183. $ref: "#/definitions/DataSet"
  184. 400:
  185. description: "Invalid status value"
  186. 404:
  187. description: "Invalid id"
  188. security:
  189. - petstore_auth:
  190. - "write:pets"
  191. - "read:pets"
  192. /group_show/:
  193. get:
  194. tags:
  195. - "DataSet"
  196. summary: ""
  197. description: "Retorna os detalhes de uma revisão"
  198.  
  199. produces:
  200. - "application/xml"
  201. - "application/json"
  202. parameters:
  203. - name: "id"
  204. in: "query"
  205. description: "ID of review"
  206. required: false
  207. type: "string"
  208. format: "int64"
  209. responses:
  210. 200:
  211. description: "successful operation"
  212. schema:
  213. type: "array"
  214. items:
  215. $ref: "#/definitions/DataSet"
  216. 400:
  217. description: "Invalid status value"
  218. 404:
  219. description: "Invalid id"
  220. security:
  221. - petstore_auth:
  222. - "write:pets"
  223. - "read:pets"
  224. /organization_show/:
  225. get:
  226. tags:
  227. - "DataSet"
  228. summary: ""
  229. description: "Retorna os detalhes de uma organização"
  230.  
  231. produces:
  232. - "application/xml"
  233. - "application/json"
  234. parameters:
  235. - name: "id"
  236. in: "path"
  237. description: "ID ou nome da organização"
  238. required: true
  239. type: "string"
  240. format: "int64"
  241. responses:
  242. 200:
  243. description: "successful operation"
  244. schema:
  245. type: "array"
  246. items:
  247. $ref: "#/definitions/DataSet"
  248. 400:
  249. description: "Invalid status value"
  250. 404:
  251. description: "Invalid id"
  252. security:
  253. - petstore_auth:
  254. - "write:pets"
  255. - "read:pets"
  256. /group_package_show/:
  257. get:
  258. tags:
  259. - "DataSet"
  260. summary: ""
  261. description: "Retorna os dataSets de um grupo"
  262.  
  263. produces:
  264. - "application/xml"
  265. - "application/json"
  266. parameters:
  267. - name: "id"
  268. in: "path"
  269. description: "ID ou nome do grupo"
  270. required: true
  271. type: "string"
  272. format: "int64"
  273. responses:
  274. 200:
  275. description: "successful operation"
  276. schema:
  277. type: "array"
  278. items:
  279. $ref: "#/definitions/DataSet"
  280. 400:
  281. description: "Invalid status value"
  282. 404:
  283. description: "Invalid id"
  284. security:
  285. - petstore_auth:
  286. - "write:pets"
  287. - "read:pets"
  288. /tag_show/:
  289. get:
  290. tags:
  291. - "DataSet"
  292. summary: ""
  293. description: "Retorna detalhes de uma tag e todos os datasets assossiados a ela"
  294.  
  295. produces:
  296. - "application/json"
  297. parameters:
  298. - name: "id"
  299. in: "path"
  300. description: "ID ou nome da tag"
  301. required: true
  302. type: "string"
  303. format: "int64"
  304. responses:
  305. 200:
  306. description: "successful operation"
  307. schema:
  308. type: "array"
  309. items:
  310. $ref: "#/definitions/DataSet"
  311. 400:
  312. description: "Invalid status value"
  313. 404:
  314. description: "Invalid id"
  315. security:
  316. - petstore_auth:
  317. - "write:pets"
  318. - "read:pets"
  319. /package_search/:
  320. get:
  321. tags:
  322. - "DataSet"
  323. summary: "Procura pacotes que satisfaçam um determinado critério de pesquisa"
  324. description: "Essa ação aceita parâmetros de consulta de pesquisa de solr (detalhes abaixo) e retorna um dicionário de resultados, incluindo conjuntos de dados ditados que correspondem aos critérios de pesquisa, uma contagem de pesquisa e também informações de faceta."
  325.  
  326. produces:
  327. - "application/xml"
  328. - "application/json"
  329. parameters:
  330. - name: "id"
  331. in: "path"
  332. description: "Esta ação aceita um subconjunto de parâmetros de consulta de pesquisa do solr"
  333. required: true
  334. type: "string"
  335. format: "int64"
  336. responses:
  337. 200:
  338. description: "successful operation"
  339. schema:
  340. type: "array"
  341. items:
  342. $ref: "#/definitions/DataSet"
  343. 400:
  344. description: "Invalid status value"
  345. 404:
  346. description: "Invalid id"
  347. security:
  348. - petstore_auth:
  349. - "write:pets"
  350. - "read:pets"
  351. /resource_search/:
  352. get:
  353. tags:
  354. - "DataSet"
  355. summary: "Procura por recursos que satisfaçam um determinado critério de pesquisa"
  356. description: "Retorna um dicionário com 2 campos: count e results. O campo de contagem contém o número total de recursos encontrados sem que o limite ou os parâmetros de consulta tenham um efeito. O campo de resultados é uma lista de objetos de recursos ditados."
  357.  
  358. produces:
  359. - "application/xml"
  360. - "application/json"
  361. parameters:
  362. - name: "id"
  363. in: "path"
  364. description: "Esta ação aceita um subconjunto de parâmetros de consulta de pesquisa do solr"
  365. required: true
  366. type: "string"
  367. format: "int64"
  368. responses:
  369. 200:
  370. description: "successful operation"
  371. schema:
  372. type: "array"
  373. items:
  374. $ref: "#/definitions/DataSet"
  375. 400:
  376. description: "Invalid status value"
  377. 404:
  378. description: "Invalid id"
  379. security:
  380. - petstore_auth:
  381. - "write:pets"
  382. - "read:pets"
  383. securityDefinitions:
  384. petstore_auth:
  385. type: "oauth2"
  386. authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
  387. flow: "implicit"
  388. scopes:
  389. write:pets: "modify pets in your account"
  390. read:pets: "read your pets"
  391. api_key:
  392. type: "apiKey"
  393. name: "api_key"
  394. in: "header"
  395. definitions:
  396. User:
  397. type: "object"
  398. properties:
  399. id:
  400. type: "integer"
  401. format: "int64"
  402. username:
  403. type: "string"
  404. firstName:
  405. type: "string"
  406. lastName:
  407. type: "string"
  408. email:
  409. type: "string"
  410. password:
  411. type: "string"
  412. phone:
  413. type: "string"
  414. userStatus:
  415. type: "integer"
  416. format: "int32"
  417. description: "User Status"
  418. xml:
  419. name: "User"
  420. Tag:
  421. type: "object"
  422. properties:
  423. id:
  424. type: "integer"
  425. format: "int64"
  426. name:
  427. type: "string"
  428. xml:
  429. name: "Tag"
  430. DataSet:
  431. type: "object"
  432. required:
  433. - "name"
  434. - "photoUrls"
  435. properties:
  436. help:
  437. type: "string"
  438. example: "http://dados.ufrn.br/api/3/action/help_show?name=datastore_search"
  439. sucess:
  440. type: "boolean"
  441. fields:
  442. type: "array"
  443. items:
  444. $ref: "#/definitions/Tag"
  445. name:
  446. type: "string"
  447. example: "DataSet"
  448. photoUrls:
  449. type: "array"
  450. xml:
  451. name: "photoUrl"
  452. wrapped: true
  453. items:
  454. type: "string"
  455. tags:
  456. type: "array"
  457. xml:
  458. name: "tag"
  459. wrapped: true
  460. items:
  461. $ref: "#/definitions/Tag"
  462. status:
  463. type: "string"
  464. description: "pet status in the store"
  465. enum:
  466. - "available"
  467. - "pending"
  468. - "sold"
  469. xml:
  470. name: "Pet"
  471. ApiResponse:
  472. type: "object"
  473. properties:
  474. code:
  475. type: "integer"
  476. format: "int32"
  477. type:
  478. type: "string"
  479. message:
  480. type: "string"
  481. externalDocs:
  482. description: "Find out more about Swagger"
  483. url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment