Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed examples in Overlay proposal #2086

Merged
merged 1 commit into from
Jan 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions proposals/004_Overlays.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ info:
version: 1.0.0
updates:
- target: "@"
value:
info:
x-overlay-applied: structured-overlay
paths:
"/":
summary: "The root resource"
get:
summary: "Retrieve the root resource"
x-rate-limit: 100
"/pets":
get:
summary: "Retrieve a list of pets"
x-rate-limit: 100
components:
tags:
value:
info:
x-overlay-applied: structured-overlay
paths:
"/":
summary: "The root resource"
get:
summary: "Retrieve the root resource"
x-rate-limit: 100
"/pets":
get:
summary: "Retrieve a list of pets"
x-rate-limit: 100
components:
tags:
```

##### Targeted Overlays
Expand All @@ -107,16 +107,16 @@ info:
version: 1.0.0
updates:
- target: paths."/foo".get
value:
description: This is the new description
value:
description: This is the new description
- target: paths."/bar".get
value:
description: This is the updated description
value:
description: This is the updated description
- target: paths."/bar"
value:
post:
description: This is an updated description of a child object
x-safe: false
value:
post:
description: This is an updated description of a child object
x-safe: false
```

##### Wildcard Overlays Examples
Expand All @@ -130,12 +130,12 @@ info:
version: 1.0.0
updates:
- target: paths.*.get
value:
x-safe: true
value:
x-safe: true
- target: paths.*.get.parameters[?name=='filter' && in=='query']
value:
schema:
$ref: "/components/schemas/filterSchema"
value:
schema:
$ref: "/components/schemas/filterSchema"
```

##### Array Modification Examples
Expand All @@ -149,9 +149,9 @@ info:
version: 1.0.0
updates:
- target: paths.*.get.parameters[length(@)]
value:
name: newParam
in: query
value:
name: newParam
in: query
```

```yaml
Expand All @@ -161,7 +161,7 @@ info:
version: 1.0.0
updates:
- target: $.paths[*].get.parameters[? name == 'dummy']
remove: true
remove: true
```

## Proposal Summary
Expand Down