@@ -1635,6 +1635,25 @@ func (e *EndpointSnippet) Accept(visitor EndpointSnippetVisitor) error {
16351635 }
16361636}
16371637
1638+ // A specific feature with a variety of endpoint examples. This also serves
1639+ // the purpose of communicating which endpoints support a particular feature.
1640+ type Feature struct {
1641+ Endpoints []* Endpoint `json:"endpoints,omitempty"`
1642+ }
1643+
1644+ // Describes all of the features currently supported by the Fern generators.
1645+ type Features struct {
1646+ Usage * Feature `json:"usage,omitempty"`
1647+ Timeouts * Feature `json:"timeouts,omitempty"`
1648+ RequestOptions * Feature `json:"requestOptions,omitempty"`
1649+ Retries * Feature `json:"retries,omitempty"`
1650+ Errors * Feature `json:"errors,omitempty"`
1651+ Streaming * Feature `json:"streaming,omitempty"`
1652+ // Acts as a catch-all feature so that generators can communicate
1653+ // new features without requiring an API change.
1654+ Unknown map [string ]* Feature `json:"unknown,omitempty"`
1655+ }
1656+
16381657type GoEndpointSnippet struct {
16391658 // A full endpoint snippet, including the client instantiation, e.g.
16401659 //
@@ -1737,7 +1756,11 @@ type Snippets struct {
17371756 // The type snippets defined by by the API
17381757 Types map [TypeId ]string `json:"types,omitempty"`
17391758 // The endpoint snippets defined by the API
1759+ //
1760+ // Deprecated; use features.usage instead.
17401761 Endpoints []* Endpoint `json:"endpoints,omitempty"`
1762+ // A collection of snippets that demonstrate a particular feature
1763+ Features * Features `json:"features,omitempty"`
17411764}
17421765
17431766type TypeId = string
0 commit comments