Add config doc generation command to lint.sh and add missing config schema. (#18522)

Follows: #17892, #18456

<ol>
<li>

Add config doc generation command to lint.sh 

</li>
<li>

Add missing `user_types` config schema 

</li>
</ol>

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
This commit is contained in:
reivilibre
2025-06-10 11:43:58 +00:00
committed by GitHub
parent 1ab35a0a78
commit 96c556081a
4 changed files with 32 additions and 9 deletions

1
changelog.d/18522.doc Normal file
View File

@@ -0,0 +1 @@
Generate config documentation from JSON Schema file.

View File

@@ -764,22 +764,23 @@ max_event_delay_duration: 24h
--- ---
### `user_types` ### `user_types`
Configuration settings related to the user types feature. *(object)* Configuration settings related to the user types feature.
This setting has the following sub-options: This setting has the following sub-options:
* `default_user_type`: The default user type to use for registering new users when no value has been specified.
Defaults to none. * `default_user_type` (string|null): The default user type to use for registering new users when no value has been specified. Defaults to none. Defaults to `null`.
* `extra_user_types`: Array of additional user types to allow. These are treated as real users. Defaults to [].
* `extra_user_types` (list): Array of additional user types to allow. These are treated as real users. Defaults to `[]`.
Example configuration: Example configuration:
```yaml ```yaml
user_types: user_types:
default_user_type: "custom" default_user_type: custom
extra_user_types: extra_user_types:
- "custom" - custom
- "custom2" - custom2
``` ```
---
## Homeserver blocking ## Homeserver blocking
Useful options for Synapse admins. Useful options for Synapse admins.

View File

@@ -912,6 +912,24 @@ properties:
default: null default: null
examples: examples:
- 24h - 24h
user_types:
type: object
description: >-
Configuration settings related to the user types feature.
properties:
default_user_type:
type: ["string", "null"]
description: "The default user type to use for registering new users when no value has been specified. Defaults to none."
default: null
extra_user_types:
type: array
description: "Array of additional user types to allow. These are treated as real users."
items:
type: string
default: []
examples:
- default_user_type: "custom"
extra_user_types: ["custom", "custom2"]
admin_contact: admin_contact:
type: ["string", "null"] type: ["string", "null"]
description: How to reach the server admin, used in `ResourceLimitError`. description: How to reach the server admin, used in `ResourceLimitError`.

View File

@@ -139,3 +139,6 @@ cargo-fmt
# Ensure type hints are correct. # Ensure type hints are correct.
mypy mypy
# Generate configuration documentation from the JSON Schema
./scripts-dev/gen_config_documentation.py schema/synapse-config.schema.yaml > docs/usage/configuration/config_documentation.md