Skip to content

Instantly share code, notes, and snippets.

@vkeenan
Last active February 22, 2021 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkeenan/691b3bda3c6171a91ba5bf4e3e98a330 to your computer and use it in GitHub Desktop.
Save vkeenan/691b3bda3c6171a91ba5bf4e3e98a330 to your computer and use it in GitHub Desktop.
swagger: "2.0"
info:
version: 0.1.0
title: "geo"
description: "Geographic Microservice"
termsOfService: "http://taxnexus.net/terms/"
contact:
email: "vern@taxnexus.net"
license:
name: "Proprietary - Copyright (c) 2018-2021 by Taxnexus, Inc."
schemes:
- "http"
basePath: "/v1"
host: "localhost:8080"
securityDefinitions:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
consumes:
- "application/json"
produces:
- "application/json"
parameters:
addressQuery:
description: Postal Address URL encoded; partial addresses allowed
in: query
name: address
required: false
type: string
responses:
AccessForbidden:
description: "Access forbidden, account lacks access"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
CoordinateResponse:
description:
Taxnexus Response with an array of basic Coordinate objects
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/CoordinateResponse"
NotFound:
headers:
Access-Control-Allow-Origin:
type: string
description: Resource was not found
schema:
$ref: "#/definitions/Error"
ServerError:
headers:
Access-Control-Allow-Origin:
type: string
description: Server Internal Error
schema:
$ref: "#/definitions/Error"
Unauthorized:
headers:
Access-Control-Allow-Origin:
type: string
description: "Access unauthorized, invalid API-KEY was used"
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
headers:
Access-Control-Allow-Origin:
type: string
description: "Unprocessable Entity, likely a bad parameter"
schema:
$ref: "#/definitions/Error"
CORSResponse:
description: CORS OPTIONS response
headers:
Access-Control-Allow-Origin:
type: string
Access-Control-Allow-Headers:
type: string
Access-Control-Allow-Methods:
type: string
Access-Control-Expose-Headers:
type: string
Access-Control-Max-Age:
type: string
Access-Control-Allow-Credentials:
type: string
Cache-Control:
type: string
paths:
/coordinates:
get:
description: Return a fully-populated Coordinate record
operationId: getCoordinates
parameters:
- $ref: "#/parameters/addressQuery"
responses:
"200":
$ref: "#/responses/CoordinateResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a single Taxnexus Coordinate from Address Information
tags:
- Coordinate
options:
description: CORS support
operationId: getCoordinatesOptions
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
definitions:
Coordinate:
properties:
Latitude:
description: Latitude of coordinate
type: number
Longitude:
description: Longitude of coordinate
type: number
Map:
description: Google map image
format: byte
type: string
StreetView:
description: Google street view image
format: byte
type: string
type: object
CoordinateResponse:
description: An array of Coordinate objects
properties:
Data:
items:
$ref: "#/definitions/Coordinate"
type: array
type: object
Error:
properties:
Code:
format: int64
type: number
Fields:
type: string
Message:
type: string
type: object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment