-
Notifications
You must be signed in to change notification settings - Fork 25
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
23f3dc3
commit 60bc8fc
Showing
2 changed files
with
79 additions
and
0 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,27 @@ | ||
# https://swagger.io/docs/specification/describing-parameters/#common-for-path | ||
openapi: 3.0.3 | ||
info: | ||
title: Spec with both path-level and operation-level parameters | ||
paths: | ||
/users/{id}: | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: The user ID. | ||
# GET/users/{id}?metadata=true | ||
get: | ||
summary: Gets a user by ID | ||
# Note we only define the query parameter, because the {id} is defined at the path level. | ||
parameters: | ||
- in: query | ||
name: metadata | ||
schema: | ||
type: boolean | ||
required: false | ||
description: If true, the endpoint returns only the user metadata. | ||
responses: | ||
'200': | ||
description: OK |