Skip to content

Commit 513b34f

Browse files
committed
Release v0.0.1023
1 parent 09d7b64 commit 513b34f

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

core/client_option.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ func (c *ClientOptions) cloneHeader() http.Header {
3636
headers := c.HTTPHeader.Clone()
3737
headers.Set("X-Fern-Language", "Go")
3838
headers.Set("X-Fern-SDK-Name", "github.com/fern-api/generator-exec-go")
39-
headers.Set("X-Fern-SDK-Version", "v0.0.1018")
39+
headers.Set("X-Fern-SDK-Version", "v0.0.1023")
4040
return headers
4141
}

types.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,20 @@ func (b *BadgeType) UnmarshalJSON(data []byte) error {
14191419
return nil
14201420
}
14211421

1422+
type CsharpEndpointSnippet struct {
1423+
// A full endpoint snippet, including the client instantiation, e.g.
1424+
//
1425+
// using Acme;
1426+
//
1427+
// var acme = new AcmeClient("<YOUR_API_KEY>");
1428+
// await acme.Admin.Update(new UpdateAdminRequest
1429+
// {
1430+
// Id = "submission-12o3uds",
1431+
// SubmissionState = RunningSubmissionState.QueueingSubmission,
1432+
// });
1433+
Client string `json:"client"`
1434+
}
1435+
14221436
type Endpoint struct {
14231437
// The id of the example used to create the snippet.
14241438
ExampleIdentifier *string `json:"example_identifier,omitempty"`
@@ -1502,6 +1516,7 @@ type EndpointSnippet struct {
15021516
Java *JavaEndpointSnippet
15031517
Go *GoEndpointSnippet
15041518
Ruby *RubyEndpointSnippet
1519+
Csharp *CsharpEndpointSnippet
15051520
}
15061521

15071522
func NewEndpointSnippetFromTypescript(value *TypescriptEndpointSnippet) *EndpointSnippet {
@@ -1524,6 +1539,10 @@ func NewEndpointSnippetFromRuby(value *RubyEndpointSnippet) *EndpointSnippet {
15241539
return &EndpointSnippet{Type: "ruby", Ruby: value}
15251540
}
15261541

1542+
func NewEndpointSnippetFromCsharp(value *CsharpEndpointSnippet) *EndpointSnippet {
1543+
return &EndpointSnippet{Type: "csharp", Csharp: value}
1544+
}
1545+
15271546
func (e *EndpointSnippet) UnmarshalJSON(data []byte) error {
15281547
var unmarshaler struct {
15291548
Type string `json:"type"`
@@ -1563,6 +1582,12 @@ func (e *EndpointSnippet) UnmarshalJSON(data []byte) error {
15631582
return err
15641583
}
15651584
e.Ruby = value
1585+
case "csharp":
1586+
value := new(CsharpEndpointSnippet)
1587+
if err := json.Unmarshal(data, &value); err != nil {
1588+
return err
1589+
}
1590+
e.Csharp = value
15661591
}
15671592
return nil
15681593
}
@@ -1616,6 +1641,15 @@ func (e EndpointSnippet) MarshalJSON() ([]byte, error) {
16161641
RubyEndpointSnippet: e.Ruby,
16171642
}
16181643
return json.Marshal(marshaler)
1644+
case "csharp":
1645+
var marshaler = struct {
1646+
Type string `json:"type"`
1647+
*CsharpEndpointSnippet
1648+
}{
1649+
Type: e.Type,
1650+
CsharpEndpointSnippet: e.Csharp,
1651+
}
1652+
return json.Marshal(marshaler)
16191653
}
16201654
}
16211655

@@ -1625,6 +1659,7 @@ type EndpointSnippetVisitor interface {
16251659
VisitJava(*JavaEndpointSnippet) error
16261660
VisitGo(*GoEndpointSnippet) error
16271661
VisitRuby(*RubyEndpointSnippet) error
1662+
VisitCsharp(*CsharpEndpointSnippet) error
16281663
}
16291664

16301665
func (e *EndpointSnippet) Accept(visitor EndpointSnippetVisitor) error {
@@ -1641,6 +1676,8 @@ func (e *EndpointSnippet) Accept(visitor EndpointSnippetVisitor) error {
16411676
return visitor.VisitGo(e.Go)
16421677
case "ruby":
16431678
return visitor.VisitRuby(e.Ruby)
1679+
case "csharp":
1680+
return visitor.VisitCsharp(e.Csharp)
16441681
}
16451682
}
16461683

0 commit comments

Comments
 (0)