From 00d094891c48f5e76f46efd291fa3a9e08210a55 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jul 2026 13:51:17 -0400 Subject: [PATCH 1/2] docs: add x-jsonschema-contentMediaType extension page Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../x-jsonschema-contentMediaType.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 registries/_extension/x-jsonschema-contentMediaType.md diff --git a/registries/_extension/x-jsonschema-contentMediaType.md b/registries/_extension/x-jsonschema-contentMediaType.md new file mode 100644 index 0000000..421d1c1 --- /dev/null +++ b/registries/_extension/x-jsonschema-contentMediaType.md @@ -0,0 +1,39 @@ +--- +owner: mikekistler +issue: +description: The JSON Schema contentMediaType annotation, used when targeting OpenAPI versions that do not directly support it. +schema: + type: string +objects: [ "Schema Object" ] +layout: default +--- + +{% capture summary %} +JSON Schema defines the `contentMediaType` annotation to describe the media type of a string value's decoded content. + +The `x-jsonschema-contentMediaType` extension mirrors this JSON Schema keyword when targeting OpenAPI versions where the keyword is not directly available, serializing it as `x-jsonschema-contentMediaType`. + +It can appear as a property in the following objects: `{{page.objects|jsonify}}`. + +Used by: (informational) + +* [Microsoft.OpenApi](https://github.com/microsoft/OpenAPI.NET) (.NET OpenAPI library) +{% endcapture %} + +{% capture example %} +```yaml +openapi: 3.0.4 +info: + title: My API + version: 1.0.0 +paths: {} +components: + schemas: + PngImage: + type: string + x-jsonschema-contentEncoding: base64 + x-jsonschema-contentMediaType: image/png +``` +{% endcapture %} + +{% include extension-entry.md summary=summary example=example %} From 56384b8ee2cef7b9c0e2de4306353ed266006f0e Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Jul 2026 13:55:38 -0400 Subject: [PATCH 2/2] docs: update owner for x-jsonschema-contentMediaType extension page --- registries/_extension/x-jsonschema-contentMediaType.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registries/_extension/x-jsonschema-contentMediaType.md b/registries/_extension/x-jsonschema-contentMediaType.md index 421d1c1..a863ae1 100644 --- a/registries/_extension/x-jsonschema-contentMediaType.md +++ b/registries/_extension/x-jsonschema-contentMediaType.md @@ -1,5 +1,5 @@ --- -owner: mikekistler +owner: baywet issue: description: The JSON Schema contentMediaType annotation, used when targeting OpenAPI versions that do not directly support it. schema: