Skip to content

Commit

Permalink
Merge commit '25ec37ae9079a9a3f05f7af79870b3d88948e073' as 'gbfs-vali…
Browse files Browse the repository at this point in the history
…dator/versions/schemas'
  • Loading branch information
PierrickP committed Dec 2, 2021
2 parents 8a65071 + 25ec37a commit 3d46aab
Show file tree
Hide file tree
Showing 73 changed files with 7,309 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gbfs-validator/versions/schemas/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
87 changes: 87 additions & 0 deletions gbfs-validator/versions/schemas/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Ignore all IDEA files. Comment out the following line if you wish to ignore only particular files (listed below).
.idea/

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/modules.xml
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# Gradle
.gradle
build/

# Inputs and outputs
/input/
/output/

# Mac
*/.DS_Store
.DS_Store
60 changes: 60 additions & 0 deletions gbfs-validator/versions/schemas/v1.0/free_bike_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#free_bike_statusjson",
"description": "Describes the vehicles that are available for rent (as of v2.1-RC2).",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
"type": "integer",
"minimum": 0,
"maximum": 1924988399
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"data": {
"description": "Array that contains one object per bike as defined below.",
"type": "object",
"properties": {
"bikes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bike_id": {
"description": "Rotating (as of v2.0) identifier of a vehicle.",
"type": "string"
},
"lat": {
"description": "The latitude of the vehicle.",
"type": "number",
"minimum": -90,
"maximum": 90
},
"lon": {
"description": "The longitude of the vehicle.",
"type": "number",
"minimum": -180,
"maximum": 180
},
"is_reserved": {
"description": "Is the vehicle currently reserved?",
"oneOf": [{ "type": "boolean" }, { "type": "number" }]
},
"is_disabled": {
"description": "Is the vehicle currently disabled (broken)?",
"oneOf": [{ "type": "boolean" }, { "type": "number" }]
}
},
"required": ["bike_id", "lat", "lon", "is_reserved", "is_disabled"]
}
}
},
"required": ["bikes"]
}
},
"required": ["last_updated", "ttl", "data"]
}
50 changes: 50 additions & 0 deletions gbfs-validator/versions/schemas/v1.0/gbfs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#gbfsjson",
"description": "Auto-discovery file that links to all of the other files published by the system.",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
"type": "integer",
"minimum": 0,
"maximum": 1924988399
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"data": {
"description": "Response data in the form of name:value pairs.",
"type": "object",
"patternProperties": {
"^[a-zA-Z]{2}$": {
"type": "object",
"properties": {
"feeds": {
"description": "An array of all of the feeds that are published by the auto-discovery file. Each element in the array is an object with the keys below.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": ["name", "url"]
}
}
},
"required": ["feeds"]
},
"required": true
},
"additionalProperties": false
}
},
"required": ["last_updated", "ttl", "data"]
}
98 changes: 98 additions & 0 deletions gbfs-validator/versions/schemas/v1.0/station_information.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#station_informationjson",
"description": "Details including system operator, system location, year implemented, URL, contact info, time zone.",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
"type": "integer",
"minimum": 0,
"maximum": 1924988399
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"data": {
"description": "Array that contains one object per station as defined below.",
"type": "object",
"properties": {
"stations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"station_id": {
"description": "Identifier of a station.",
"type": "string"
},
"name": {
"description": "Public name of the station.",
"type": "string"
},
"short_name": {
"description": "Short name or other type of identifier.",
"type": "string"
},
"lat": {
"description": "The latitude of the station.",
"type": "number",
"minimum": -90,
"maximum": 90
},
"lon": {
"description": "The longitude fo the station.",
"type": "number",
"minimum": -180,
"maximum": 180
},
"address": {
"description": "Address where station is located.",
"type": "string"
},
"cross_street": {
"description": "Cross street or landmark…the station is located.",
"type": "string"
},
"region_id": {
"description": "Identifier of the region…the station is located.",
"type": "string"
},
"post_code": {
"description": "Postal code where station is located.",
"type": "string"
},
"rental_methods": {
"description": "Payment methods accepted at this station.",
"type": "array",
"items": {
"type": "string",
"enum": [
"KEY",
"CREDITCARD",
"PAYPASS",
"APPLEPAY",
"ANDROIDPAY",
"TRANSITCARD",
"ACCOUNTNUMBER",
"PHONE"
]
}
},
"capacity": {
"description": "Number of total docking …ilable and unavailable.",
"type": "integer",
"minimum": 0
}
},
"required": ["station_id", "name", "lat", "lon"]
}
}
},
"required": ["stations"]
}
},
"required": ["last_updated", "ttl", "data"]
}
84 changes: 84 additions & 0 deletions gbfs-validator/versions/schemas/v1.0/station_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/NABSA/gbfs/blob/v1.0/gbfs.md#station_statusjson",
"description": "Describes the capacity and rental availability of the station",
"type": "object",
"properties": {
"last_updated": {
"description": "Last time the data in the feed was updated in POSIX time.",
"type": "integer",
"minimum": 0,
"maximum": 1924988399
},
"ttl": {
"description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).",
"type": "integer",
"minimum": 0
},
"data": {
"description": "Array that contains one object per station as defined below.",
"type": "object",
"properties": {
"stations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"station_id": {
"description": "Identifier of a station.",
"type": "string"
},
"num_bikes_available": {
"description": "Number of vehicles of any type physically available for rental at the station.",
"type": "integer",
"minimum": 0
},
"num_bikes_disabled": {
"description": "Number of disabled vehic…ny type at the station.",
"type": "integer",
"minimum": 0
},
"num_docks_available": {
"description": "Number of functional doc…sically at the station.",
"type": "integer",
"minimum": 0
},
"num_docks_disabled": {
"description": "Number of empty but disabled docks at the station.",
"type": "integer",
"minimum": 0
},
"is_installed": {
"description": "Is the station currently on the street?",
"oneOf": [{ "type": "boolean" }, { "type": "number" }]
},
"is_renting": {
"description": "Is the station currently renting vehicles?",
"oneOf": [{ "type": "boolean" }, { "type": "number" }]
},
"is_returning": {
"description": "Is the station accepting vehicle returns?",
"oneOf": [{ "type": "boolean" }, { "type": "number" }]
},
"last_reported": {
"description": "The last time this station reported its status to the operator's backend in POSIX time.",
"type": "number"
}
},
"required": [
"station_id",
"num_bikes_available",
"num_docks_available",
"is_installed",
"is_renting",
"is_returning",
"last_reported"
]
}
}
},
"required": ["stations"]
}
},
"required": ["last_updated", "ttl", "data"]
}
Loading

0 comments on commit 3d46aab

Please sign in to comment.