-
Notifications
You must be signed in to change notification settings - Fork 28
ci: sets up testing infra for 1.1 version #180
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
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ebd36f2
ci: adds test infrastructure for v1.1
baywet c35312b
feat: adds a schemas for v1.1
baywet e319160
tests: updates v1.0 tests to be semantically valid
baywet 06545e7
tests: duplicates all v1.0 test files to v1.1
baywet fd6b04e
Revert "tests: updates v1.0 tests to be semantically valid"
baywet fd3d477
Merge branch 'v1.1-dev' into chore/v1.1-dev-setup
baywet f43a2e9
chore: aligns v1.1 schema with v1.0
baywet aa5902d
tests: removes extraneous test
baywet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,70 @@ | ||
| $id: https://spec.openapis.org/overlay/1.1/schema/WORK-IN-PROGRESS | ||
| $schema: https://json-schema.org/draft/2020-12/schema | ||
| description: The description of Overlay v1.1.x documents | ||
| type: object | ||
| properties: | ||
| overlay: | ||
| type: string | ||
| pattern: ^1\.1\.\d+$ | ||
| info: | ||
| $ref: "#/$defs/info-object" | ||
| extends: | ||
| type: string | ||
| format: uri-reference | ||
| actions: | ||
| type: array | ||
| minItems: 1 | ||
| uniqueItems: true | ||
| items: | ||
| $ref: "#/$defs/action-object" | ||
| required: | ||
| - overlay | ||
| - info | ||
| - actions | ||
| $ref: "#/$defs/specification-extensions" | ||
| unevaluatedProperties: false | ||
| $defs: | ||
| info-object: | ||
| type: object | ||
| properties: | ||
| title: | ||
| type: string | ||
| version: | ||
| type: string | ||
| required: | ||
| - title | ||
| - version | ||
| $ref: "#/$defs/specification-extensions" | ||
| unevaluatedProperties: false | ||
| action-object: | ||
| properties: | ||
| target: | ||
| type: string | ||
| pattern: ^\$ | ||
| description: | ||
| type: string | ||
| oneOf: | ||
| - properties: | ||
| update: | ||
| type: | ||
| - string | ||
| - boolean | ||
| - object | ||
| - array | ||
| - number | ||
| - "null" | ||
| required: | ||
| - update | ||
| - properties: | ||
| remove: | ||
| type: boolean | ||
| default: false | ||
| required: | ||
| - remove | ||
| required: | ||
| - target | ||
| $ref: "#/$defs/specification-extensions" | ||
| unevaluatedProperties: false | ||
| specification-extensions: | ||
| patternProperties: | ||
| ^x-: true |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ info: | |
| actions: | ||
| - target: '$' # Root of document | ||
| description: this is an action description | ||
| update: {} | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ info: | |
| actions: | ||
| - target: '$' # Root of document | ||
| x-myActionsExtension: {} | ||
| update: {} | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ info: | |
| x-myInfoExtension: {} | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: {} | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ info: | |
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: {} | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -4,4 +4,5 @@ info: | |
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: {} | ||
| x-myExtension: {} | ||
This file contains hidden or 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,7 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Actions invalid description | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| description: 10 |
This file contains hidden or 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,7 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Invalid `target`, must begin with `$` | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: info.description | ||
| update: An updated description |
This file contains hidden or 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,5 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Minimal actions | ||
| version: 1.0.0 | ||
| actions: [] |
This file contains hidden or 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,6 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Missing actions `target` | ||
| version: 1.0.0 | ||
| actions: | ||
| - update: my description |
This file contains hidden or 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,5 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Missing `actions` | ||
| version: 1.0.0 | ||
| extends: '/openapi.yaml' |
This file contains hidden or 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 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Actions not unique | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$.info.title' | ||
| update: 'My New title' | ||
| - target: '$.info.title' | ||
| update: 'My New title' |
This file contains hidden or 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,7 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Invalid `extends` type | ||
| version: 1.0.0 | ||
| extends: {} | ||
| actions: | ||
| - target: '$' # Root of document |
This file contains hidden or 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,5 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document |
This file contains hidden or 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,5 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Missing Info version | ||
| actions: | ||
| - target: '$' # Root of document |
This file contains hidden or 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,6 @@ | ||
| overlay: 2 | ||
| info: | ||
| title: Invalid Overlay version | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document |
This file contains hidden or 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,5 @@ | ||
| - root | ||
| - must | ||
| - be | ||
| - an | ||
| - object |
This file contains hidden or 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 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Update many objects at once | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: $.paths.*.get | ||
| update: | ||
| x-safe: true | ||
| remove: true | ||
| description: This test could technically be in 1.0 but I'm not sure whether we can edit the schema at this point. |
11 changes: 11 additions & 0 deletions
11
tests/v1.1/pass/actions-array-modification-example-remove.yaml
This file contains hidden or 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,11 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Add an array element | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: $.paths.*.get.parameters | ||
| update: | ||
| name: newParam | ||
| in: query | ||
| schema: | ||
| type: string |
7 changes: 7 additions & 0 deletions
7
tests/v1.1/pass/actions-array-modification-example-update.yaml
This file contains hidden or 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,7 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Remove a array element | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: $.paths.*.get.parameters[[email protected] == 'dummy'] | ||
| remove: true |
This file contains hidden or 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,8 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Actions Description | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| description: this is an action description | ||
| update: {} |
This file contains hidden or 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,8 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Actions Extensions | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| x-myActionsExtension: {} | ||
| update: {} |
This file contains hidden or 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,22 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Structured Overlay | ||
| version: 1.0.0 | ||
| extends: '/openapi.yaml' | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: | ||
| 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: [] |
This file contains hidden or 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,16 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Targeted Overlay | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: $.paths['/foo'].get | ||
| update: | ||
| description: This is the new description | ||
| - target: $.paths['/bar'].get | ||
| update: | ||
| description: This is the updated description | ||
| - target: $.paths['/bar'] | ||
| update: | ||
| post: | ||
| description: This is an updated description of a child object | ||
| x-safe: false |
This file contains hidden or 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,14 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Apply Traits | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: $.paths.*.get[[email protected]] | ||
| update: | ||
| parameters: | ||
| - name: top | ||
| in: query | ||
| # ... | ||
| - name: skip | ||
| in: query | ||
| # ... |
This file contains hidden or 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,12 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Update many objects at once | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: $.paths.*.get | ||
| update: | ||
| x-safe: true | ||
| - target: $.paths.*.get.parameters[[email protected]=='filter' && @.in=='query'] | ||
| update: | ||
| schema: | ||
| $ref: '#/components/schemas/filterSchema' |
This file contains hidden or 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,8 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Info Extensions | ||
| version: 1.0.0 | ||
| x-myInfoExtension: {} | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: {} |
This file contains hidden or 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,7 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Minimal | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: {} |
This file contains hidden or 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,8 @@ | ||
| overlay: 1.1.0 | ||
| info: | ||
| title: Root Extensions | ||
| version: 1.0.0 | ||
| actions: | ||
| - target: '$' # Root of document | ||
| update: {} | ||
| x-myExtension: {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.