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.
- Feature: Add support for multiple files in upload endpoints. Endpoints that specify
multiple file parameters will include a
[]io.Reader
parameter, where each value is individually named. If theio.Reader
does not contain a name, a name is generated.
func (c *Client) Upload(
ctx context.Context,
fileList []io.Reader,
opts ...option.RequestOption,
) error {
...
}
- No changes since previous release candidate.
- Fix: Snippets for aliases to optional primitive values. With this, the generated snippet
will include the top-level pointer helpers (e.g.
acme.String(...)
).
- Fix: Package documentation is now generated into the correct package's
doc.go
. - Feature: Add support for generated endpoint snippets.
- The snippets will be available in the API reference documentation, as well as the snippets API.
- The snippets are not embedded in the SDK itself (yet).
import (
context "context"
time "time"
acme "github.com/acme/acme-go"
acmeclient "github.com/acme/acme-go/client"
option "github.com/acme/acme-go/option"
)
client := acmeclient.NewClient(
option.WithToken(
"<YOUR_AUTH_TOKEN>",
),
)
response, err := client.User.Create(
context.TODO(),
&acme.CreateUserRequest{
Username: "john",
Language: acme.LanguageEnglish,
Age: acme.Int(32),
Birthday: acme.MustParseDate(
"1980-06-01"
),
},
)
-
Feature: The generator now supports whitelabelling. When this is turned on, there will be no mention of Fern in the generated code.
Note: You must be on the enterprise tier to enable this mode.
- Feature: Enforce RFC3339 for date[time] serialization in request bodies.
- Fix: Query parameter supoort for optional
time.Time
types.
- Feature: Add support for
deepObject
query parameters. - Chore: Refactor query parameter serialization with
url
struct tags.
- Feature: Add
packageName
generator configuration. - Feature: Add support for
bytes
request bodies wrapped in an in-lined request.
- Fix:
text/plain
response handling.
- Feature: Add support for
bytes
request bodies withContent-Type
set toapplication/octet-stream
.
- Feature: Add automatic retry with exponential backoff.
- Feature: Refactor
ClientOption
asRequestOption
. - Feature: Add
includeLegacyClientOptions
generator configuration. - Feature: Support idempotency headers as a special
RequestOption
only available on idempotent endpoints. - Fix: Placement of path parameter documentation.
- Fix: Naming collision issue for undiscriminated unions that define more than one literal.
- Fix: File upload requests that specify query parameters.
- Fix: Optional query parameter dereferencing issue.
- Fix: Append version suffix for modules tagged with major versions greater than
1.X.X
.
- Fix: Support boolean literals.
- Fix: Union subt-ypes with no properties are now go 1.13 compatible.
- Feature: Add support for streaming endpoints.
- Feature: Add support for non-primitive file upload properties.
- Chore: Refactor
core.DoRequest
withcore.Caller
abstraction. - Chore: Update pinned dependencies in generated
go.mod
.