Skip to content

Commit

Permalink
Drop uri-reference format for template URLs
Browse files Browse the repository at this point in the history
`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:
- OAI#2586
- OAI#3235
- OAI#3256
- davishmcclurg/json_schemer#158

[0]: https://spec.openapis.org/oas/v3.1.0#server-object-example
[1]: https://spec.openapis.org/oas/v3.1.0#operationref-examples
  • Loading branch information
davishmcclurg committed Nov 20, 2023
1 parent 6627c32 commit 5f765f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion schemas/v3.0/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@ definitions:
type: string
operationRef:
type: string
format: uri-reference
parameters:
type: object
additionalProperties: {}
Expand Down
2 changes: 0 additions & 2 deletions schemas/v3.1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ $defs:
properties:
url:
type: string
format: uri-reference
description:
type: string
variables:
Expand Down Expand Up @@ -632,7 +631,6 @@ $defs:
properties:
operationRef:
type: string
format: uri-reference
operationId:
type: string
parameters:
Expand Down

0 comments on commit 5f765f2

Please sign in to comment.