You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/csharp/publishing-to-nuget.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ you'll have a versioned package published on NuGet.
12
12
<imgsrc="assets/dotnet-package.png"alt="Versioned package published on NuGet" />
13
13
</Frame>
14
14
15
-
<Info>This guide assumes that you already have an initialized `fern`folder on your local machine. If you don’t, run `fern init`. See [.NET Quickstart](quickstart.mdx) for more details.</Info>
By default, it's impossible to send an explicit JSON `null` for optional parameters. `enableExplicitNull: true` opts in to generating a generic `Optional[T]` type that can be used to distinguish between a `nil` value (nothing is sent), a non-`nil` value (the value is sent), and an explicit null (a `null` value is sent). This is particularly useful for `PATCH` endpoints.
122
-
123
-
The `Optional` and `Null` constructor functions will be included at the root of your module and can be
124
-
used like so:
125
-
126
-
```go
127
-
client := acmeclient.NewClient()
128
-
updatedFoo, err := client.Foo.Update(
129
-
context.TODO(),
130
-
&acme.UpdateFooRequest{
131
-
Name: acme.Optional("example"),
132
-
Tag: acme.Null[string](),
133
-
},
134
-
// Serialized as {"name":"example","tag":null}
135
-
)
136
-
```
137
-
138
-
An example configuration:
139
-
140
-
```yaml {7-8}
141
-
default-group: local
142
-
groups:
143
-
local:
144
-
generators:
145
-
- name: fernapi/fern-go-sdk
146
-
version: 0.13.0
147
-
config:
148
-
enableExplicitNull: true
149
-
output:
150
-
location: local-file-system
151
-
path: ../generated/go
152
-
```
153
-
154
-
<Note>This feature requires generics, so the generated `go.mod` will be upgraded to `1.18` (as opposed to `1.13`).</Note>
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/go/publishing-to-go-package-manager.mdx
+28-26Lines changed: 28 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,23 @@
1
1
---
2
2
title: Publishing to Pkgsite
3
-
description: How to publish the Fern Go SDK to Pkgsite.
3
+
description: How to publish the Fern Go SDK to the Go module proxy.
4
4
---
5
5
6
-
Publish your public-facing Fern GO SDK to the [Pkgsite
7
-
registry](https://pkg.go.dev/). After following the steps on this page,
8
-
you'll have a versioned package published on Pkgsite.
6
+
Publish your public-facing Fern Go SDK to
7
+
[pkg.go.dev](https://proxy.golang.org/). After following the steps on this page,
8
+
you'll have a versioned package published on pkg.go.dev.
9
9
10
10
<Frame>
11
11
<imgsrc="assets/go-package.png"alt="Versioned package published on Pkgsite" />
12
12
</Frame>
13
13
14
-
<Info>This guide assumes that you already have an initialized `fern` folder on your local machine. If you don’t, run `fern init`. See [Go Quickstart](quickstart.mdx) for more details.</Info>
1. Create a new GitHub repository called `company-go` (or something similar) for your SDK, if you haven't done so already. Make sure your repository has:
20
19
***Public** visibility
21
-
*A required license (e.g. [MIT](https://opensource.org/license/mit), [Apache](https://www.apache.org/licenses/LICENSE-2.0)) to the repository.
1. Install the [Fern GitHub App](https://github.com/apps/fern-api): Select **Configure**, then scroll down to **Repository Access**. Select **Only select repositories** and in the dropdown select the repository for your SDK. Click **Save**.
23
22
24
23
@@ -42,15 +41,15 @@ you'll have a versioned package published on Pkgsite.
@@ -76,15 +75,15 @@ you'll have a versioned package published on Pkgsite.
76
75
</Steps>
77
76
78
77
79
-
## Release your SDK to Pkgsite
78
+
## Publish to pkg.go.dev
80
79
81
80
At this point, you're ready to generate a release for your SDK.
82
81
83
82
<Steps>
84
83
85
84
<Step title="Generate your release">
86
85
87
-
Regenerate your SDK and publish it on PyPI:
86
+
Regenerate your SDK and publish it on pkg.go.dev:
88
87
89
88
```bash
90
89
fern generate --group go-sdk --version <version>
@@ -94,17 +93,20 @@ you'll have a versioned package published on Pkgsite.
94
93
95
94
</Step>
96
95
97
-
<Step title="Publish on Pkgsite">
96
+
<Step title="Publish on pkg.go.dev">
98
97
99
98
Navigate to `https://pkg.go.dev/github.com/<github-org>/<github-repo-name>/` and send a request to index your package. In a few minutes, your new release should be published to [https://pkg.go.dev/](https://pkg.go.dev/)!
100
99
101
-
<Tip>After releasing a new version, it may take a few minutes for Pkgsite
102
-
to index and display the update. You can also try checking to see if the Go
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/java/publishing-to-maven-central.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Publish your public-facing Fern Java SDK to the [Maven Central
7
7
registry](https://pypi.org/). After following the steps on this page,
8
8
you'll have a versioned package published on Maven Central.
9
9
10
-
<Info>This guide assumes that you already have an initialized `fern`folder on your local machine. If you don’t, run `fern init`. See [Java Quickstart](quickstart.mdx) for more details.</Info>
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/php/publishing-to-packagist.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ you'll have a versioned package published on Packagist.
11
11
<imgsrc="assets/packagist-package.png"alt="Versioned package published on Packagist" />
12
12
</Frame>
13
13
14
-
<Info>This guide assumes that you already have an initialized `fern`folder on your local machine. If you don’t, run `fern init`. See [PHP Quickstart](quickstart.mdx) for more details.</Info>
0 commit comments