Skip to content
Snippets Groups Projects
Commit d1e7741d authored by naturzukunft's avatar naturzukunft
Browse files

first shot fairSyncApi.yml

parent 981bc3ca
No related branches found
No related tags found
No related merge requests found
openapi: 3.0.2
info:
title: GoodDB API
version: 0.1.8
contact:
name: GoodDB Consortium
url: 'https://github.com/goodmap'
license:
name: AGPLv3
url: 'https://github.com/goodmap/gooddb-backend/blob/master/LICENSE'
servers:
- url: 'https://api.gooddb.io/v1/'
description: Public production server
- url: 'https://api-dev.gooddb.io/v1/'
description: Public unstable development server
security:
- basicAuth: []
- bearerAuth: []
paths:
/places:
get:
summary: Search for places
tags:
- Places
parameters:
- $ref: '#/components/parameters/BoundingBox'
responses:
'200':
description: List of places that match the passed search criterie
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Place'
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Place:
required:
- address
- contact
- coordinates
- language
- license
- placeType
- source
- status
- title
properties:
_id:
type: string
readOnly: true
description: Please use URL to original resource
example: 'https://kartevonmorgen.org/#/?entry=e58b14c1aa4e446bb1700b03dcac3069'
version:
type: integer
createdAt:
$ref: '#/components/schemas/DateTime'
language:
$ref: '#/components/schemas/Language'
title:
type: string
description:
type: string
placeType:
type: string
enum:
- Accomodation
- Company
- Food
- Group
- Initiative
- Organization
- Project
- Public Infrastructure
- Store
placeCategory:
description: Depending on chosen placeType (e.g. placeType "Food" > category "Restaurant")
type: string
images:
type: array
items:
$ref: '#/components/schemas/Image'
logo:
$ref: '#/components/schemas/Image'
coordinates:
$ref: '#/components/schemas/Coordinates'
address:
$ref: '#/components/schemas/Address'
contact:
$ref: '#/components/schemas/Contact'
references:
type: array
items:
$ref: '#/components/schemas/Place'
tags:
type: array
items:
type: string
rating:
type: number
format: float
description: |
contains the place’s rating, from 1.0 to 5.0, based on aggregated user reviews.
openingHours:
type: object
description: |
Check Google Place definition: https://developers.google.com/places/web-service/details
Monday open from 8-12am and 1-5pm:
[
{
open: [0, "0800"] // 0- Monday, ...6- Sunday
close: [0, "1200"]
},
{
open: [0, "1300"]
close: [0, "1700"]
},
...
]
Always open
[
{ open: [0, "0000"] }
]
required:
- periods
properties:
description:
type: string
periods:
type: array
items:
type: object
properties:
open:
type: array
items:
oneOf:
- type: number
- type: string
close:
type: array
items:
oneOf:
- type: number
- type: string
license:
type: string
priceLevel:
type: number
description: |
0 — Free
1 — Inexpensive
2 — Moderate
3 — Expensive
4 — Very Expensive
socialMedia:
$ref: '#/components/schemas/SocialMedia'
source:
type: object
description: Origin of the dataset
required:
- providerId
- entryId
properties:
providerId:
type: string
entryId:
type: string
description: Original id of the entry
url:
type: string
format: url
status:
$ref: '#/components/schemas/PublicationStatus'
sustainability:
type: object
nullable: true
properties:
firstRatedAt:
$ref: '#/components/schemas/DateTime'
updatedAt:
$ref: '#/components/schemas/DateTime'
rating:
type: string
enum:
- unclear
- not sustainable
- sustainable
- very sustainable
updatedBy:
type: string
description: User id
createdBy:
type: string
description: User id
additionalProperties:
type: object
description: Additional platform specific options
properties:
future:
type: object
properties:
isPartner:
type: boolean
description: Does the place hold an active future partnership?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment