From b1cf5a93159645181baad00c6374579d593b1015 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 14:34:07 +0000 Subject: [PATCH] Release v0.0.856 --- core/client_option.go | 2 +- types.go | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/core/client_option.go b/core/client_option.go index 98d8bad..95b3631 100644 --- a/core/client_option.go +++ b/core/client_option.go @@ -36,6 +36,6 @@ func (c *ClientOptions) cloneHeader() http.Header { headers := c.HTTPHeader.Clone() headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/fern-api/generator-exec-go") - headers.Set("X-Fern-SDK-Version", "v0.0.854") + headers.Set("X-Fern-SDK-Version", "v0.0.856") return headers } diff --git a/types.go b/types.go index 0360137..a13a6d0 100644 --- a/types.go +++ b/types.go @@ -1635,6 +1635,25 @@ func (e *EndpointSnippet) Accept(visitor EndpointSnippetVisitor) error { } } +// A specific feature with a variety of endpoint examples. This also serves +// the purpose of communicating which endpoints support a particular feature. +type Feature struct { + Endpoints []*Endpoint `json:"endpoints,omitempty"` +} + +// Describes all of the features currently supported by the Fern generators. +type Features struct { + Usage *Feature `json:"usage,omitempty"` + Timeouts *Feature `json:"timeouts,omitempty"` + RequestOptions *Feature `json:"requestOptions,omitempty"` + Retries *Feature `json:"retries,omitempty"` + Errors *Feature `json:"errors,omitempty"` + Streaming *Feature `json:"streaming,omitempty"` + // Acts as a catch-all feature so that generators can communicate + // new features without requiring an API change. + Unknown map[string]*Feature `json:"unknown,omitempty"` +} + type GoEndpointSnippet struct { // A full endpoint snippet, including the client instantiation, e.g. // @@ -1737,7 +1756,11 @@ type Snippets struct { // The type snippets defined by by the API Types map[TypeId]string `json:"types,omitempty"` // The endpoint snippets defined by the API + // + // Deprecated; use features.usage instead. Endpoints []*Endpoint `json:"endpoints,omitempty"` + // A collection of snippets that demonstrate a particular feature + Features *Features `json:"features,omitempty"` } type TypeId = string