Generators

Fern | How to use Fern's Java SDK Generator

Source code
Latest version: 0.6.1

The Java SDK generator outputs a fully functional Java SDK. It can publish the SDK to Maven Central (or any other Maven repository).

Local

Dump the generated SDK to the local file system. Available on the open source plan.

generators.yml
1groups:
2 local:
3 generators:
4 - name: fernapi/fern-java-sdk
5 version: 0.6.1
6 output:
7 location: local-file-system
8 path: ../generated/sdk/java

Publish an internal package

Publish the generated SDK to a private Maven repository hosted by Fern. Available on the Starter plan.

generators.yml
1groups:
2 internal:
3 generators:
4 - name: fernapi/fern-java-sdk
5 version: 0.6.1
6 output:
7 location: npm.buildwithfern.com
8 package-name: @fern-imdb/api # replace with your package name

Publish a public package

Publish the generated SDK to Maven Central. Available on the Starter plan.

generators.yml
1groups:
2 publish:
3 generators:
4 - name: fernapi/fern-java-sdk
5 version: 0.6.1
6 output:
7 location: maven
8 # replace with your coordinate
9 # e.g., com.example.my-api:my-api
10 coordinate: io.github.imdb:imdb
11 username: ${MAVEN_USERNAME}
12 password: ${MAVEN_PASSWORD}
13 github:
14 repository: imdb/imdb-java # replace imdb your organization