@bradleyhodges/addresskit 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,472 @@
1
+ swagger: '2.0'
2
+ info:
3
+ description: |
4
+ Australian Address Validation, Search and Autocomplete
5
+ version: '1.0.0'
6
+ title: 'AddressKit'
7
+ basePath: '/'
8
+ tags:
9
+ - name: address
10
+ schemes:
11
+ - 'https'
12
+ produces:
13
+ - 'application/json'
14
+ paths:
15
+ /:
16
+ get:
17
+ summary: Index
18
+ description: |
19
+ returns a list of available APIs within the `Link` headers
20
+ responses:
21
+ 200:
22
+ description: successful operation
23
+ schema:
24
+ $ref: '#/definitions/Index'
25
+ headers:
26
+ link:
27
+ description: rfc5988 Links
28
+ type: array
29
+ collectionFormat: csv
30
+ items:
31
+ type: string
32
+ pattern: '<(.*)>;(.*)'
33
+ link-template:
34
+ description: rfc6570 Links Templates
35
+ type: array
36
+ collectionFormat: csv
37
+ items:
38
+ type: string
39
+ pattern: '<(.*)>;(.*)'
40
+ 503:
41
+ description: service unavailable
42
+ 500:
43
+ description: unexpected error
44
+ /addresses:
45
+ get:
46
+ summary: Search for a list of addresses
47
+ description: |
48
+ returns a list of addresses matching the search string
49
+ tags:
50
+ - address
51
+ parameters:
52
+ - name: q
53
+ in: query
54
+ description: search string
55
+ type: string
56
+ required: true
57
+ responses:
58
+ 200:
59
+ description: successful query
60
+ schema:
61
+ $ref: '#/definitions/SearchResponse'
62
+ headers:
63
+ link:
64
+ description: rfc5988 Links
65
+ type: array
66
+ collectionFormat: csv
67
+ items:
68
+ type: string
69
+ pattern: '<(.*)>;(.*)'
70
+ link-template:
71
+ description: rfc6570 Links Templates
72
+ type: array
73
+ collectionFormat: csv
74
+ items:
75
+ type: string
76
+ pattern: '<(.*)>;(.*)'
77
+ 400:
78
+ description: invalid query
79
+ 503:
80
+ description: service unavailable
81
+ 500:
82
+ description: unexpected error
83
+ /addresses/{addressId}:
84
+ get:
85
+ summary: Get Address
86
+ description: |
87
+ returns detailed information about a specific address
88
+ tags:
89
+ - address
90
+ parameters:
91
+ - name: addressId
92
+ in: path
93
+ description: ID of the address.
94
+ type: string
95
+ required: true
96
+ responses:
97
+ 200:
98
+ description: successful query
99
+ schema:
100
+ $ref: '#/definitions/Address'
101
+ headers:
102
+ link:
103
+ description: rfc5988 Links
104
+ type: array
105
+ collectionFormat: csv
106
+ items:
107
+ type: string
108
+ pattern: '<(.*)>;(.*)'
109
+ link-template:
110
+ description: rfc6570 Links Templates
111
+ type: array
112
+ collectionFormat: csv
113
+ items:
114
+ type: string
115
+ pattern: '<(.*)>;(.*)'
116
+ 404:
117
+ description: not found
118
+ 503:
119
+ description: service unavailable
120
+ 500:
121
+ description: unexpected error
122
+ definitions:
123
+ Index:
124
+ type: object
125
+ SearchResponse:
126
+ type: array
127
+ description: |
128
+ The list of addresses matching the search string. The list may be paginated.
129
+ A the `Link` header with a `rel` of `next` will be provided if there are additional results.
130
+ items:
131
+ type: object
132
+ title: Flattened Address
133
+ required:
134
+ - sla
135
+ - score
136
+ - pid
137
+ properties:
138
+ sla:
139
+ $ref: '#/definitions/SingleLineAddress'
140
+ ssla:
141
+ $ref: '#/definitions/SingleLineAddress'
142
+ highlight:
143
+ type: object
144
+ required:
145
+ - sla
146
+ properties:
147
+ sla:
148
+ type: string
149
+ description: The full address flattened to a single line with matching search tokens highlighted
150
+ example: |
151
+ <em>LEVEL</em> <em>25</em>, <em>TOWER</em> <em>3</em>, <em>300</em> BARANGAROO AV, BARANGAROO NSW 2000
152
+ ssla:
153
+ description: The full address flattened to a single line with matching search tokens highlighted
154
+ example: |
155
+ L25, 2512/9 <em>POWER</em> ST, SOUTHBANK VIC <em>3006</em>
156
+ score:
157
+ type: number
158
+ description: strength of the match relative to the other matches
159
+ example: 0.985051936618461
160
+ pid:
161
+ type: string
162
+ description: The Persistent Identifier is unique to the real world feature this record represents.
163
+ example: GANSW719386656
164
+ example:
165
+ - sla: LEVEL 25, TOWER 3, 300 BARANGAROO AV, BARANGAROO NSW 2000
166
+ highlight:
167
+ sla: |
168
+ <em>LEVEL</em> <em>25</em>, <em>TOWER</em> <em>3</em>, <em>300</em> BARANGAROO AV, BARANGAROO NSW 2000
169
+ score: 1
170
+ pid: GANSW719386656
171
+ - sla: |
172
+ UNIT 1, 109 KIRRIBILLI AV, KIRRIBILLI NSW 2061
173
+ ssla: |
174
+ 1/109 KIRRIBILLI AV, KIRRIBILLI NSW 2061
175
+ highlight:
176
+ sla: |
177
+ UNIT 1, <em>109</em> <em>KIRRIBILLI</em> <em>AV</em>, <em>KIRRIBILLI</em> NSW 2061
178
+ ssla: |
179
+ 1/<em>109</em> <em>KIRRIBILLI</em> <em>AV</em>, <em>KIRRIBILLI</em> NSW 2061
180
+ score: 0.985051936618461
181
+ pid: GANSW717102496
182
+ Address:
183
+ type: object
184
+ title: Physical Australian Address
185
+ description: |
186
+ A physical Australian address in structured and unstructured formats.
187
+
188
+ If an address has a "flat" component (e.g. UNIT 12, 32 SOME ST...), then it will also have a
189
+ the `ssla` and `smla` fields, which are shortended versions of `sla` and `mla`. e.g. (12/32 SOME ST...)
190
+ required:
191
+ - 'pid'
192
+ - 'structured'
193
+ - 'sla'
194
+ - 'mla'
195
+ properties:
196
+ pid:
197
+ type: string
198
+ description: The Persistent Identifier is unique to the real world feature this record represents.
199
+ example: GANSW719386656
200
+ structured:
201
+ $ref: '#/definitions/StructuredAddress'
202
+ sla:
203
+ $ref: '#/definitions/SingleLineAddress'
204
+ ssla:
205
+ $ref: '#/definitions/SingleLineAddress'
206
+ mla:
207
+ $ref: '#/definitions/MultiLineAddress'
208
+ smla:
209
+ $ref: '#/definitions/MultiLineAddress'
210
+ geo:
211
+ $ref: '#/definitions/AddressGeocoding'
212
+ AddressGeocoding:
213
+ type: object
214
+ description: Geocoding information about the address
215
+ properties:
216
+ level:
217
+ type: object
218
+ properties:
219
+ code:
220
+ type: integer
221
+ maxLength: 2
222
+ description: |
223
+ Binary indicator of the level of geocoding this address has. e.g. 0 = 000 = (No geocode), 1 = 001 = (No Locality geocode, No Street geocode, Address geocode), etc.
224
+ example: 7
225
+ name:
226
+ type: string
227
+ maxLength: 50
228
+ description: |
229
+ Name of the geocode level type code.
230
+ example: LOCALITY,STREET, ADDRESS
231
+ geocodes:
232
+ type: array
233
+ items:
234
+ type: object
235
+ properties:
236
+ default:
237
+ type: boolean
238
+ description: |
239
+ Indicates if the geocode is the default or a site geocode (i.e. from *_ADDRESS_DEFAULT_GEOCODE_psv or from *_ADDRESS_SITE_GEOCODE_psv)
240
+ latitude:
241
+ type: number
242
+ example: -33.85351875
243
+ longitude:
244
+ type: number
245
+ example: 150.8947369
246
+ reliability:
247
+ type: object
248
+ properties:
249
+ code:
250
+ type: integer
251
+ maxLength: 1
252
+ description: |
253
+ Spatial precision of the geocode expressed as number in the range, 1 (unique identification of feature) to 6 (feature associated to region i.e. postcode).
254
+ example: 2
255
+ name:
256
+ type: string
257
+ maxLength: 50
258
+ description: |
259
+ Name of the geocode reliability code.
260
+ example: WITHIN ADDRESS SITE BOUNDARY OR ACCESS POINT
261
+ type:
262
+ type: object
263
+ properties:
264
+ code:
265
+ type: integer
266
+ maxLength: 1
267
+ description: |
268
+ Unique abbreviation for geocode feature. (e.g. "PRCL") (SAWG 7.4.1).
269
+ example: 2
270
+ name:
271
+ type: string
272
+ maxLength: 50
273
+ description: |
274
+ Name of the geocode type code.
275
+ example: PROPERTY CENTROID
276
+ description:
277
+ type: string
278
+ maxLength: 50
279
+ description: |
280
+ Additional textual data
281
+ example: REAR
282
+ SingleLineAddress:
283
+ type: string
284
+ title: Single Line Address
285
+ description: |
286
+ The full address flattened to a single line. The primary use is for search results and for autocomplete.
287
+ example: LEVEL 25, TOWER 3, 300 BARANGAROO AV, BARANGAROO NSW 2000
288
+ MultiLineAddress:
289
+ type: array
290
+ items:
291
+ type: string
292
+ minItems: 2
293
+ maxItems: 4
294
+ title: Multi Line Address
295
+ description: |
296
+ The full address flattened to at most four lines. The primary use is for address labels
297
+ example:
298
+ - LEVEL 25
299
+ - TOWER 3
300
+ - 300 BARANGAROO AV
301
+ - BARANGAROO NSW 2000
302
+ StructuredAddress:
303
+ type: object
304
+ properties:
305
+ buildingName:
306
+ type: string
307
+ maxLength: 200
308
+ example: Vickery Lodge
309
+ description: |
310
+ Combines both building/property name fields. (AS4590:2006 5.7).
311
+ lotNumber:
312
+ type: object
313
+ properties:
314
+ prefix:
315
+ type: string
316
+ example: A
317
+ maxLength: 2
318
+ number:
319
+ type: string
320
+ example: CP
321
+ maxLength: 5
322
+ suffix:
323
+ type: string
324
+ example: B
325
+ maxLength: 2
326
+ flat:
327
+ type: object
328
+ properties:
329
+ type:
330
+ type: object
331
+ properties:
332
+ name:
333
+ type: string
334
+ example: Tower
335
+ maxLength: 50
336
+ code:
337
+ type: string
338
+ example: Twr
339
+ maxLength: 7
340
+ prefix:
341
+ type: string
342
+ example: CT
343
+ maxLength: 2
344
+ number:
345
+ type: integer
346
+ example: 20114
347
+ suffix:
348
+ type: string
349
+ example: AG
350
+ maxLength: 2
351
+ level:
352
+ type: object
353
+ properties:
354
+ type:
355
+ type: object
356
+ properties:
357
+ na,e:
358
+ type: string
359
+ example: Observation Deck
360
+ maxLength: 50
361
+ code:
362
+ type: string
363
+ example: OD
364
+ maxLength: 4
365
+ prefix:
366
+ type: string
367
+ example: A
368
+ maxLength: 2
369
+ number:
370
+ type: integer
371
+ example: '64'
372
+ maxLength: 5
373
+ suffix:
374
+ type: string
375
+ example: QG
376
+ maxLength: 2
377
+ number:
378
+ type: object
379
+ properties:
380
+ prefix:
381
+ type: string
382
+ example: RMB
383
+ maxLength: 3
384
+ number:
385
+ type: integer
386
+ example: '20114'
387
+ maxLength: 6
388
+ suffix:
389
+ type: string
390
+ example: 'AA'
391
+ maxLength: 2
392
+ last:
393
+ type: object
394
+ properties:
395
+ prefix:
396
+ type: string
397
+ example: RMB
398
+ maxLength: 3
399
+ number:
400
+ type: integer
401
+ example: '20114'
402
+ maxLength: 6
403
+ suffix:
404
+ type: string
405
+ example: 'C'
406
+ maxLength: 2
407
+ street:
408
+ type: object
409
+ properties:
410
+ name:
411
+ type: string
412
+ example: Barangaroo
413
+ maxLength: 100
414
+ type:
415
+ type: object
416
+ properties:
417
+ name:
418
+ type: string
419
+ example: Av
420
+ maxLength: 15
421
+ code:
422
+ type: string
423
+ example: Avenue
424
+ maxLength: 50
425
+ suffix:
426
+ type: object
427
+ properties:
428
+ name:
429
+ type: string
430
+ example: Deviation
431
+ maxLength: 50
432
+ code:
433
+ type: string
434
+ example: De
435
+ maxLength: 15
436
+ locality:
437
+ type: object
438
+ properties:
439
+ name:
440
+ type: string
441
+ example: Sydney
442
+ maxLength: 100
443
+ class:
444
+ type: object
445
+ properties:
446
+ code:
447
+ type: string
448
+ example: G
449
+ maxLength: 1
450
+ name:
451
+ type: string
452
+ example: GAZETTED LOCALITY
453
+ maxLength: 50
454
+ state:
455
+ type: object
456
+ properties:
457
+ name:
458
+ type: string
459
+ example: New South Wales
460
+ maxLength: 50
461
+ abbreviation:
462
+ type: string
463
+ example: NSW
464
+ maxLength: 3
465
+ postcode:
466
+ type: string
467
+ example: '2000'
468
+ maxLength: 4
469
+ confidence:
470
+ type: integer
471
+ description: |
472
+ Reflects how many contributor databases this address appears in (0 = 1 database, 1 = 2 database etc.).