Skip to content

Better JSONSchema examples and minor OrderedDictionary error improvements

Pre-release
Pre-release
Compare
Choose a tag to compare
@mattpolzin mattpolzin released this 30 Mar 02:20
ff8b447
  • OrderedDictionary produces better error output when it fails to decode OpenAPI.ComponentKey (the keys of components in the Components Object).
  • JSONSchema is aligned with OpenAPI.Example in using AnyCodable for examples.

⚠️ Breaking Changes ⚠️
JSONSchema example properties switched from String to AnyCodable. This aligns with the examples of the Example Object (OpenAPI.Example). AnyCodable is preferable here because it will get encoded as a JSON structure instead of a String and that will be presented more favorably in UIs such as ReDoc. Any Encodable thing can still be turned into a String, wrapped in AnyCodable, and passed in to produce the result that you used to get, the work to do so is just a bit more exposed.