🎨 Improve identation

Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
pull/3684/head
Alexandre Franke 4 years ago
parent aceb333b54
commit fdd95b2e6b

@ -98,7 +98,7 @@ available_apis = {
"application-service": "Matrix Application Service API", "application-service": "Matrix Application Service API",
"identity": "Matrix Identity Service API", "identity": "Matrix Identity Service API",
"push-gateway": "Matrix Push Gateway API", "push-gateway": "Matrix Push Gateway API",
} }
parser.add_argument( parser.add_argument(
"--api", "--api",
default="client-server", default="client-server",
@ -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")

Loading…
Cancel
Save