2018-07-23 15:38:52 +02:00
|
|
|
# OpenAPI Extensions
|
2018-07-13 13:25:48 +02:00
|
|
|
|
2023-09-19 19:26:07 +02:00
|
|
|
For some functionality that is not directly provided by the OpenAPI v3.1
|
2018-07-13 13:25:48 +02:00
|
|
|
specification, some extensions have been added that are to be consistent
|
|
|
|
|
across the specification. The defined extensions are listed below. Extensions
|
|
|
|
|
should not break parsers, however if extra functionality is required, aware
|
|
|
|
|
parsers should be able to take advantage of the added syntax.
|
|
|
|
|
|
2020-05-28 13:54:36 +02:00
|
|
|
## Using multiple files to describe API
|
|
|
|
|
|
|
|
|
|
To ease API design and management, the API definition is split across several
|
2021-10-12 19:07:01 +02:00
|
|
|
files. Each of these files is self-contained valid OpenAPI.
|
2020-05-28 13:54:36 +02:00
|
|
|
|
|
|
|
|
There is no single root file in the source tree as OpenAPI requires; this file
|
2023-09-19 19:26:07 +02:00
|
|
|
can be generated by `dump-openapi.py`. The script does not convert
|
|
|
|
|
the extensions described further in this document so there can be minor
|
|
|
|
|
interoperability issues with tooling that expects compliant OpenAPI.
|
2021-10-14 21:23:04 +02:00
|
|
|
|
|
|
|
|
## Custom `x-addedInMatrixVersion` key
|
|
|
|
|
|
|
|
|
|
This property is added throughout the OpenAPI schemas to denote which version
|
|
|
|
|
of the Matrix specification added the associated object (endpoint, parameter,
|
|
|
|
|
property, etc).
|
2021-12-02 18:22:58 +01:00
|
|
|
|
|
|
|
|
## Custom `x-changedInMatrixVersion` key
|
|
|
|
|
|
|
|
|
|
A variation of the above: indicates changes to the associated parameter in
|
|
|
|
|
particular Matrix specification versions.
|
2024-04-09 19:06:53 +02:00
|
|
|
|
|
|
|
|
## Use of `$ref` inside examples
|
|
|
|
|
|
|
|
|
|
Although the OpenAPI/JSON Schema specs only allow to use `$ref` to reference a
|
|
|
|
|
whole example, we use it to compose examples from other examples.
|