@@ -1638,7 +1638,14 @@ func (e *EndpointSnippet) Accept(visitor EndpointSnippetVisitor) error {
16381638// A specific feature with a variety of endpoint examples. This also serves
16391639// the purpose of communicating which endpoints support a particular feature.
16401640type Feature struct {
1641- Endpoints []* Endpoint `json:"endpoints,omitempty"`
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 string `json:"snippet"`
16421649}
16431650
16441651// Describes all of the features currently supported by the Fern generators.
@@ -1756,10 +1763,8 @@ type Snippets struct {
17561763 // The type snippets defined by by the API
17571764 Types map [TypeId ]string `json:"types,omitempty"`
17581765 // The endpoint snippets defined by the API
1759- //
1760- // Deprecated; use features.usage instead.
17611766 Endpoints []* Endpoint `json:"endpoints,omitempty"`
1762- // A collection of snippets that demonstrate a particular feature
1767+ // A collection of snippets that demonstrate a particular feature.
17631768 Features * Features `json:"features,omitempty"`
17641769}
17651770
0 commit comments