Skip to content

Instantly share code, notes, and snippets.

@just3ws
Last active June 10, 2018 04:23
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 just3ws/2328a1457f656c0691b2bf412640eecc to your computer and use it in GitHub Desktop.
Save just3ws/2328a1457f656c0691b2bf412640eecc to your computer and use it in GitHub Desktop.
Bohater Parkingu API 1.0.1
---
openapi: 3.0.0
servers:
- description: Bohater Parkingu Rates API
url: https://virtserver.swaggerhub.com/just3ws/bohater-parkingu/1.0.1
info:
description: Parking rate for a given date and time range.
version: "1.0.1"
title: Bohater Parkingu API
contact:
email: mike@just3ws.com
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
tags:
- name: developers
description: Operations available to regular developers
paths:
/rate:
get:
tags:
- developers
summary: Lookup rate info for date and time range.
operationId: lookupRate
description: >
By passing in the start and end of your time range you can get the rate
for the spot.
parameters:
- in: query
name: starts
description: Start of the desired rate period
required: true
schema:
type: string
format: date-time
- in: query
name: ends
description: End of the desired rate period.
required: true
schema:
type: string
format: date-time
responses:
200:
description: Rate for the effective time range.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Rate'
204:
description: No available rates for date range
content:
text/plain:
schema:
title: unavailable
type: string
example: unavilable
404:
description: Not found response
content:
text/plain:
schema:
title: Rate information not found
type: string
example: Not found
components:
schemas:
Rate:
type: object
required:
- price
- starts
- ends
properties:
price:
type: integer
format: int32
example: 1900
starts:
type: string
format: date-time
example: '2016-08-29T08:02:03.001Z'
ends:
type: string
format: date-time
example: '2016-08-29T09:04:04.001Z'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment