Skip to content

Commit

Permalink
portais-arcgis-brasil (#4): adicionado https://www.data.rio/data.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed May 6, 2021
1 parent a7c9f42 commit 85d9853
Showing 1 changed file with 26 additions and 69 deletions.
95 changes: 26 additions & 69 deletions api/BR/portais-arcgis-brasil/por/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ info:
Discussão em https://github.com/HXL-CPLP/COD-Services-API-doc/issues/4
- TODO:
- https://www.w3.org/TR/vocab-dcat-2/
- https://spec.dataportals.org/
- https://developers.arcgis.com/rest/
- https://developers.arcgis.com/rest/services-reference/get-started-with-the-services-directory.htm
- https://community.esri.com/t5/arcgis-hub-questions/arcgis-open-data-api/m-p/708359
Expand All @@ -40,8 +42,8 @@ info:
# - https://docs.google.com/spreadsheets/d/16SW1kOv01IKcdO5nZvGjnjat7DrUqFem4mcWC2OQbz4/edit#gid=332977705
servers:

- url: https://data.humdata.org/api/3/action
description: "(TODO: Remove this) HDX Production server"
# - url: https://data.humdata.org/api/3/action
# description: "(TODO: Remove this) HDX Production server"

- url: https://www.data.rio/
description: "{[urn:data:xz:iso:3166-2:BR-RJ][urn:data:un:p:BR3304557]} data.rio"
Expand All @@ -53,27 +55,14 @@ servers:
# and CKAN. For example, the file
# https://github.com/teamdigitale/api-openapi-samples/blob/master/external-apis/api.daf.teamdigitale.it.yaml.src
paths:
/package_list:
/data.json:
get:
parameters:
- in: query
name: limit
description: >
If given, the list of datasets will be broken into pages of at most
`limit` datasets per page and only one page will be returned at a time
required: false
schema:
type: integer
default: 250
# NOTE: is possible to not use a default and display EVERYTING.
# But this can freeze user browser even if a 200kb response.
- in: query
name: offset
description: >
When `limit` is given, the `offset` to start returning packages from
required: false
schema:
type: integer
description: |
Nota: esta requisição irá acionar <https://www.data.rio/data.json>.
O arquivo é extremamente grande (seu navegador pode travar) e no
momento não está claro se é possível limitar quantidade da resposta.
Considere usar uma ferramenta que suporte respostas grandes.
responses:
'200':
description: >
Expand All @@ -84,50 +73,18 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CkanReply'
/tag_list: {}
# TODO: /tag_list
# https://docs.ckan.org/en/latest/api/index.html#ckan.logic.action.get.tag_list

/tag_show: {}
# TODO: /tag_show
# https://docs.ckan.org/en/latest/api/index.html#ckan.logic.action.get.tag_show


components:
# NOTE: OpenAPI 3.0 seems to not allow use $ref outside schemas
# (but OpenAPI 3.1 allow it), but the teamdigitale/api-openapi-samples
# uses this as part of build scripts. We will keep it simple without
# use extra steps.
# responses:
# CkanResponse:
# description: >-
# Standard Ckan Reply. See http://docs.ckan.org/en/latest/api/index.html.

schemas:
CkanReply:
# From teamdigitale/api-openapi-samples
type: object
required:
- result
- success
- help
properties:
success:
type: string
result:
anyOf:
- type: object
- type: array
error:
type: object
help:
type: string
format: url
status:
type: boolean
enum:
- true
- false
type: object
example:
{
"@context":"https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld",
"@type":"dcat:Catalog",
"conformsTo":"https://project-open-data.cio.gov/v1.1/schema",
"describedBy":"https://project-open-data.cio.gov/v1.1/schema/catalog.json",
"dataset":
[
{"@type":"dcat:Dataset"},
{"@type":"dcat:Dataset"},
{"@type":"dcat:Dataset"}
]
}

0 comments on commit 85d9853

Please sign in to comment.