Repository navigation
Version 2.0.0 Alpha 3
Pre-releaseCloses #143.
The all(of:), any(of:), one(of:), and not JSON Schema cases in OpenAPIKit used to only support an optional discriminator as metadata directly on the schema component containing the compound property. Now they all support the full CoreContext (with any format) so that title, description, etc. can be specified on them. This version also closes a gap in representability of required/nullable/optional compound schemas.
This kind of thing was not previously representable in OpenAPIKit:
{
"title": "a compound thing",
"oneOf": [
...
]
}⚠️ Breaking Changes ⚠️
This is a breaking change for the aforementioned cases on JSONSchema.
If you previously matched on .not(let schema), you now must match on .not(let schema, core: let coreContext).
If you previously matched on .any(of: let schemas, discriminator: let discriminator) (or the similar patterns for all or one), you now must match on .any(of: let schemas, core: let coreContext); you will find the discriminator at coreContext.discriminator.
If you previously created a schema with .any(of: [...], discriminator: nil) (or the similar patterns for all or one), you can now just create the default empty CoreContext: .any(of: [...], core: .init()).