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.
Nothing yet.
- Fix: Decoding of issue labels previously failed in the
TypedDecoder
plugin.
- Add: Add
shared: true
option to several testing-related calls to enable shared storage of mocks and calls across process boundaries. See the Async and Sharing section of theGitHub.Testing
module documentation. - Fix: Remove empty schemas that represented open map types.
- Add: Add
cache: false
option tomock_gh/3
to disable result caching during testing. - Fix: Always return
pull: true
in generated repository permissions during testing.
- Breaking: Thanks to advancements in the code generator (now using
0.1.0-rc.4
), the majority of responses and subfields are now correctly decoded. When appropriate, some operations will have atom-keyed maps as return types.
- Fix: Resolve issue with the contract of
GitHub.Webhook.body_reader/1
and the underlying reader function.
- Add: Create
GitHub.Auth
implementation forGitHub.App
structs. - Add: Cache GitHub App JWTs using
GitHub.Auth.Cache
if started in the application supervisor. - Add: Helper
GitHub.app/1
to create a basic app struct for use with authentication. - Add: Test helper
GitHub.Testing.to_gh_params/1
to take generated data and create string maps.
- Add: Add
decode/2
to Typed Decoder plugin for manually decoding data in test environments.
- Add: Add
GitHub.Webhook
with helpers for handling webhook requests in a plug application.
- Fix: Test data created with the
GitHub.Testing
module incorrectly returned ISO 8601 strings for date/time fields.
This version marks a higher level of stability for the library, though it is still pre-release software.
- Breaking: Regenerate code for description at commit ffaf232.
- Add: Telemetry events for all operation calls. See the telemetry guide for more information.
- Add: OpenTelemetry plugin for easy integration with existing telemetry events.
- Add: Now using
0.1.0-rc.3
of the generator.
- Fix: Correctly decode
false
values from responses. Previously, these values were replaced withnil
.
- Fix: Support generating empty responses in test data generator.
- Add: Improvements to the test data generator.
Repositories now always have
created_at
dates despite their typing, and Pull Requests have properbase
andhead
maps.
- Add: New
__info__
key on every struct to contain library and plugin data. - Add: Preserve important response headers in
GitHub.Plugin.RedixFullResponseCache
.
- Add: Generated data from
GitHub.Testing.generate_gh/3
now accepts optional overrides. - Fix: Include formatter configuration in published package.
This allows use of
mock_gh
and other imported test helpers without parens.
- Fix: Correctly generate array types using single element lists in
GitHub.Testing
.
- Add: Support lists of servers in both Redix-based plugins.
- Add: Correctly decode repository rule unions in
GitHub.Plugin.TypedDecoder
. - Fix: Correctly decode array types in
GitHub.Plugin.TypedDecoder
.
- Breaking: Perform major housecleaning on module naming, groups, etc.
Most notable is the merging of
Team.Full
toTeam
andMinimalRepository
toRepository
. Several schemas have been placed into better groups, and some have been moved (for example,Job
is nowActions.Job
). Not all changes are documented here because this library is in early beta and this type of movement is expected. - Breaking: Update to the latest version of the API description, which removes several operations and adds several schemas.
- Add: Simplified
generate_gh/2
helper inGitHub.Testing
for generating structs. - Add: Upgrade to
oapi_generator
version0.0.5
with support for null unions, as found in the latest API description.
- Breaking:
GitHub.Plugin.TypedDecoder
now normalizes errors for all status codes greater than or equal to400
. Previously, errors were only normalized when the operation had well-typed errors in its response specification. This left out a large number of errors, including many "Not Found" errors that did not need to be documented for every operation. For a list of supported errors, seeGitHub.Error
. - Add:
GitHub.Error
structs now have an easily matchablereason
field. This field will need to be populated on a case-by-case basis inGitHub.Plugin.TypedDecoder
. - Fix: Return valid user
type
values from the test generator.
- Breaking: The mock system has been rewritten to allow greater flexibility.
See
GitHub.Testing
for more information. - Add: Add helper
GitHub.Operation.get_options/1
for plugins and testing. - Fix: Export "locals without parens" to allow using test helpers without parentheses.
-
Add: Decode union types in
GitHub.Plugin.TypedDecoder
using best-guess logic. This enhancement supports all currently-known union type responses, but it will require long-term maintenance. -
Add: Allow returning unwrapped results from client operations. This can be useful for callers that need more information, such as response headers.
-
Fix: Support zero-arity operations in
GitHub.Operation.get_caller/1
.
- Breaking: Upgrade to OpenAPI 3.1 description (
descriptions-next
) with better support for nullable fields. No more.nullable()
types! - Add: Upgrade to
oapi_generator
version0.0.2
, with support for OpenAPI 3.1 and other fixes. - Add: Upgrade to
oapi_generator
version0.0.3
, with support forargs
passed to the client. - Add: Upgrade to
oapi_generator
version0.0.4
, with support forcall
passed to the client. - Add: Include the recommended API version header in all requests.
The value of this header is defined by the
.api-version
file, which should be kept up-to-date as the code is regenerated. - Add: Plugin for caching redirect locations to avoid repeated (rate limited) 301 responses.
- Add: Test helpers in
GitHub.Testing
and corresponding pluginGitHub.Plugins.TestClient
. - Add: Allow setting the client stack at runtime.
- Initial Release