Skip to content
Snippets Groups Projects
Commit cf6edc97 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

added route for retrieving server version info; updated docs

parent a5d0fa08
Branches
Tags v2.20.0
No related merge requests found
......@@ -31,6 +31,12 @@ def index():
return send_from_directory("docs", "api.html")
@app.route('/version', methods=['GET'])
def version():
with open("version.json", "r") as f:
return jsonify(json.load(f)["version"])
@app.route('/login', methods=['POST'])
def login():
try:
......
This diff is collapsed.
openapi: 3.0.0
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/deadlocker8/RoadmapsAPI/1.0.0
- description: Roadmaps API Server
url: https://roadmaps.thecodelabs.de:10000/
info:
......@@ -13,6 +16,19 @@ tags:
description: Operations available to the public
paths:
/version:
get:
tags:
- public
summary: Gets information about the server version
operationId: version
responses:
'200':
description: The server version information
content:
application/json:
schema:
$ref: '#/components/schemas/Version'
/login:
post:
tags:
......@@ -725,6 +741,24 @@ components:
bearerFormat: JWT
schemas:
Version:
type: object
required:
- code
- name
- date
properties:
code:
type: integer
example: 1
name:
type: string
example: "v1.0.0"
date:
type: string
format: date
example: "30.05.19"
Credentials:
type: object
required:
......
{
"version": {
"name": "v2.1.0",
"code": 4,
"date": "08.06.19"
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment