-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
230fe9b
commit 1c0c8e4
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
tests/data/openapi/schemas_via_path_references/cat/paths.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,19 @@ | ||
cat: | ||
get: | ||
summary: Get a cat | ||
responses: | ||
200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './schemas.yaml#/CatDetails' | ||
cats: | ||
get: | ||
summary: Get all cats | ||
responses: | ||
200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './schemas.yaml#/CatList' | ||
|
41 changes: 41 additions & 0 deletions
41
tests/data/openapi/schemas_via_path_references/cat/schemas.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,41 @@ | ||
CatInfo: | ||
type: object | ||
required: | ||
- cat_id | ||
properties: | ||
cat_id: | ||
type: string | ||
description: ID of this cat | ||
details: | ||
$ref: "#/CatDetails" | ||
|
||
CatDetails: | ||
type: object | ||
required: | ||
- name | ||
- birthYear | ||
properties: | ||
name: | ||
type: string | ||
description: Name of this cat | ||
birthYear: | ||
type: number | ||
description: Year of this cat's birth | ||
|
||
|
||
CatList: | ||
type: array | ||
items: | ||
$ref: "#/CatShort" | ||
|
||
CatShort: | ||
type: object | ||
required: | ||
- cat_id | ||
properties: | ||
cat_id: | ||
type: string | ||
description: ID of this cat | ||
name: | ||
type: string | ||
description: Name of this cat |
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,9 @@ | ||
openapi: 3.1.0 | ||
info: | ||
title: "Entity Schemas" | ||
version: '1' | ||
paths: | ||
/cat: | ||
$ref: "./cat/paths.yaml#/cat" | ||
/cats: | ||
$ref: "./cat/paths.yaml#/cats" |
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