-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
209 lines (201 loc) · 8.04 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
openapi: 3.0.3
info:
title: STAC API - Language Extension
description: |-
Defines how to make multi-lingual STAC APIs available.
This components defined in this extension are not restricted to the exemplary
endpoint defined below. For example, this extension works well with
STAC API - Features and STAC API - Item Search.
version: '1.0.0-rc.2'
contact:
name: STAC Specification
url: 'http://stacspec.org'
license:
name: Apache License 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0'
tags:
- name: Language
description: Endpoints with support for the STAC API Language Extension
paths:
'/':
get:
tags:
- Language
summary: landing page
description: |-
Returns the root STAC Catalog or STAC Collection that is the entry point
for users to browse with STAC Browser or for search engines to crawl.
This can either return a single STAC Collection or more commonly a STAC
catalog.
- The STAC API - Language conformance class MUST be added to the `conformsTo` array.
- The STAC Language extension identifier SHOULD be added to the `stac_extensions` array.
parameters:
- $ref: '#/components/parameters/acceptLanguage'
- $ref: '#/components/parameters/language'
responses:
'200':
description: |-
The landing page as defined in STAC API - Core.
headers:
Content-Language:
$ref: '#/components/headers/contentLanguage'
content:
application/json:
schema:
allOf:
- $ref: 'https://api.stacspec.org/v1.0.0-rc.2/core/openapi.yaml#/components/schemas/landingPage'
- $ref: '#/components/schemas/landingPageWithLanguage'
example:
type: Catalog
stac_version: 1.0.0
stac_extensions:
- https://stac-extensions.github.io/language/v1.0.0/schema.json
id: sentinel
title: Copernicus Sentinel Imagery
description: Catalog of Copernicus Sentinel 1 and 2 imagery.
conformsTo:
- https://api.stacspec.org/v1.0.0-rc.2/core
- https://api.stacspec.org/v1.0.0/language
language:
code: en
name: English
languages:
- code: de
name: Deutsch
alternate: German
links:
- href: http://data.example.org/
rel: self
hreflang: en
type: application/json
title: This document
- href: http://data.example.org/api
rel: service-desc
hreflang: en
type: application/vnd.oai.openapi+json;version=3.0
title: The API definition
- href: http://data.example.org/api.html
rel: service-doc
hreflang: en
type: text/html
title: The API documentation
- href: http://data.example.org/?language=de
rel: alternate
hreflang: de
type: application/json
title: This document in German language
'500':
$ref: 'https://api.stacspec.org/v1.0.0-rc.2/core/openapi.yaml#/components/responses/Error'
components:
headers:
contentLanguage:
x-stac-api-fragment: language
description: |-
**Extension:** Language (I18N)
Language identifier for the language that the response is made available in.
This parameter follows the specification of the `Content-Language` HTTP header.
required: true
schema:
$ref: '#/components/schemas/languageCode'
style: simple
example: en
parameters:
acceptLanguage:
name: Accept-Language
x-stac-api-fragment: language
in: header
description: |-
**Extension:** Language (I18N)
Language identifiers, optionally with priority.
This parameter follows the specification of the `Accept-Language` HTTP header.
schema:
$ref: '#/components/schemas/prioritizedLanguages'
style: simple
explode: false
example:
- de
- en;q=0.7
- fr;q=0.1
language:
name: language
x-stac-api-fragment: language
in: query
description: |-
**Extension:** Language (I18N)
Optional way to query for specific languages for environments that can't send HTTP headers in a simple way (e.g. a Web Browser).
The parameter accepts a comma-separated list of language identifiers, optionally with priority per language.
This parameter value follows the specification of the `Accept-Language` HTTP header.
schema:
$ref: '#/components/schemas/prioritizedLanguages'
explode: false
style: form
example:
- de
- en;q=0.7
- fr;q=0.1
schemas:
languageCode:
type: string
description: The language tag as per RFC 5646.
pattern: "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$"
example: el
prioritizedLanguages:
type: array
items:
type: string
description: The language tag as per RFC 5646, with optional priority parameter `q` (0 - 1).
pattern: "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))(?:;q=(?:1|1\\.0+|0|0\\.[0-9]+))?$"
example: 'de;q=0.7'
language:
type: object
description: Defines a language the STAC object is available in.
required:
- code
properties:
code:
$ref: '#/components/schemas/languageCode'
name:
type: string
description: The untranslated name of of the language.
example: Ελληνικά
alternate:
type: string
description: The name of the language in another well-understood language, usually in English.
example: Greek
dir:
type: string
description:
The direction for text in this language.
Either left-to-right (`ltr`, default) or right-to-left (`rtl`).
enum:
- rtl
- ltr
default: ltr
languages:
type: array
description: This list of other languages in which the STAC object can be retrieved.
items:
$ref: '#/components/schemas/language'
example:
- code: en
name: English
- code: de-DE
name: Deutsch (Deutschland)
alternate: German (Germany)
- code: el
name: Ελληνικά
alternate: Greek
- code: ar
name: عربي
alternate: Arabic
dir: rtl
landingPageWithLanguage:
x-stac-api-fragment: language
type: object
properties:
language:
allOf:
- $ref: '#/components/schemas/language'
- description: The language used for textual values in this STAC object.
languages:
$ref: '#/components/schemas/languages'