Swagger validation
This commit is contained in:
parent
55cc5c5bb5
commit
f20faa80e5
2 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ host: localhost:8008
|
||||||
schemes:
|
schemes:
|
||||||
- https
|
- https
|
||||||
- http
|
- http
|
||||||
basePath: ""
|
basePath: "/"
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
|
|
@ -153,7 +153,7 @@ class MatrixUnits(Units):
|
||||||
for path in api["paths"]:
|
for path in api["paths"]:
|
||||||
for method in api["paths"][path]:
|
for method in api["paths"][path]:
|
||||||
single_api = api["paths"][path][method]
|
single_api = api["paths"][path][method]
|
||||||
full_path = api.get("basePath", "") + path
|
full_path = api.get("basePath", "").rstrip("/") + path
|
||||||
endpoint = {
|
endpoint = {
|
||||||
"title": single_api.get("summary", ""),
|
"title": single_api.get("summary", ""),
|
||||||
"desc": single_api.get("description", single_api.get("summary", "")),
|
"desc": single_api.get("description", single_api.get("summary", "")),
|
||||||
|
@ -299,7 +299,7 @@ class MatrixUnits(Units):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
if len(params_missing_examples) == 0:
|
if len(params_missing_examples) == 0:
|
||||||
path_template = api.get("basePath", "") + path
|
path_template = api.get("basePath", "").rstrip("/") + path
|
||||||
qps = {}
|
qps = {}
|
||||||
body = ""
|
body = ""
|
||||||
for param in single_api.get("parameters", []):
|
for param in single_api.get("parameters", []):
|
||||||
|
@ -398,7 +398,7 @@ class MatrixUnits(Units):
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"base": api.get("basePath"),
|
"base": api.get("basePath").rstrip("/"),
|
||||||
"group": group_name,
|
"group": group_name,
|
||||||
"endpoints": endpoints,
|
"endpoints": endpoints,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue