-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnationalize.yaml
75 lines (74 loc) · 1.99 KB
/
nationalize.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
openapi: 3.0.3
info:
title: Nationalize API - OpenAPI 3.0
description: |-
Nationalize.io predicts the nationality of a person given their name.
version: 1.0.11
servers:
- url: https://api.nationalize.io
paths:
/:
get:
summary: Finds nationality by name
description: Finds nationality by name or list of names
operationId: getNationality
parameters:
- name: name
in: query
description: a single name to get nationality for
schema:
type: string
example: peter
- name: name[]
in: query
explode: true
description: a list of names to get nationalities for
schema:
type: array
items:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
properties:
country:
type: array
items:
$ref: '#/components/schemas/Country'
'422':
description: Missing name(s)
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Missing 'name' parameter
'429':
description: Rate limiting error
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: Request limit reached
components:
schemas:
Country:
type: object
properties:
country_id:
type: string
example: US
description: An ISO 3166-1 alpha-2 country code
probability:
type: number
description: Certainty of the assigned country
example: 0.99