mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 11:34:09 +01:00
Improve OpenAPI Extensions docs
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
d099f534d7
commit
c0083de076
|
|
@ -34,9 +34,10 @@ whole example, we use it to compose examples from other examples.
|
||||||
|
|
||||||
## Custom `x-pattern-format` key and custom formats
|
## Custom `x-pattern-format` key and custom formats
|
||||||
|
|
||||||
In JSON Schema, `format` is a property to convey semantic information about a
|
In JSON Schema, [`format`](https://json-schema.org/understanding-json-schema/reference/string#format)
|
||||||
schema. We define `x-pattern-format` as a key on the schemas under
|
is a property to convey semantic information about a schema. We define
|
||||||
`patternProperties` with the same use as `format`, but that applies to the
|
`x-pattern-format` as a key on the schemas under `patternProperties` with the
|
||||||
pattern of the property. We also define custom values for formats with the `mx-`
|
same use as `format`, but that applies to the pattern of the property. We also
|
||||||
prefix in `data/custom-formats.yaml`. Those values are recognized in the
|
define custom values for formats with the `mx-` prefix in
|
||||||
rendered specification and link to the definition of the format.
|
`data/custom-formats.yaml`. Those values are recognized in the rendered
|
||||||
|
specification and link to the definition of the format.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue