-
Notifications
You must be signed in to change notification settings - Fork 8
/
API-Swagger.yaml
113 lines (113 loc) · 2.68 KB
/
API-Swagger.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
definitions:
Error:
properties:
code:
example: 400
format: int32
type: integer
message:
description: Error message
example: Invalid or Missing JSON Request
type: string
required:
- code
- message
Input:
properties:
source:
description: String to parse
example: 'NOTICE IS HEREBY GIVEN, pursuant to law, that the New York City Department of Consumer Affairs will hold a Public Hearing on Wednesday, January 28, 2015, at 2:00 P.M., at 66 John Street, 11th Floor, in the Borough of Manhattan, on the following petitions for sidewalk café revocable consent: 1. 132 Mulberry Inc. 132 Mulberry Street in the Borough of Manhattan'
type: string
required:
- source
address:
properties:
'@type':
example: PostalAddress
type: string
addressLocality:
example: New York City
type: string
addressRegion:
example: NY
type: string
borough:
example: Queens
type: string
postalCode:
example: 11105
type: string
streetAddress:
example: |
31-01 Ditmars Boulevard
type: string
required:
- '@type'
- addressLocality
- addressRegion
- postalCode
- streetAddress
- borough
addresses:
properties:
addresses:
items:
$ref: '#/definitions/location'
type: array
required:
- addresses
geo:
properties:
'@type':
example: GeoCoordinates
type: string
latitude:
example: -73.910118
type: string
longitude:
example: 40.776306
type: string
required:
- '@type'
- longitude
- latitude
location:
properties:
'@context':
example: 'http://schema.org'
type: string
'@type':
example: Place
type: string
address:
$ref: '#/definitions/address'
geo:
$ref: '#/definitions/geo'
required:
- '@type'
- '@context'
- address
- geo
info:
title: "BetaNYC 5 Borough's address finder"
version: '0.1'
paths:
/api/parseaddresses:
post:
description: The only endpoint used to submit a string to be parsed.
parameters:
- in: body
name: source
schema:
$ref: '#/definitions/Input'
responses:
'200':
description: Response Payload
schema:
$ref: '#/definitions/addresses'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
summary: Parse Addresses
swagger: '2.0'