-
Notifications
You must be signed in to change notification settings - Fork 0
feat: nullable in OAS 3.0 is equivalent to union with null type in 3.1 #42
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 all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f6751ec
feat: OAS 3.0 to OAS 3.1 comparison
makeev-pavel 0b03981
feat: Updated data for lint
makeev-pavel d7c8c5c
feat: Updated tests
makeev-pavel 950a13b
fix: Refactoring
makeev-pavel 159918a
feat: Added factory and origins
makeev-pavel 9700da8
feat: Refactoring
makeev-pavel 100c15d
feat: Fixed tests
makeev-pavel b80f232
feat: Refactoring
makeev-pavel c44b8a0
Merge branch 'develop' into feature/oas-30-to-31-comparison
makeev-pavel 2a5503c
feat: Updated tests
makeev-pavel d7a7c50
feat: Update test
makeev-pavel 6677393
feat: Review
makeev-pavel 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
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
38 changes: 38 additions & 0 deletions
38
...s/openapi-3_0-to-3_1/could-compare-overridden-description-via-reference-object/after.json
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,38 @@ | ||
| { | ||
| "openapi": "3.1.0", | ||
| "info": { | ||
| "title": "Swagger Petstore - OpenAPI 3.1", | ||
| "version": "1.0.12" | ||
| }, | ||
| "paths": { | ||
| "/path1": { | ||
| "post": { | ||
| "responses": { | ||
| "200": { | ||
| "$ref": "#/components/responses/response200", | ||
| "description": "response description override" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "components": { | ||
| "responses": { | ||
| "response200": { | ||
| "description": "response description from components", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { | ||
| "type": "integer" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
37 changes: 37 additions & 0 deletions
37
.../openapi-3_0-to-3_1/could-compare-overridden-description-via-reference-object/before.json
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,37 @@ | ||
| { | ||
| "openapi": "3.0.4", | ||
| "info": { | ||
| "title": "Swagger Petstore - OpenAPI 3.1", | ||
| "version": "1.0.12" | ||
| }, | ||
| "paths": { | ||
| "/path1": { | ||
| "post": { | ||
| "responses": { | ||
| "200": { | ||
| "$ref": "#/components/responses/response200" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "components": { | ||
| "responses": { | ||
| "response200": { | ||
| "description": "response description from components", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { | ||
| "type": "integer" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
...per/resources/openapi-3_0-to-3_1/empty-schemas-are-equivalent-between-versions/after.json
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,23 @@ | ||
| { | ||
| "openapi": "3.1.0", | ||
| "info": { | ||
| "title": "test", | ||
| "version": "0.1.0" | ||
| }, | ||
| "paths": { | ||
| "/path1": { | ||
| "post": { | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": {} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
...er/resources/openapi-3_0-to-3_1/empty-schemas-are-equivalent-between-versions/before.json
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,23 @@ | ||
| { | ||
| "openapi": "3.0.4", | ||
| "info": { | ||
| "title": "test", | ||
| "version": "0.1.0" | ||
| }, | ||
| "paths": { | ||
| "/path1": { | ||
| "post": { | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": {} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
39 changes: 39 additions & 0 deletions
39
...i-3_0-to-3_1/nullable-is-equivalent-to-anyOf-with-null-type-for-schema-via-ref/after.json
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,39 @@ | ||
| { | ||
| "openapi": "3.1.0", | ||
| "info": { | ||
| "title": "test", | ||
| "version": "0.1.0" | ||
| }, | ||
| "paths": { | ||
| "/path1": { | ||
| "get": { | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/MySchema" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "components": { | ||
| "schemas": { | ||
| "MySchema": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.