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
TypedDecoderplugin.
- Add: Add
shared: trueoption to several testing-related calls to enable shared storage of mocks and calls across process boundaries. See the Async and Sharing section of theGitHub.Testingmodule documentation. - Fix: Remove empty schemas that represented open map types.
- Add: Add
cache: falseoption tomock_gh/3to disable result caching during testing. - Fix: Always return
pull: truein 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/1and the underlying reader function.
- Add: Create
GitHub.Authimplementation forGitHub.Appstructs. - Add: Cache GitHub App JWTs using
GitHub.Auth.Cacheif started in the application supervisor. - Add: Helper
GitHub.app/1to create a basic app struct for use with authentication. - Add: Test helper
GitHub.Testing.to_gh_params/1to take generated data and create string maps.
- Add: Add
decode/2to Typed Decoder plugin for manually decoding data in test environments.
- Add: Add
GitHub.Webhookwith helpers for handling webhook requests in a plug application.
- Fix: Test data created with the
GitHub.Testingmodule 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.3of the generator.
- Fix: Correctly decode
falsevalues 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_atdates despite their typing, and Pull Requests have properbaseandheadmaps.
- 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/3now accepts optional overrides. - Fix: Include formatter configuration in published package.
This allows use of
mock_ghand 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.FulltoTeamandMinimalRepositorytoRepository. Several schemas have been placed into better groups, and some have been moved (for example,Jobis 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/2helper inGitHub.Testingfor generating structs. - Add: Upgrade to
oapi_generatorversion0.0.5with support for null unions, as found in the latest API description.
- Breaking:
GitHub.Plugin.TypedDecodernow 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.Errorstructs now have an easily matchablereasonfield. This field will need to be populated on a case-by-case basis inGitHub.Plugin.TypedDecoder. - Fix: Return valid user
typevalues from the test generator.
- Breaking: The mock system has been rewritten to allow greater flexibility.
See
GitHub.Testingfor more information. - Add: Add helper
GitHub.Operation.get_options/1for plugins and testing. - Fix: Export "locals without parens" to allow using test helpers without parentheses.
-
Add: Decode union types in
GitHub.Plugin.TypedDecoderusing 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_generatorversion0.0.2, with support for OpenAPI 3.1 and other fixes. - Add: Upgrade to
oapi_generatorversion0.0.3, with support forargspassed to the client. - Add: Upgrade to
oapi_generatorversion0.0.4, with support forcallpassed to the client. - Add: Include the recommended API version header in all requests.
The value of this header is defined by the
.api-versionfile, 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.Testingand corresponding pluginGitHub.Plugins.TestClient. - Add: Allow setting the client stack at runtime.
- Initial Release