From c0083de076b10c8f0f2058db1a9e323f2e42ecf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 23 Apr 2024 19:30:19 +0200 Subject: [PATCH] Improve OpenAPI Extensions docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- openapi_extensions.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openapi_extensions.md b/openapi_extensions.md index ee72d47e..e8fd1002 100644 --- a/openapi_extensions.md +++ b/openapi_extensions.md @@ -34,9 +34,10 @@ whole example, we use it to compose examples from other examples. ## Custom `x-pattern-format` key and custom formats -In JSON Schema, `format` is a property to convey semantic information about a -schema. We define `x-pattern-format` as a key on the schemas under -`patternProperties` with the same use as `format`, but that applies to the -pattern of the property. We also define custom values for formats with the `mx-` -prefix in `data/custom-formats.yaml`. Those values are recognized in the -rendered specification and link to the definition of the format. +In JSON Schema, [`format`](https://json-schema.org/understanding-json-schema/reference/string#format) +is a property to convey semantic information about a schema. We define +`x-pattern-format` as a key on the schemas under `patternProperties` with the +same use as `format`, but that applies to the pattern of the property. We also +define custom values for formats with the `mx-` prefix in +`data/custom-formats.yaml`. Those values are recognized in the rendered +specification and link to the definition of the format.