@@ -1635,32 +1635,6 @@ 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- Snippets []* FeatureSnippet `json:"snippets,omitempty"`
1642- }
1643-
1644- type FeatureSnippet struct {
1645- // The ID for the endpoint as declared within the IR, this is a unique name for the endpoint, whereas path and
1646- // method are not (specifically for the fern definition, consider chat and chat stream).
1647- EndpointId string `json:"endpoint_id"`
1648- Snippet * EndpointSnippet `json:"snippet,omitempty"`
1649- }
1650-
1651- // Describes all of the features currently supported by the Fern generators.
1652- type Features struct {
1653- Usage * Feature `json:"usage,omitempty"`
1654- Timeouts * Feature `json:"timeouts,omitempty"`
1655- RequestOptions * Feature `json:"requestOptions,omitempty"`
1656- Retries * Feature `json:"retries,omitempty"`
1657- Errors * Feature `json:"errors,omitempty"`
1658- Streaming * Feature `json:"streaming,omitempty"`
1659- // Acts as a catch-all feature so that generators can communicate
1660- // new features without requiring an API change.
1661- Unknown map [string ]* Feature `json:"unknown,omitempty"`
1662- }
1663-
16641638type GoEndpointSnippet struct {
16651639 // A full endpoint snippet, including the client instantiation, e.g.
16661640 //
@@ -1764,8 +1738,10 @@ type Snippets struct {
17641738 Types map [TypeId ]string `json:"types,omitempty"`
17651739 // The endpoint snippets defined by the API
17661740 Endpoints []* Endpoint `json:"endpoints,omitempty"`
1767- // A collection of snippets that demonstrate a particular feature.
1768- Features * Features `json:"features,omitempty"`
1741+ // A collection of endpoint snippets that demonstrate a particular feature.
1742+ //
1743+ // For simplicity, this is just a simple map for now.
1744+ Features map [string ][]* Endpoint `json:"features,omitempty"`
17691745}
17701746
17711747type TypeId = string
0 commit comments