Skip to content

Commit

Permalink
Revert "Revert "chore(docs): initial restructuring" (#5220)"
Browse files Browse the repository at this point in the history
This reverts commit 8713b7b.
  • Loading branch information
dannysheridan authored Nov 19, 2024
1 parent 8f96b43 commit 7962791
Show file tree
Hide file tree
Showing 27 changed files with 143 additions and 118 deletions.
113 changes: 58 additions & 55 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ navigation:
contents:
- page: Overview
path: ./pages/sdks/introduction/overview.mdx
- page: Configuration
path: ./pages/sdks/introduction/configuration.mdx
- page: Language Support
path: ./pages/sdks/introduction/language-support.mdx
- section: Changelogs
slug: changelog
contents:
Expand All @@ -227,98 +227,101 @@ navigation:
- changelog: ./pages/changelogs/ruby-sdk
title: Ruby
slug: ruby
- section: Getting Started
contents:
- page: Generate your First SDK
path: ./pages/sdks/getting-started/generate-your-first-sdk.mdx
- page: Preview your SDK Locally
path: ./pages/sdks/getting-started/preview-your-sdk-locally.mdx
- page: Publish a Public-Facing SDK
path: ./pages/sdks/publish-sdk/publish-your-sdk.mdx
hidden: true
- section: Features
- section: Capabilities
contents:
- page: Strongly Typed
path: ./pages/sdks/features/strongly-typed.mdx
path: ./pages/sdks/capabilities/strongly-typed.mdx
- page: Idiomatic Method Names
path: ./pages/sdks/features/idiomatic-method-names.mdx
path: ./pages/sdks/capabilities/idiomatic-method-names.mdx
- page: Schema Validation
path: ./pages/sdks/features/schema-validation.mdx
path: ./pages/sdks/capabilities/schema-validation.mdx
- page: Discriminated Unions
path: ./pages/sdks/features/discriminated-unions.mdx
path: ./pages/sdks/capabilities/discriminated-unions.mdx
- page: Multipart Form Data
path: ./pages/sdks/features/multipart-form-data.mdx
path: ./pages/sdks/capabilities/multipart-form-data.mdx
- page: Forward Compatibility
path: ./pages/sdks/features/forward-compatibility.mdx
path: ./pages/sdks/capabilities/forward-compatibility.mdx
- page: Registry Publishing
path: ./pages/sdks/features/publish-to-registries.mdx
path: ./pages/sdks/capabilities/publish-to-registries.mdx
icon: fa-regular fa-pro
- page: Auto-Pagination
path: ./pages/sdks/features/auto-pagination.mdx
path: ./pages/sdks/capabilities/auto-pagination.mdx
icon: fa-regular fa-pro
- page: OAuth Token Refresh
path: ./pages/sdks/features/oauth.mdx
path: ./pages/sdks/capabilities/oauth.mdx
icon: fa-regular fa-pro
- page: Retries with Backoff
path: ./pages/sdks/features/retries-with-backoff.mdx
path: ./pages/sdks/capabilities/retries-with-backoff.mdx
icon: fa-regular fa-pro
- page: Webhook Signature Verification
path: ./pages/sdks/features/webhook-signature-verification.mdx
path: ./pages/sdks/capabilities/webhook-signature-verification.mdx
icon: fa-regular fa-pro
- page: Idempotency Headers
path: ./pages/sdks/features/idempotency-headers.mdx
path: ./pages/sdks/capabilities/idempotency-headers.mdx
icon: fa-regular fa-pro
- page: Server-Sent Events
path: ./pages/sdks/features/server-sent-events.mdx
path: ./pages/sdks/capabilities/server-sent-events.mdx
icon: fa-regular fa-pro
- page: Integration Tests
path: ./pages/sdks/features/integration-tests.mdx
path: ./pages/sdks/capabilities/integration-tests.mdx
icon: fa-regular fa-pro
- page: Code Snippets
path: ./pages/sdks/features/code-snippets.mdx
path: ./pages/sdks/capabilities/code-snippets.mdx
icon: fa-regular fa-pro
- page: Augment with Custom Code
path: ./pages/sdks/features/augment-with-custom-code.mdx
path: ./pages/sdks/capabilities/augment-with-custom-code.mdx
icon: fa-regular fa-pro
- page: Merging Multiple APIs
path: ./pages/sdks/features/merging-multiple-apis.mdx
path: ./pages/sdks/capabilities/merging-multiple-apis.mdx
icon: fa-regular fa-pro
- page: WebSockets
path: ./pages/sdks/features/websockets.mdx
path: ./pages/sdks/capabilities/websockets.mdx
icon: fa-regular fa-pro
# icon: fa-regular fa-pro
# - page: Object oriented SDKs
# path: ./pages/sdks/features/dummy.mdx
# path: ./pages/sdks/capabilities/dummy.mdx
# icon: fa-regular fa-pro
# - page: Polling
# path: ./pages/sdks/features/dummy.mdx
# path: ./pages/sdks/capabilities/dummy.mdx
# icon: fa-regular fa-pro
# - page: GitHub integration
# path: ./pages/sdks/features/dummy.mdx
# path: ./pages/sdks/capabilities/dummy.mdx
# icon: fa-regular fa-pro
- section: Package Managers
- section: Reference
contents:
- page: NPM (TypeScript)
path: ./pages/sdks/integration/npm.mdx
- page: PyPI (Python)
slug: pypi
path: ./pages/sdks/integration/pypi.mdx
- page: NuGet (C#)
slug: nuget
path: ./pages/sdks/integration/nuget.mdx
- page: Pkgsite (Go)
slug: pkgsite
path: ./pages/sdks/integration/pkgsite.mdx
- page: Maven Central (Java)
slug: maven-central
path: ./pages/sdks/integration/maven-central.mdx
- page: RubyGems (Ruby)
slug: rubygems
path: ./pages/sdks/integration/rubygems.mdx
- page: Packagist (PHP)
slug: packagist
path: ./pages/sdks/integration/packagist.mdx

- page: Configuration
path: ./pages/sdks/introduction/configuration.mdx
- section: Guides
contents:
- page: Generate your First SDK
path: ./pages/sdks/getting-started/generate-your-first-sdk.mdx
- page: Preview your SDK Locally
path: ./pages/sdks/getting-started/preview-your-sdk-locally.mdx
- page: Publish a Public-Facing SDK
path: ./pages/sdks/publish-sdk/publish-your-sdk.mdx
hidden: true
- section: Publish to package managers
contents:
- page: NPM (TypeScript)
path: ./pages/sdks/integration/npm.mdx
- page: PyPI (Python)
slug: pypi
path: ./pages/sdks/integration/pypi.mdx
- page: NuGet (C#)
slug: nuget
path: ./pages/sdks/integration/nuget.mdx
- page: Pkgsite (Go)
slug: pkgsite
path: ./pages/sdks/integration/pkgsite.mdx
- page: Maven Central (Java)
slug: maven-central
path: ./pages/sdks/integration/maven-central.mdx
- page: RubyGems (Ruby)
slug: rubygems
path: ./pages/sdks/integration/rubygems.mdx
- page: Packagist (PHP)
slug: packagist
path: ./pages/sdks/integration/packagist.mdx
- section: Alternatives
hidden: true
contents:
Expand Down
2 changes: 1 addition & 1 deletion fern/pages/changelogs/csharp-sdk/2024-11-14.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 1.9.8
**`(feat):`** Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/features/idempotency-headers).
**`(feat):`** Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/capabilities/idempotency-headers).

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 9 additions & 8 deletions fern/pages/sdks/getting-started/preview-your-sdk-locally.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
---
title: Preview your SDK
subtitle: Use Fern's CLI tool to preview your SDK locally.
subtitle: Use Fern's CLI tool to preview your SDK locally.
---

