mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
api docs: Document POST /realm/profile_fields api endpoint.
This commit is contained in:
committed by
Tim Abbott
parent
b74bf64c9d
commit
190701a062
@@ -303,6 +303,25 @@ def reorder_realm_profile_fields(client: Client) -> None:
|
||||
# {code_example|end}
|
||||
validate_against_openapi_schema(result, '/realm/profile_fields', 'patch', '200')
|
||||
|
||||
@openapi_test_function("/realm/profile_fields:post")
|
||||
def create_realm_profile_field(client: Client) -> None:
|
||||
# {code_example|start}
|
||||
# Create a custom profile field in the user's organization.
|
||||
request = {
|
||||
'name': 'Phone',
|
||||
'hint': 'Contact No.',
|
||||
'field_type': 1
|
||||
}
|
||||
|
||||
result = client.call_endpoint(
|
||||
url='/realm/profile_fields',
|
||||
method='POST',
|
||||
request=request
|
||||
)
|
||||
# {code_example|end}
|
||||
|
||||
validate_against_openapi_schema(result, '/realm/profile_fields', 'post', '200')
|
||||
|
||||
@openapi_test_function("/realm/filters:post")
|
||||
def add_realm_filter(client: Client) -> None:
|
||||
|
||||
@@ -1264,6 +1283,7 @@ def test_server_organizations(client: Client) -> None:
|
||||
upload_custom_emoji(client)
|
||||
get_realm_profile_fields(client)
|
||||
reorder_realm_profile_fields(client)
|
||||
create_realm_profile_field(client)
|
||||
|
||||
def test_errors(client: Client) -> None:
|
||||
test_missing_request_argument(client)
|
||||
|
||||
Reference in New Issue
Block a user