Skip to content

Latest commit

 

History

History
136 lines (94 loc) · 7.26 KB

CHANGELOG.md

File metadata and controls

136 lines (94 loc) · 7.26 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Nothing yet.

0.2.0 (2024-07-08)

  • Breaking: Snake case normalization (ex. function names) now correctly segments numbers. For example, an operation v2example is now output as v2_example. This may be a breaking change for clients with numbers in operation IDs.

  • Add: New configuration option naming.field_casing to choose between :camel case, :snake case, or performing no normalization (nil, the default). Using this option may be necessary for API descriptions that include non-normalized field names (for example, fields that begin with a number or symbol). Setting this configuration would be a breaking change for any clients based on API descriptions that have inconsistent field casing.

  • Fix: Parameters listed in path items (as opposed to operations) now support refs.

  • Fix: References that point to references are now handled correctly.

0.1.1 (2024-05-17)

  • Fix: Allow HTTP response codes encoded as integer keys instead of string keys.

0.1.0 (2024-04-25)

This release is a major change from version 0.0.8. It includes support for plugins, sub-schemas, and more. See the plugins guide and migration guide for more information, and check out the release candidate notes below for a comprehensive list of changes.

Changes since the last release candidate:

  • Fix: anyOf and oneOf definitions now take precedence over generic union types.
  • Fix: Modules with both schema(s) and operations no longer define __field__/1 twice.
  • Fix: Add URL encoded form types to the readable type helper, and fix its fallback clause.
  • Fix: Warn about unknown types (for example, null schemas) instead of raising.
  • Fix: Avoid outputting empty schemas that have no properties but accept arbitrary additional properties.

0.1.0-rc.4 (2024-03-08)

  • Breaking: Output schemas that represent subfields of an already-output schema.

  • Add: Output full structs for any schemas in the responses component portion of the spec.

  • Add: New plugin callback c:OpenAPI.Processor.schema_format/2 to set the output format of a schema (ex. :struct or :typed_map).

  • Add: Support schemas that utilize allOf with a naive intersection type.

  • Add: New configuration option output.operation_call.request to modify the format of output request information in the operation function call. Use :map to output it as a map instead of a list of tuples.

  • Fix: Avoid outputting empty files.

  • Fix: Avoid accidentally unwrapping array types in operation typespecs.

  • Fix: Support API descriptions that have a discriminator without a mapping key (thanks @s3cur3!).

0.1.0-rc.3 (2023-09-29)

  • Fix: Cyclical schema references would result in an infinite loop during the read phase. This has been fixed specifically for schema references; if references that don't point to schemas create a cycle, generation will still fail.

0.1.0-rc.2 (2023-09-27)

  • Fix: Schemas that only appeared in union types were not properly processed, resulting in more plain map types than intended.

0.1.0-rc.1 (2023-09-26)

  • Fix: Schema output was non-deterministic due to map ordering and an issue tracking contexts.
  • Fix: Warn when an enum type is invalid (ex. contains schemas). In this case, the type will be expanded to :any but otherwise continue processing.
  • Fix: Map types were output as the literal atom :map instead of map in typespecs.
  • Fix: Preserve indentation of operation docstrings.
  • Fix: Always include args in client calls, even if the list is empty.
  • Fix: Ensure the app is started in mix api.gen. This resolves an issue in which configured processor or renderer modules may not be available.

0.1.0-rc.0 (2023-09-06)

  • Breaking: This is a major release. See the migration guide for more information.
  • Add: Plugin system for overriding the behavior of this library. See the plugins guide for more information.
  • Add: Additional internal types to represent string variations, enums, etc.
  • Fix: Uniformly normalize names of operations and schemas.

0.0.8 (2023-09-06)

  • Fix: Path parameters are now collected from more locations in the spec. Previously, the generator only noticed path parameters declared in the individual path items. This may cause breaking changes in some operation functions, however they were likely unusable before.
  • Fix: Ensure all path parameter keys are properly underscored (thanks wingyplus!).

0.0.7 (2023-06-07)

  • Add: schema_use option to add optional use [Module] statements within schemas.
  • Add: operation_default_module and operation_use_tags options for controlling the creation of operation modules (thanks @xadhoom!).
  • Add: New Client Author Guide for assisting client library authors.
  • Fix: Allow empty/missing tags and components keys in the specification (thanks @rubas!).
  • Fix: Allow missing server variable object in the specification (thanks @xadhoom!).
  • Fix: Keep acronyms intact when naming operations (thanks @feynmanliang!).

0.0.6 (2023-05-17)

  • Add: New extra_fields option to allow library authors to create their own private fields on generated structs. The location and semantics of this option are likely to be changed in the future.
  • Fix: Include body argument in args passed to the client. Clients may rely on this information (the values themselves, or the arity) for their operations, especially in testing situations.

0.0.5 (2023-05-16)

  • Fix: Replace all non-alphanumeric characters when naming tagged operations.
  • Fix: Handle nullable union types with no realizable non-null types. This case occurred in the GitHub spec (see github/rest-api-description#2534).

0.0.4 (2023-05-10)

  • Add: Add call information to client calls. This will allow specialized clients, like a test mock, to introspect the original calling function without the use of stack traces.
  • Fix: Add missing type :map to OpenAPI.Generator.Typing.t().
  • Fix: Support default entry in responses object (thanks @aej!).
  • Fix: Strip spaces and repetitive dash/underscore/whitespace characters when naming operations (thanks @feynmanliang!).

0.0.3 (2023-02-19)

  • Add: Add args keyword list to client calls. This will allow specialized clients, like a test mock, to differentiate between static URL segments and dynamic path parameters.

0.0.2 (2023-02-17)

  • Add: Support OpenAPI 3.1 "null" type
  • Add: Support type field given as an array of primitive types
  • Fix: Infer map type in more cases when type field is unspecified

0.0.1 (2023-01-05)

  • Initial Release