Advertisement
Guest User

4.0

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