Releases: mattpolzin/OpenAPIKit
Refinements
- Omit some things that are not required when they have their default values.
- Add some Content Types.
- Some file restructuring and test coverage.
Better OpenAPI node generation for arbitrary Sampleable types
Brought a generation function over from JSONAPI+OpenAPI that really belongs here; that function generates OpenAPI nodes from any type that conforms to Sampleable. This means many types of JSON data can get out of box documentation.
Renamed a few functions and similar small changes, did a lot of work on node generation that could break downstream stuff in JSONAPI+OpenAPI dependents.
Additions, Tests, Fixes
- Add
styleandexplodetoOpenAPI.Content.Encoding - Move vendor extensions encoding into shared protocol extension.
- Add a bunch of custom encoding implementations to fix a bug where
nullwas being written (from a small subset of types) when a property should simply be omitted from the encoded value. - Add some tests.
- Better error checking around vendor extension decoding.
The change to omit certain values instead of encoding null is both a fix and a breaking change.
Add remaining `Parameter` properties
Added remaining Parameter properties. These were added under a new Parameter.Schema type because they are not applicable if a Content.Map is used instead of a JSONSchema.
Some restructuring was done when nesting Parameter's JSONSchema under a new Parameter.Schema type.
Ease-of-use improvements
Focused on making declarative OpenAPI documents easier to write in Swift.
A number of changes to function/initializer arguments or argument names were made. Some of these are breaking and others are not but all of them make declarative document definitions cleaner.
Add convenience constructors for `Parameter.schemaOrContent`
0.5.4 Add convenience constructors for Parameter schemaOrContent
Add `trace` HttpVerb case
Add missing HttpVerb.trace case.
Add checks for which case a `Parameter.Location` is in
0.5.2 Add convenience checks for which case a Parameter.Location is in
Add `required` to `Parameter`
0.5.1 Expose Parameter.Location's required property on the Parameter struct
Numerous Additions
Added support for Example Object and with it examples on Components Object and Media Type Object.
Rounded off test coverage of Media Type Object.
Added a number of other small things.
Requires Swift 5.1