Skip to content

First stable release

Choose a tag to compare

@mattpolzin mattpolzin released this 13 May 01:40
382668c

Closes #38.
Closes #61.
Closes #64.

As the version number implies, this signals my intention to stop making breaking changes to OpenAPIKit until a v2 release. If you have been playing along so far, I appreciate your patience with the frequent breaking changes throughout the pre-release period.

Additions

  1. OpenAPISchemaType conformances for URL and UUID.
  2. OpenAPI.SecurityScheme.SecurityType.name exposes a String representable enum value of the name of the security scheme type (oauth2, openIdConnect, http, apiKey).
  3. OpenAPI.Operation.ResponseOutcome and the .responseOutcomes property on Operation expose an array of response outcomes (structs isomorphic to the key/value pairs of the Response.Map for the Operation).
  4. Response.StatusCode.isSuccess to determine if a status code is in the 200 range (including the "2xx" syntax).
  5. JSONSchema.ObjectContext.optionalProperties to pair with the existing spec-mandated JSONSchema.ObjectContext.requiredProperties.
  6. Support for discriminators in JSONSchema.

⚠️ Breaking Changes ⚠️

  1. Moves OpenAPI.PathItem.Operation to OpenAPI.Operation and OpenAPI.PathItem.Parameter to OpenAPI.Parameter.

Nesting these types was both non-essential and also often annoyingly verbose at the call site.

  1. Renames OpenAPI.Parameter.Schema to OpenAPI.Parameter.SchemaContext.

Parameter.Schema is not a schema but rather a struct containing a schema, among other things. SchemaContext is a better name for this structure.

  1. Renames OpenAPI.HttpVerb to OpenAPI.HttpMethod and OpenAPI.PathItem.Endpoint.verb to OpenAPI.PathItem.Endpoint.method.

"Method" is pretty ubiquitous and even the word the OpenAPI Specification uses. I must have had a bit of writers block when I named it HttpVerb originally.

  1. Renames OpenAPI.Parameter.schemaOrContent.schemaValue to OpenAPI.Parameter.schemaOrContent.schemaContextValue.

This goes along with the name change from Parameter.Schema to Parameter.SchemaContext. The callsite makes more sense with this naming and the added .schemaValue that now directly refers to the underlying JSONSchema is more useful.

  1. Changes PathItem.Endpoint from a tuple to a struct.

  2. JSONSchema gains additional associated values for all(of:), any(of:), and one(of:) to support discriminators.