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.
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: 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.
Fix: Schemas that only appeared in union types were not properly processed, resulting in more plain map
types than intended.
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.
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.
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!).
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!).
- 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 inargs
passed to the client. Clients may rely on this information (the values themselves, or the arity) for their operations, especially in testing situations.
- 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).
- 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
toOpenAPI.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!).
- 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.
- 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 whentype
field is unspecified
- Initial Release