· 5 years ago · Jul 16, 2020, 06:26 AM
1openapi: "3.0.1"
2info:
3 title: Nager Date API
4 version: "2.0"
5servers:
6 - url: https://date.nager.at/Api/v2
7x-a127-services:
8 quota:
9 provider: volos-quota-memory
10 options:
11 timeUnit: day
12 interval: 2
13 allow: 2500
14 spikearrest:
15 provider: "volos-spikearrest-memory"
16 options:
17 timeUnit: "minute"
18 bufferSize: 10
19 allow: 10
20 cache:
21 provider: volos-cache-memory
22 options:
23 name: hello-cache
24 ttl: 60000
25 apiKeyHeader:
26 provider: volos-oauth-apigee
27 options:
28 key: sss
29 uri: ssss
30paths:
31 /PublicHolidays/{year}/{countrycode}:
32 get:
33 tags:
34 - Api
35 summary: Get Public Holiday
36 parameters:
37 - name: year
38 in: path
39 description: ''
40 required: true
41 schema:
42 type: integer
43 description: ''
44 format: int32
45 - name: countrycode
46 in: path
47 description: ''
48 required: true
49 schema:
50 type: string
51 description: ''
52 nullable: true
53 responses:
54 '200':
55 description: Success
56 content:
57 text/plain:
58 schema:
59 type: array
60 items:
61 $ref: '#/components/schemas/PublicHolidayDto'
62 application/json:
63 schema:
64 type: array
65 items:
66 $ref: '#/components/schemas/PublicHolidayDto'
67 text/json:
68 schema:
69 type: array
70 items:
71 $ref: '#/components/schemas/PublicHolidayDto'
72 /NextPublicHolidays/{countryCode}:
73 get:
74 tags:
75 - Api
76 summary: Get next public holidays for a given country
77 parameters:
78 - name: countryCode
79 in: path
80 required: true
81 schema:
82 type: string
83 nullable: true
84 responses:
85 '200':
86 description: Success
87 content:
88 text/plain:
89 schema:
90 type: array
91 items:
92 $ref: '#/components/schemas/PublicHolidayDto'
93 application/json:
94 schema:
95 type: array
96 items:
97 $ref: '#/components/schemas/PublicHolidayDto'
98 text/json:
99 schema:
100 type: array
101 items:
102 $ref: '#/components/schemas/PublicHolidayDto'
103 /NextPublicHolidaysWorldwide:
104 get:
105 tags:
106 - Api
107 summary: Get next public holidays worldwide
108 responses:
109 '200':
110 description: Success
111 content:
112 text/plain:
113 schema:
114 type: array
115 items:
116 $ref: '#/components/schemas/PublicHolidayDto'
117 application/json:
118 schema:
119 type: array
120 items:
121 $ref: '#/components/schemas/PublicHolidayDto'
122 text/json:
123 schema:
124 type: array
125 items:
126 $ref: '#/components/schemas/PublicHolidayDto'
127 /LongWeekend/{year}/{countrycode}:
128 get:
129 tags:
130 - Api
131 summary: Get long weekends for a given country
132 parameters:
133 - name: year
134 in: path
135 description: ''
136 required: true
137 schema:
138 type: integer
139 description: ''
140 format: int32
141 - name: countrycode
142 in: path
143 description: ''
144 required: true
145 schema:
146 type: string
147 description: ''
148 nullable: true
149 responses:
150 '200':
151 description: Success
152 content:
153 text/plain:
154 schema:
155 type: array
156 items:
157 $ref: '#/components/schemas/LongWeekendDto'
158 application/json:
159 schema:
160 type: array
161 items:
162 $ref: '#/components/schemas/LongWeekendDto'
163 text/json:
164 schema:
165 type: array
166 items:
167 $ref: '#/components/schemas/LongWeekendDto'
168 /CountryInfo:
169 get:
170 tags:
171 - Api
172 summary: Get country info from request header `accept-language` or from query parameter
173 parameters:
174 - name: countryCode
175 in: query
176 description: ''
177 schema:
178 type: string
179 description: ''
180 nullable: true
181 responses:
182 '200':
183 description: Success
184 content:
185 text/plain:
186 schema:
187 $ref: '#/components/schemas/CountryInfoDto'
188 application/json:
189 schema:
190 $ref: '#/components/schemas/CountryInfoDto'
191 text/json:
192 schema:
193 $ref: '#/components/schemas/CountryInfoDto'
194 /AvailableCountries:
195 get:
196 tags:
197 - Api
198 summary: Get all available countries
199 responses:
200 '200':
201 description: Success
202 content:
203 text/plain:
204 schema:
205 type: array
206 items:
207 $ref: '#/components/schemas/PublicHolidayDto'
208 application/json:
209 schema:
210 type: array
211 items:
212 $ref: '#/components/schemas/PublicHolidayDto'
213 text/json:
214 schema:
215 type: array
216 items:
217 $ref: '#/components/schemas/PublicHolidayDto'
218components:
219 schemas:
220 PublicHolidayType:
221 enum:
222 - Public
223 - Bank
224 - School
225 - Authorities
226 - Optional
227 - Observance
228 type: string
229 PublicHolidayDto:
230 type: object
231 properties:
232 date:
233 type: string
234 description: The date
235 format: date
236 localName:
237 type: string
238 description: Local name
239 nullable: true
240 name:
241 type: string
242 description: English name
243 nullable: true
244 countryCode:
245 type: string
246 description: ISO 3166-1 alpha-2
247 nullable: true
248 fixed:
249 type: boolean
250 description: Is this public holiday every year on the same date
251 global:
252 type: boolean
253 description: Is this public holiday in every county (federal state)
254 counties:
255 type: array
256 items:
257 type: string
258 description: ISO-3166-2 - Federal states
259 nullable: true
260 launchYear:
261 type: integer
262 description: The launch year of the public holiday
263 format: int32
264 nullable: true
265 type:
266 $ref: '#/components/schemas/PublicHolidayType'
267 additionalProperties: false
268 LongWeekendDto:
269 type: object
270 properties:
271 startDate:
272 type: string
273 format: date-time
274 endDate:
275 type: string
276 format: date-time
277 dayCount:
278 type: integer
279 format: int32
280 needBridgeDay:
281 type: boolean
282 additionalProperties: false
283 CountryInfoDto:
284 type: object
285 properties:
286 commonName:
287 type: string
288 nullable: true
289 officialName:
290 type: string
291 nullable: true
292 countryCode:
293 type: string
294 nullable: true
295 alternativeSpellings:
296 type: array
297 items:
298 type: string
299 nullable: true
300 region:
301 type: string
302 nullable: true
303 borders:
304 type: array
305 items:
306 $ref: '#/components/schemas/CountryInfoDto'
307 nullable: true
308 additionalProperties: false