[Once you configure your SDK](/learn/sdks/getting-started/generate-your-first-sdk), you can preview the generated SDK code using Fern's CLI.
[Once you configure your SDK](/learn/sdks/getting-started/generate-your-first-sdk), you can preview the generated SDK code using Fern's CLI.

Simply append the `--preview` flag to the command used to generate the SDK and you will see the generated code populated in a `.preview` folder within your `fern` folder.
Simply append the `--preview` flag to the command used to generate the SDK and you will see the generated code populated in a `.preview` folder within your `fern` folder.

<Tip title="Custom Code">
[If you have added custom code to your SDK](/learn/sdks/features/augment-with-custom-code), `--preview` will preserve those changes.
[If you have added custom code to your SDK](/learn/sdks/capabilities/augment-with-custom-code), `--preview` will
preserve those changes.
</Tip>

Here's an example of how you can preview your SDK:
Here's an example of how you can preview your SDK:

<Steps>
### Generator configuration
Expand All @@ -35,13 +36,13 @@ groups:
### Invoke the Fern CLI
```shell
```shell
fern generate --group python-sdk --preview
```

### Preview your SDK

The resulting folder structure will look like this:
The resulting folder structure will look like this:

<Tabs>
<Tab title="OpenAPI">
Expand Down Expand Up @@ -70,4 +71,4 @@ fern/
```
</Tab>
</Tabs>
</Steps>
</Steps>
55 changes: 28 additions & 27 deletions fern/pages/sdks/introduction/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,63 +1,62 @@
---
title: 'SDK Configuration'
subtitle: 'Configure your SDK generators in `generators.yml` and publish to registries'
title: "SDK Configuration"
subtitle: "Configure your SDK generators in `generators.yml` and publish to registries"
---

