Advertisement
Guest User

Untitled

a guest
Apr 13th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.41 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/xml"
  298. - "application/json"
  299. parameters:
  300. - name: "id"
  301. in: "path"
  302. description: "ID ou nome da tag"
  303. required: true
  304. type: "string"
  305. format: "int64"
  306. responses:
  307. 200:
  308. description: "successful operation"
  309. schema:
  310. type: "array"
  311. items:
  312. $ref: "#/definitions/DataSet"
  313. 400:
  314. description: "Invalid status value"
  315. 404:
  316. description: "Invalid id"
  317. security:
  318. - petstore_auth:
  319. - "write:pets"
  320. - "read:pets"
  321. /package_search/:
  322. get:
  323. tags:
  324. - "DataSet"
  325. summary: "Procura pacotes que satisfaçam um determinado critério de pesquisa"
  326. 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."
  327.  
  328. produces:
  329. - "application/xml"
  330. - "application/json"
  331. parameters:
  332. - name: "id"
  333. in: "path"
  334. description: "Esta ação aceita um subconjunto de parâmetros de consulta de pesquisa do solr"
  335. required: true
  336. type: "string"
  337. format: "int64"
  338. responses:
  339. 200:
  340. description: "successful operation"
  341. schema:
  342. type: "array"
  343. items:
  344. $ref: "#/definitions/DataSet"
  345. 400:
  346. description: "Invalid status value"
  347. 404:
  348. description: "Invalid id"
  349. security:
  350. - petstore_auth:
  351. - "write:pets"
  352. - "read:pets"
  353.  
  354. securityDefinitions:
  355. petstore_auth:
  356. type: "oauth2"
  357. authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
  358. flow: "implicit"
  359. scopes:
  360. write:pets: "modify pets in your account"
  361. read:pets: "read your pets"
  362. api_key:
  363. type: "apiKey"
  364. name: "api_key"
  365. in: "header"
  366. definitions:
  367. Order:
  368. type: "object"
  369. properties:
  370. id:
  371. type: "integer"
  372. format: "int64"
  373. petId:
  374. type: "integer"
  375. format: "int64"
  376. quantity:
  377. type: "integer"
  378. format: "int32"
  379. shipDate:
  380. type: "string"
  381. format: "date-time"
  382. status:
  383. type: "string"
  384. description: "Order Status"
  385. enum:
  386. - "placed"
  387. - "approved"
  388. - "delivered"
  389. complete:
  390. type: "boolean"
  391. default: false
  392. xml:
  393. name: "Order"
  394. Category:
  395. type: "object"
  396. properties:
  397. id:
  398. type: "integer"
  399. format: "int64"
  400. name:
  401. type: "string"
  402. xml:
  403. name: "Category"
  404. User:
  405. type: "object"
  406. properties:
  407. id:
  408. type: "integer"
  409. format: "int64"
  410. username:
  411. type: "string"
  412. firstName:
  413. type: "string"
  414. lastName:
  415. type: "string"
  416. email:
  417. type: "string"
  418. password:
  419. type: "string"
  420. phone:
  421. type: "string"
  422. userStatus:
  423. type: "integer"
  424. format: "int32"
  425. description: "User Status"
  426. xml:
  427. name: "User"
  428. Tag:
  429. type: "object"
  430. properties:
  431. id:
  432. type: "integer"
  433. format: "int64"
  434. name:
  435. type: "string"
  436. xml:
  437. name: "Tag"
  438. DataSet:
  439. type: "object"
  440. required:
  441. - "name"
  442. - "photoUrls"
  443. properties:
  444. help:
  445. type: "string"
  446. example: "http://dados.ufrn.br/api/3/action/help_show?name=datastore_search"
  447. sucess:
  448. type: "boolean"
  449. fields:
  450. type: "array"
  451. items:
  452. $ref: "#/definitions/Tag"
  453. name:
  454. type: "string"
  455. example: "DataSet"
  456. photoUrls:
  457. type: "array"
  458. xml:
  459. name: "photoUrl"
  460. wrapped: true
  461. items:
  462. type: "string"
  463. tags:
  464. type: "array"
  465. xml:
  466. name: "tag"
  467. wrapped: true
  468. items:
  469. $ref: "#/definitions/Tag"
  470. status:
  471. type: "string"
  472. description: "pet status in the store"
  473. enum:
  474. - "available"
  475. - "pending"
  476. - "sold"
  477. xml:
  478. name: "Pet"
  479. ApiResponse:
  480. type: "object"
  481. properties:
  482. code:
  483. type: "integer"
  484. format: "int32"
  485. type:
  486. type: "string"
  487. message:
  488. type: "string"
  489. externalDocs:
  490. description: "Find out more about Swagger"
  491. url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement