-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1803 from microsoft/mk/fix-reference-copying
Copy over references for all IOpenApiReferenceable objects
- Loading branch information
Showing
5 changed files
with
242 additions
and
33 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
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
79 changes: 79 additions & 0 deletions
79
test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/docWithReusableHeadersAndExamples.yaml
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,79 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Example with Multiple Operations and Local $refs | ||
version: 1.0.0 | ||
paths: | ||
/items: | ||
get: | ||
operationId: getItems | ||
summary: Get a list of items | ||
responses: | ||
'200': | ||
description: A list of items | ||
headers: | ||
x-custom-header: | ||
$ref: '#/components/headers/CustomHeader' | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
type: string | ||
examples: | ||
ItemExample: | ||
$ref: '#/components/examples/ItemExample' | ||
post: | ||
operationId: createItem | ||
summary: Create a new item | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
example: | ||
$ref: '#/components/examples/ItemExample' | ||
responses: | ||
'201': | ||
description: Item created | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
name: | ||
type: string | ||
example: | ||
$ref: '#/components/examples/ItemExample' | ||
components: | ||
schemas: | ||
pet: | ||
type: object | ||
required: | ||
- id | ||
- name | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string | ||
headers: | ||
CustomHeader: | ||
description: Custom header for authentication | ||
required: true | ||
schema: | ||
type: string | ||
examples: | ||
ItemExample: | ||
summary: Example of a new item to be created | ||
value: | ||
name: "New Item" | ||
|