-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dedicated diff for components.params (#354)
- Loading branch information
Reuven Harrison
authored
Aug 2, 2023
1 parent
3a7f646
commit f40f595
Showing
17 changed files
with
424 additions
and
67 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,25 @@ | ||
openapi: 3.0.3 | ||
|
||
components: | ||
parameters: | ||
differentComponentName_A: | ||
name: sameParamName | ||
in: query | ||
required: true | ||
schema: | ||
type: string | ||
enum: | ||
- option_1 | ||
- option_2 | ||
default: option_1 | ||
description: Let's mention both options, option_1 and option_2. | ||
differentComponentName_B: | ||
name: sameParamName | ||
in: query | ||
required: false | ||
schema: | ||
type: string | ||
enum: | ||
- option_1 | ||
default: option_1 | ||
description: Let's mention the only option, option_1. |
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,20 @@ | ||
openapi: 3.0.3 | ||
|
||
components: | ||
headers: | ||
differentComponentName_A: | ||
schema: | ||
type: string | ||
enum: | ||
- option_1 | ||
- option_2 | ||
default: option_1 | ||
description: Let's mention both options, option_1 and option_2. | ||
differentComponentName_B: | ||
schema: | ||
type: string | ||
enum: | ||
- option_1 | ||
default: option_1 | ||
description: Let's mention the only option, option_1. | ||
|
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,25 @@ | ||
openapi: 3.0.3 | ||
|
||
components: | ||
parameters: | ||
differentComponentName_A: | ||
name: sameParamName | ||
in: header | ||
required: true | ||
schema: | ||
type: string | ||
enum: | ||
- option_1 | ||
- option_2 | ||
default: option_1 | ||
description: Let's mention both options, option_1 and option_2. | ||
differentComponentName_B: | ||
name: sameParamName | ||
in: query | ||
required: false | ||
schema: | ||
type: string | ||
enum: | ||
- option_1 | ||
default: option_1 | ||
description: Let's mention the only option, option_1. |
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,10 @@ | ||
openapi: 3.0.3 | ||
|
||
components: | ||
schemas: | ||
differentComponentName_A: | ||
name: sameParamName | ||
type: string | ||
differentComponentName_B: | ||
name: sameParamName | ||
type: string |
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,51 @@ | ||
openapi: 3.0.0 | ||
|
||
info: | ||
title: My API | ||
version: '0.1' | ||
|
||
paths: | ||
/books/{bookId}: | ||
|
||
get: | ||
summary: get book details | ||
description: get details for a book | ||
|
||
parameters: | ||
- $ref: "#/components/parameters/bookId" | ||
|
||
responses: | ||
'200': | ||
description: successfully retrieved book details | ||
|
||
content: | ||
application/json: | ||
schema: | ||
title: book details | ||
type: object | ||
|
||
required: | ||
- author | ||
- title | ||
|
||
properties: | ||
author: | ||
title: book author name | ||
type: string | ||
|
||
title: | ||
title: book title | ||
type: string | ||
|
||
components: | ||
parameters: | ||
bookId: | ||
in: path | ||
name: bookId | ||
description: book ID | ||
required: true | ||
|
||
schema: | ||
title: ID | ||
type: string | ||
|
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,51 @@ | ||
openapi: 3.0.0 | ||
|
||
info: | ||
title: My API | ||
version: '0.1' | ||
|
||
paths: | ||
/books/{id}: | ||
|
||
get: | ||
summary: get book details | ||
description: get details for a book | ||
|
||
parameters: | ||
- $ref: "#/components/parameters/id" | ||
|
||
responses: | ||
'200': | ||
description: successfully retrieved book details | ||
|
||
content: | ||
application/json: | ||
schema: | ||
title: book details | ||
type: object | ||
|
||
required: | ||
- author | ||
- title | ||
|
||
properties: | ||
author: | ||
title: book author name | ||
type: string | ||
|
||
title: | ||
title: book title | ||
type: string | ||
|
||
components: | ||
parameters: | ||
id: | ||
in: path | ||
name: id | ||
description: book ID | ||
required: true | ||
|
||
schema: | ||
title: ID | ||
type: string | ||
|
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.