From 5f765f29e3c12dcab370f5155fe21c6895a8ac5e Mon Sep 17 00:00:00 2001 From: David Harsha Date: Mon, 20 Nov 2023 09:26:05 -0800 Subject: [PATCH] Drop `uri-reference` format for template URLs `Server.url` and `Link.operationRef` both allow variable substitution with {brackets}, which means they're not always valid URI references. For example, the [current specification][0] shows `https://{username}.gigantic-server.com:{port}/{basePath}` as a Server Object `url`, but it's not a valid URI reference because the host includes curly brackets. [`operationRef`][1] similarly includes `https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get` as an example that isn't valid using the `uri-reference` format. I looked into the other uses of `uri-reference` and they seemed ok. Related: - https://github.com/OAI/OpenAPI-Specification/pull/2586 - https://github.com/OAI/OpenAPI-Specification/pull/3235 - https://github.com/OAI/OpenAPI-Specification/issues/3256 - https://github.com/davishmcclurg/json_schemer/issues/158 [0]: https://spec.openapis.org/oas/v3.1.0#server-object-example [1]: https://spec.openapis.org/oas/v3.1.0#operationref-examples --- schemas/v3.0/schema.yaml | 1 - schemas/v3.1/schema.yaml | 2 -- 2 files changed, 3 deletions(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 077c05cd19..f788612b78 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -975,7 +975,6 @@ definitions: type: string operationRef: type: string - format: uri-reference parameters: type: object additionalProperties: {} diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 791f53dfde..79669cad86 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -119,7 +119,6 @@ $defs: properties: url: type: string - format: uri-reference description: type: string variables: @@ -632,7 +631,6 @@ $defs: properties: operationRef: type: string - format: uri-reference operationId: type: string parameters: