Skip to content

Fix curl X-Filter examples by using single-line header data #709

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

Merged
merged 1 commit into from
Nov 14, 2022
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
19 changes: 3 additions & 16 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ info:

```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"class": "standard"
}'
-H 'X-Filter: { "class": "standard" }'
```

The filter object's keys are the keys of the object you're filtering,
Expand All @@ -243,11 +240,7 @@ info:

```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"class": "standard",
"vcpus": 1
}'
-H 'X-Filter: { "class": "standard", "vcpus": 1 }'
```

In the above example, both filters are combined with an "and" operation.
Expand All @@ -256,13 +249,7 @@ info:

```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"+or": [
{ "vcpus": 1 },
{ "class": "standard" }
]
}'
-H 'X-Filter: { "+or": [ { "vcpus": 1 }, { "class": "standard" } ] }'
```

Each filter in the `+or` array is its own filter object, and all conditions
Expand Down