Skip to content

Commit

Permalink
Revert "chore(docs): initial restructuring" (#5220)
Browse files Browse the repository at this point in the history
Revert "chore(docs): initial restructuring (#5196)"

This reverts commit 332a580.
  • Loading branch information
dsinghvi authored Nov 19, 2024
1 parent 9b7c73f commit 8713b7b
Show file tree
Hide file tree
Showing 27 changed files with 118 additions and 143 deletions.
113 changes: 55 additions & 58 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: Language Support
path: ./pages/sdks/introduction/language-support.mdx
- page: Configuration
path: ./pages/sdks/introduction/configuration.mdx
- section: Changelogs
slug: changelog
contents:
Expand All @@ -227,101 +227,98 @@ navigation:
- changelog: ./pages/changelogs/ruby-sdk
title: Ruby
slug: ruby
- section: Capabilities
- 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
contents:
- page: Strongly Typed
path: ./pages/sdks/capabilities/strongly-typed.mdx
path: ./pages/sdks/features/strongly-typed.mdx
- page: Idiomatic Method Names
path: ./pages/sdks/capabilities/idiomatic-method-names.mdx
path: ./pages/sdks/features/idiomatic-method-names.mdx
- page: Schema Validation
path: ./pages/sdks/capabilities/schema-validation.mdx
path: ./pages/sdks/features/schema-validation.mdx
- page: Discriminated Unions
path: ./pages/sdks/capabilities/discriminated-unions.mdx
path: ./pages/sdks/features/discriminated-unions.mdx
- page: Multipart Form Data
path: ./pages/sdks/capabilities/multipart-form-data.mdx
path: ./pages/sdks/features/multipart-form-data.mdx
- page: Forward Compatibility
path: ./pages/sdks/capabilities/forward-compatibility.mdx
path: ./pages/sdks/features/forward-compatibility.mdx
- page: Registry Publishing
path: ./pages/sdks/capabilities/publish-to-registries.mdx
path: ./pages/sdks/features/publish-to-registries.mdx
icon: fa-regular fa-pro
- page: Auto-Pagination
path: ./pages/sdks/capabilities/auto-pagination.mdx
path: ./pages/sdks/features/auto-pagination.mdx
icon: fa-regular fa-pro
- page: OAuth Token Refresh
path: ./pages/sdks/capabilities/oauth.mdx
path: ./pages/sdks/features/oauth.mdx
icon: fa-regular fa-pro
- page: Retries with Backoff
path: ./pages/sdks/capabilities/retries-with-backoff.mdx
path: ./pages/sdks/features/retries-with-backoff.mdx
icon: fa-regular fa-pro
- page: Webhook Signature Verification
path: ./pages/sdks/capabilities/webhook-signature-verification.mdx
path: ./pages/sdks/features/webhook-signature-verification.mdx
icon: fa-regular fa-pro
- page: Idempotency Headers
path: ./pages/sdks/capabilities/idempotency-headers.mdx
path: ./pages/sdks/features/idempotency-headers.mdx
icon: fa-regular fa-pro
- page: Server-Sent Events
path: ./pages/sdks/capabilities/server-sent-events.mdx
path: ./pages/sdks/features/server-sent-events.mdx
icon: fa-regular fa-pro
- page: Integration Tests
path: ./pages/sdks/capabilities/integration-tests.mdx
path: ./pages/sdks/features/integration-tests.mdx
icon: fa-regular fa-pro
- page: Code Snippets
path: ./pages/sdks/capabilities/code-snippets.mdx
path: ./pages/sdks/features/code-snippets.mdx
icon: fa-regular fa-pro
- page: Augment with Custom Code
path: ./pages/sdks/capabilities/augment-with-custom-code.mdx
path: ./pages/sdks/features/augment-with-custom-code.mdx
icon: fa-regular fa-pro
- page: Merging Multiple APIs
path: ./pages/sdks/capabilities/merging-multiple-apis.mdx
path: ./pages/sdks/features/merging-multiple-apis.mdx
icon: fa-regular fa-pro
- page: WebSockets
path: ./pages/sdks/capabilities/websockets.mdx
path: ./pages/sdks/features/websockets.mdx
icon: fa-regular fa-pro
# icon: fa-regular fa-pro
# - page: Object oriented SDKs
# path: ./pages/sdks/capabilities/dummy.mdx
# path: ./pages/sdks/features/dummy.mdx
# icon: fa-regular fa-pro
# - page: Polling
# path: ./pages/sdks/capabilities/dummy.mdx
# path: ./pages/sdks/features/dummy.mdx
# icon: fa-regular fa-pro
# - page: GitHub integration
# path: ./pages/sdks/capabilities/dummy.mdx
# path: ./pages/sdks/features/dummy.mdx
# icon: fa-regular fa-pro
- section: Reference
- section: Package Managers
contents:
- 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
- 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/capabilities/idempotency-headers).
**`(feat):`** Add support for [idempotency headers](https://buildwithfern.com/learn/sdks/features/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: 8 additions & 9 deletions fern/pages/sdks/getting-started/preview-your-sdk-locally.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
---
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/capabilities/augment-with-custom-code), `--preview` will
preserve those changes.
[If you have added custom code to your SDK](/learn/sdks/features/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 @@ -36,13 +35,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 @@ -71,4 +70,4 @@ fern/
```
</Tab>
</Tabs>
</Steps>
</Steps>
55 changes: 27 additions & 28 deletions fern/pages/sdks/introduction/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
---
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](#readme-configuration).
Learn more about the README configuration [here](/learn/sdks/introduction/configuration#readme-configuration).
</ParamField>

<ParamField path="groups" type="map<string, GroupConfiguration>" required={false}>
Expand All @@ -66,24 +67,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 @@ -93,7 +94,5 @@ 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: 0 additions & 30 deletions fern/pages/sdks/introduction/language-support.mdx

This file was deleted.

Loading

0 comments on commit 8713b7b

Please sign in to comment.