Skip to content

Formats on Formats (release candidate)

Pre-release
Pre-release
Compare
Choose a tag to compare
@mattpolzin mattpolzin released this 05 Nov 00:09
da5b380

What's Changed

  • Adds missing contentMediaType and contentEncoding properties to JSONSchema.string() convenience constructor functions (#334)
  • Adds a few more builtin content types I was surprised to have not included already (#335)
  • JSON Schema String Format Updates (#337)

Breaking Changes

There are no breaking changes to the OpenAPIKit30 module. The following all apply to the OpenAPIKit module.

  • There is no longer .extended formats for .string JSON Schemas. Instead, all existing .extended formats are now just regular .string formats (e.g. you can just replace .extended(.uuid) with .uuid).
  • There are no longer .byte or .binary formats for .string JSON Schemas. Instead, use the contentEncodings of .base64 and .binary, respectively.
  • The .uriReference .extended JSON Schema .string format used to serialize to uriref whereas the new .uriReference JSON Schema .string format serializes to uri-reference, per the JSON Schema standard.
  • The new builtin ContentTypes will not compare equally to custom types created previously (e.g. ContentType.gif is not equal to ContentType.other("image/gif"). If you need such things to compare equally, compare their .rawValue properties.

Full Changelog: 3.0.0-rc.3...3.0.0-rc.4