-
-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
271 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
"components": { | ||
"callbacks": { | ||
"MyCallbackEvent": { | ||
"{$request.query.queryUrl}": { | ||
"post": { | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/SomeOtherPayload" | ||
} | ||
} | ||
}, | ||
"description": "Callback payload" | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "callback successfully processed" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"schemas": { | ||
"SomeOtherPayload": { | ||
"type": "boolean" | ||
}, | ||
"SomePayload": { | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"info": { | ||
"title": "Callback refd", | ||
"version": "1.2.3" | ||
}, | ||
"openapi": "3.1.0", | ||
"paths": { | ||
"/other": { | ||
"post": { | ||
"callbacks": { | ||
"myEvent": { | ||
"$ref": "#/components/callbacks/MyCallbackEvent" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"description": "bla\nbla\nbla\n", | ||
"in": "query", | ||
"name": "queryUrl", | ||
"required": true, | ||
"schema": { | ||
"example": "https://example.com", | ||
"format": "uri", | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"description": "" | ||
} | ||
} | ||
} | ||
}, | ||
"/trans": { | ||
"post": { | ||
"callbacks": { | ||
"transactionCallback": { | ||
"http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}": { | ||
"post": { | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/SomePayload" | ||
} | ||
} | ||
}, | ||
"description": "Callback payload" | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "callback successfully processed" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"requestBody": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"properties": { | ||
"email": { | ||
"format": "email" | ||
}, | ||
"id": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"description": "subscription successfully created" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
openapi3/testdata/recursiveRef/openapi.yml.internalized.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"components": { | ||
"parameters": { | ||
"number": { | ||
"in": "query", | ||
"name": "someNumber", | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"schemas": { | ||
"Bar": { | ||
"example": "bar", | ||
"type": "string" | ||
}, | ||
"Foo": { | ||
"properties": { | ||
"bar": { | ||
"$ref": "#/components/schemas/Bar" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"Foo2": { | ||
"properties": { | ||
"foo": { | ||
"$ref": "#/components/schemas/Foo" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"info": { | ||
"title": "Recursive refs example", | ||
"version": "1.0" | ||
}, | ||
"openapi": "3.0.3", | ||
"paths": { | ||
"/foo": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"properties": { | ||
"foo2": { | ||
"$ref": "#/components/schemas/Foo2" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"description": "OK" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/components/parameters/number" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"components": { | ||
"schemas": { | ||
"Test": { | ||
"properties": { | ||
"test": { | ||
"$ref": "#/components/schemas/b" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"a": { | ||
"type": "string" | ||
}, | ||
"b": { | ||
"description": "I use a local reference.", | ||
"properties": { | ||
"name": { | ||
"$ref": "#/components/schemas/a" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
"info": { | ||
"license": { | ||
"name": "MIT" | ||
}, | ||
"title": "Some Swagger", | ||
"version": "1.0.0" | ||
}, | ||
"openapi": "3.0.1", | ||
"paths": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"components": { | ||
"schemas": { | ||
"AnotherTestSchema": { | ||
"type": "string" | ||
}, | ||
"CustomTestSchema": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"info": { | ||
"title": "OAI Specification w/ refs in YAML", | ||
"version": "1" | ||
}, | ||
"openapi": "3.0.0", | ||
"paths": { | ||
} | ||
} |