Fix the examples in the swagger API documentation to be valid JSON

pull/977/head
Mark Haines 9 years ago
parent 7f81501762
commit 63f08bace6

@ -101,7 +101,7 @@ paths:
The length of time in milliseconds since an action was performed
by this user.
status_msg:
type: string
type: [string, "null"]
description: The state message for this user if one was set.
404:
description: |-
@ -185,7 +185,7 @@ paths:
"last_active_ago": 395,
"presence": "offline",
"user_id": "@alice:matrix.org"
}
},
"type": "m.presence"
},
{
@ -195,7 +195,7 @@ paths:
"last_active_ago": 16874,
"presence": "online",
"user_id": "@marisa:matrix.org"
}
},
"type": "m.presence"
}
]

@ -343,7 +343,7 @@ paths:
"body": "Hello world!",
"msgtype": "m.text"
},
"room_id:" "!wfgy43Sg4a:matrix.org",
"room_id:": "!wfgy43Sg4a:matrix.org",
"user_id": "@bob:matrix.org",
"event_id": "$asfDuShaf7Gafaw:matrix.org",
"type": "m.room.message"

@ -87,6 +87,8 @@ def get_json_schema_object_fields(obj, enforce_title=False):
desc += (
" Must be '%s'." % props[key_name]["enum"][0]
)
if isinstance(value_type, list):
value_type = " or ".join(value_type)
fields["rows"].append({
"key": key_name,

Loading…
Cancel
Save