From 01ef28a792dea4f9494a5c0247640a0061ac6dcf Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Sat, 20 Apr 2024 16:21:15 -0700 Subject: [PATCH] Correctly escape example operationRef URLs --- versions/3.0.4.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/versions/3.0.4.md b/versions/3.0.4.md index 9bab2e150e..61cab0f245 100644 --- a/versions/3.0.4.md +++ b/versions/3.0.4.md @@ -2124,7 +2124,7 @@ field in an [Operation Object](#operationObject)), references MAY also be made t links: UserRepositories: # returns array of '#/components/schemas/repository' - operationRef: '#/paths/~12.0~1repositories~1{username}/get' + operationRef: '#/paths/~12.0~1repositories~1%7Busername%7D/get' parameters: username: $response.body#/username ``` @@ -2135,13 +2135,14 @@ or an absolute `operationRef`: links: UserRepositories: # returns array of '#/components/schemas/repository' - operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get + operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1%7Busername%7D/get parameters: username: $response.body#/username ``` Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when -using JSON references. +using JSON Pointers, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively when +using JSON Pointers as URI fragments. ##### Runtime Expressions