Generators

Java SDK

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.

1
2
3
4
5
6
7
8
groups:
  local:
    generators:
      - name: fernapi/fern-java-sdk
        version: 0.6.1
        output:
          location: local-file-system
          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.

1
2
3
4
5
6
7
8
groups:
  internal:
    generators:
      - name: fernapi/fern-java-sdk
        version: 0.6.1
        output:
          location: npm.buildwithfern.com
          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.

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