1
0
Fork 0

Fix swagger version

This commit is contained in:
Simran Brucherseifer 2019-11-19 16:32:04 +01:00
parent 1375b993f0
commit ec0dcea2a3
1 changed files with 7 additions and 6 deletions

View File

@ -57,16 +57,11 @@ MS = re.M | re.S
### @brief swagger ### @brief swagger
################################################################################ ################################################################################
# read ArangoDB version
f = io.open(scriptDir + "VERSION", encoding="utf-8")
version = f.read().strip()
f.close()
swagger = { swagger = {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "ArangoDB REST API Interface", "description": "ArangoDB REST API Interface",
"version": version, "version": "1.0", # placeholder
"title": "ArangoDB", "title": "ArangoDB",
"license": { "license": {
"name": "Apache License, Version 2.0" "name": "Apache License, Version 2.0"
@ -1439,6 +1434,12 @@ if len(sys.argv) > 5:
fileFilter = sys.argv[5] fileFilter = sys.argv[5]
print("Filtering for: [" + fileFilter + "]", file=sys.stderr) print("Filtering for: [" + fileFilter + "]", file=sys.stderr)
# read ArangoDB version and use it as API version
f = io.open(scriptDir + "VERSION", encoding="utf-8")
version = f.read().strip()
f.close()
swagger['info']['version'] = version
paths = {} paths = {}
topdir = sys.argv[4] topdir = sys.argv[4]