Repository navigation
First stable release
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
OpenAPISchemaTypeconformances forURLandUUID.OpenAPI.SecurityScheme.SecurityType.nameexposes aStringrepresentable enum value of the name of the security scheme type (oauth2, openIdConnect, http, apiKey).OpenAPI.Operation.ResponseOutcomeand the.responseOutcomesproperty onOperationexpose an array of response outcomes (structs isomorphic to the key/value pairs of theResponse.Mapfor theOperation).Response.StatusCode.isSuccessto determine if a status code is in the 200 range (including the "2xx" syntax).JSONSchema.ObjectContext.optionalPropertiesto pair with the existing spec-mandatedJSONSchema.ObjectContext.requiredProperties.- Support for discriminators in
JSONSchema.
⚠️ Breaking Changes ⚠️
- Moves
OpenAPI.PathItem.OperationtoOpenAPI.OperationandOpenAPI.PathItem.ParametertoOpenAPI.Parameter.
Nesting these types was both non-essential and also often annoyingly verbose at the call site.
- Renames
OpenAPI.Parameter.SchematoOpenAPI.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.
- Renames
OpenAPI.HttpVerbtoOpenAPI.HttpMethodandOpenAPI.PathItem.Endpoint.verbtoOpenAPI.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.
- Renames
OpenAPI.Parameter.schemaOrContent.schemaValuetoOpenAPI.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.
-
Changes
PathItem.Endpointfrom a tuple to a struct. -
JSONSchemagains additional associated values forall(of:),any(of:), andone(of:)to support discriminators.