-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: nullability breaks object comparison (#202)
- Loading branch information
Showing
11 changed files
with
194 additions
and
6 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Kompendium | ||
project.version=2.1.0 | ||
project.version=2.1.1 | ||
# Kotlin | ||
kotlin.code.style=official | ||
# Gradle | ||
|
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
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
119 changes: 119 additions & 0 deletions
119
kompendium-core/src/test/resources/nullable_fields.json
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,119 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Test API", | ||
"version": "1.33.7", | ||
"description": "An amazing, fully-ish 😉 generated API spec", | ||
"termsOfService": "https://example.com", | ||
"contact": { | ||
"name": "Homer Simpson", | ||
"url": "https://gph.is/1NPUDiM", | ||
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "MIT", | ||
"url": "https://github.com/bkbnio/kompendium/blob/main/LICENSE" | ||
} | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://myawesomeapi.com", | ||
"description": "Production instance of my API" | ||
}, | ||
{ | ||
"url": "https://staging.myawesomeapi.com", | ||
"description": "Where the fun stuff happens" | ||
} | ||
], | ||
"paths": { | ||
"/nullable/nested": { | ||
"post": { | ||
"tags": [], | ||
"summary": "Has a bunch of nullable fields", | ||
"description": "Should still work!", | ||
"parameters": [], | ||
"requestBody": { | ||
"description": "Cool", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/ProfileUpdateRequest" | ||
} | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "A successful endeavor", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/TestResponse" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"deprecated": false | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"ProfileUpdateRequest": { | ||
"properties": { | ||
"metadata": { | ||
"$ref": "#/components/schemas/ProfileMetadataUpdateRequest" | ||
}, | ||
"mood": { | ||
"type": "string", | ||
"nullable": true | ||
}, | ||
"viewCount": { | ||
"format": "int64", | ||
"type": "integer", | ||
"nullable": true | ||
} | ||
}, | ||
"required": [ | ||
"mood", | ||
"viewCount", | ||
"metadata" | ||
], | ||
"type": "object" | ||
}, | ||
"ProfileMetadataUpdateRequest": { | ||
"properties": { | ||
"isPrivate": { | ||
"type": "boolean", | ||
"nullable": true | ||
}, | ||
"otherThing": { | ||
"type": "string", | ||
"nullable": true | ||
} | ||
}, | ||
"required": [ | ||
"isPrivate", | ||
"otherThing" | ||
], | ||
"type": "object" | ||
}, | ||
"TestResponse": { | ||
"properties": { | ||
"c": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"c" | ||
], | ||
"type": "object" | ||
} | ||
}, | ||
"securitySchemes": {} | ||
}, | ||
"security": [], | ||
"tags": [] | ||
} |
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
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 |
---|---|---|
|
@@ -189,3 +189,4 @@ object BasicModels { | |
val d: Boolean | ||
) | ||
} | ||
|