-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhello-salut.yaml
54 lines (53 loc) · 1.57 KB
/
hello-salut.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
openapi: 3.0.1
info:
title: Hello, Salut API
description: |
Say hello to anyone in their native language!
version: 1.0.1
servers:
- url: https://hellosalut.stefanbohacek.dev
paths:
/:
get:
summary: Say Salut
description: Retrieve how anyone says hello in their native language
operationId: sayHello
parameters:
- name: lang
in: query
description: Language code in two letter format, e.g. 'ar', 'de', 'en', 'en-gb', 'en-us', ...
schema:
type: string
- name: ip
in: query
description: Estimate language based on IP address
schema:
type: string
- name: cc
in: query
description: Country code in two letter format, e.g. 'eg', 'de', 'us', ...
schema:
type: string
- name: mode
in: query
description: Determine the country and langauge based on the request source IP address. Overrides all other parameters.
schema:
type: string
enum:
- auto
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
code:
type: string
description: The language code
example: de
hello:
type: string
description: The word 'Hello' in the provided language.
example: Hallo