|
|
|
@ -133,15 +133,17 @@ output = {
|
|
|
|
# The servers value will be picked up by RapiDoc to provide a way
|
|
|
|
# The servers value will be picked up by RapiDoc to provide a way
|
|
|
|
# to switch API servers. Useful when one wants to test compliance
|
|
|
|
# to switch API servers. Useful when one wants to test compliance
|
|
|
|
# of their server with the API.
|
|
|
|
# of their server with the API.
|
|
|
|
"servers": [{
|
|
|
|
"servers": [
|
|
|
|
|
|
|
|
{
|
|
|
|
"url": "https://{homeserver_address}/",
|
|
|
|
"url": "https://{homeserver_address}/",
|
|
|
|
"variables": {
|
|
|
|
"variables": {
|
|
|
|
"homeserver_address": {
|
|
|
|
"homeserver_address": {
|
|
|
|
"default": "matrix-client.matrix.org",
|
|
|
|
"default": "matrix-client.matrix.org",
|
|
|
|
"description": "The base URL for your homeserver",
|
|
|
|
"description": "The base URL for your homeserver",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
"schemes": ["https"],
|
|
|
|
"schemes": ["https"],
|
|
|
|
"info": {
|
|
|
|
"info": {
|
|
|
|
"title": available_apis[selected_api],
|
|
|
|
"title": available_apis[selected_api],
|
|
|
|
@ -154,8 +156,7 @@ output = {
|
|
|
|
|
|
|
|
|
|
|
|
selected_api_dir = os.path.join(api_dir, selected_api)
|
|
|
|
selected_api_dir = os.path.join(api_dir, selected_api)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
with open(os.path.join(selected_api_dir, 'definitions',
|
|
|
|
with open(os.path.join(selected_api_dir, 'definitions', 'security.yaml')) as f:
|
|
|
|
'security.yaml')) as f:
|
|
|
|
|
|
|
|
output['securityDefinitions'] = yaml.safe_load(f)
|
|
|
|
output['securityDefinitions'] = yaml.safe_load(f)
|
|
|
|
except FileNotFoundError:
|
|
|
|
except FileNotFoundError:
|
|
|
|
print("No security definitions available for this API")
|
|
|
|
print("No security definitions available for this API")
|
|
|
|
|