Clarify value validation requirements

This commit is contained in:
Tom Foster 2025-02-21 10:32:28 +00:00
parent dd4ea948b6
commit 6183f2410f

View file

@ -63,9 +63,11 @@ paths:
minProperties: 1 minProperties: 1
additionalProperties: additionalProperties:
description: The JSON object must include a property whose key description: The JSON object must include a property whose key
matches the `keyName` specified in the URL. Its value is the new matches the `keyName` specified in the URL. For `avatar_url`,
profile field value and may be any valid JSON type. However, if the the value must be an MXC URI string. For `displayname`, the value
key is `avatar_url` or `displayname`, the value must be a string. must be a string. For custom keys, any JSON type is allowed -
servers may not validate these values, but clients should follow
the format defined for that key.
example: { "displayname": "Alice Wonderland" } example: { "displayname": "Alice Wonderland" }
responses: responses:
"200": "200":
@ -155,11 +157,11 @@ paths:
type: object type: object
minProperties: 1 minProperties: 1
additionalProperties: additionalProperties:
description: The JSON response must include a property whose description: The JSON response includes a property whose key
key matches the `keyName` specified in the URL. Its value is matches the `keyName` specified in the URL. For `avatar_url`,
the profile field value and may be any valid JSON type. the value will be an MXC URI string. For `displayname`, the
However, if the key is `avatar_url` or `displayname`, the value will be a string. For custom keys, any JSON type is
value must be a string. possible - clients should expect the format defined for that key.
examples: examples:
response: response:
value: { "displayname": "Alice" } value: { "displayname": "Alice" }