<Note>
Before you can configure your generators, you must setup your API Definition. Learn more [**here**](/learn/api-definition/introduction/what-is-the-fern-folder)
Before you can configure your generators, you must setup your API Definition. Learn more
[**here**](/learn/api-definition/introduction/what-is-the-fern-folder)
</Note>


<Note>
The public schema for `generators.yml` can be found [**here**](https://schema.buildwithfern.dev/generators-yml.json).
</Note>

## Top Level Configuration


```yaml title="generators.yml" maxLines=10
default-group: local

readme:
readme:
apiReferenceLink: https://plantstore.dev
defaultEndpoint: GET /v3/store/inventory

groups:
node:
generators:
groups:
node:
generators:
- name: fernapi/fern-typescript-node-sdk
version: 0.x.x
output:
output:
location: npm
package-name: "@plantstore/sdk"
token: ${NPM_TOKEN}
config:
config:
outputSourceFiles: true
github:
github:
repository: "plantstore/plantstore-js"
metadata:
metadata:
package-description: JavaScript library for the Plant Store API Service
license: MIT
python:
generators:
python:
generators:
- name: fernapi/fern-python-sdk
version: 0.x.x
output:
output:
location: pypi
package-name: "plantstore"
token: ${PYPI_TOKEN}
config:
config:
outputSourceFiles: true
github:
repository: "plantstore/plantstore-python"
github:
repository: "plantstore/plantstore-python"
```
<ParamField path="default-group" type="string" required={false}>
The default group of generators to run when running `fern generate`.
The default group of generators to run when running `fern generate`.
</ParamField>

<ParamField path="readme" type="object" required={false}>
Learn more about the README configuration [here](/learn/sdks/introduction/configuration#readme-configuration).
Learn more about the README configuration [here](#readme-configuration).
</ParamField>

<ParamField path="groups" type="map<string, GroupConfiguration>" required={false}>
Expand All @@ -67,24 +66,24 @@ groups:
## README Configuration

```yaml generators.yml
readme:
readme:
apiReferenceLink: https://plantstore.dev
defaultEndpoint: GET /v3/store/inventory
```

<ParamField path="readme.apiReferenceLink" type="string" required={false}>
A link to your hosted API Reference. Fern will embed this link into your generated READMEs so that SDK users know to navigate to your
API Reference.
A link to your hosted API Reference. Fern will embed this link into your generated READMEs so that SDK users know to
navigate to your API Reference.
</ParamField>

<ParamField path="readme.defaultEndpoint" type="ReadMe Configuration" required={false}>
The endpoint you want to use in README code samples. If unspecified, Fern will default to the first POST request.
The endpoint you want to use in README code samples. If unspecified, Fern will default to the first POST request.
</ParamField>

## Specify Package Metadata

```yaml generators.yml
metadata:
metadata:
package-description: Python library for the Plant Store API Service
license: Apache
```
Expand All @@ -94,5 +93,7 @@ metadata:
</ParamField>

<ParamField path="generator.metadata.license" type="License" required={false}>
The license you'd like to apply to the code published to GitHub. Options include `MIT` or `Apache` (Apache 2.0). To request a new license, [open a GitHub Issue](https://github.com/fern-api/fern/issues/new?assignees=&labels=&projects=&template=feature-request.md&title=%5BFeature%5D).
The license you'd like to apply to the code published to GitHub. Options include `MIT` or `Apache` (Apache 2.0). To
request a new license, [open a GitHub
Issue](https://github.com/fern-api/fern/issues/new?assignees=&labels=&projects=&template=feature-request.md&title=%5BFeature%5D).
</ParamField>
30 changes: 30 additions & 0 deletions fern/pages/sdks/introduction/language-support.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Language support
---

Fern supports generating SDKs in several different programming languages. Each SDK generator is written by a language expert and is officially maintained by the Fern team.

### Generally Available

<CardGroup cols={3}>
<Card title="TypeScript" icon="brands node-js" />
<Card title="Python" icon="brands python" />
<Card title="Go" icon="brands golang" />
<Card title=".NET" icon="brands microsoft" />
<Card title="Java" icon="brands java" />
<Card title="Ruby" icon="gem" />
<Card title="PHP" icon="brands php" />
</CardGroup>

### Coming Soon

<CardGroup cols={3}>
<Card title="Swift" icon="brands swift" />
<Card title="Rust" icon="brands rust" />
<Card title="Terraform" icon="cloud" />
<Card title="CLI" icon="terminal" />
</CardGroup>

<Warning title="Get early access">
Please reach out to [email protected] if you're interested in our generators that are coming soon.
</Warning>
Loading

0 comments on commit 7962791

Please sign in to comment.