-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7dc3e1
commit 98f43f7
Showing
13 changed files
with
324 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
# Docs Starter | ||
|
||
Learn how to create beautiful documentation in under 5 minutes using an OpenAPI specification (formerly Swagger). | ||
|
||
</div> | ||
|
||
## Customer Showcase | ||
|
@@ -19,9 +20,9 @@ Get inspired by API documentation built with Fern: [Hume](https://dev.hume.ai) | | |
|
||
## Requirements | ||
|
||
- Node 18 or higher | ||
- A [GitHub](https://github.com) account | ||
- Node 18 or higher | ||
- A [GitHub](https://github.com) account | ||
|
||
### Step 1: Use this template | ||
|
||
1. Click on the **Use this template** button (found at the top right of this page). You must be logged into GitHub. | ||
|
@@ -39,21 +40,21 @@ Open the `fern.config.json` file, which looks like this: | |
|
||
```json | ||
{ | ||
"organization": "Petstore", | ||
"version": "0.17.8" | ||
"organization": "Plantstore", | ||
"version": "0.17.8" | ||
} | ||
``` | ||
Replace `"Petstore"` with your own organization name within the quotes. Spaces are permitted. Leave the `version` number unchanged. | ||
|
||
Replace `"Plantstore"` with your own organization name within the quotes. Spaces are permitted. Leave the `version` number unchanged. | ||
|
||
Open the `docs.yml` file and locate the `url`, which looks like this: | ||
|
||
```yml | ||
instances: | ||
- url: petstore-openapi.docs.buildwithfern.com | ||
- url: plantstore.docs.buildwithfern.com | ||
``` | ||
Replace `petstore-openapi` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores. Do not use spaces, and leave the rest of the URL (`docs.buildwithfern.com`) unchanged. | ||
|
||
Replace `plantstore` with your own organization's name. Use only alphanumeric characters, hyphens, and underscores. Do not use spaces, and leave the rest of the URL (`docs.buildwithfern.com`) unchanged. | ||
|
||
### Step 4: Install the Fern CLI | ||
|
||
|
@@ -79,7 +80,7 @@ Once the documentation is generated, you will receive the URL where your documen | |
|
||
```shell | ||
┌─ | ||
│ ✓ petstore-openapi.docs.buildwithfern.com | ||
│ ✓ plantstore.docs.buildwithfern.com | ||
└─ | ||
# OR | ||
|
@@ -100,25 +101,29 @@ You must run `fern generate --docs` after any modifications to re-generate and p | |
To preview updates to your documentation before publishing changes, run `fern generate --docs --preview`. | ||
|
||
To use your own OpenAPI specification file or to update the existing one: | ||
|
||
- Update or replace the OpenAPI specification file in the `openapi/` folder. | ||
- *Note: Don't have an OpenAPI spec? Use Fern's simpler format to define your API.* [*Learn more*](https://github.com/fern-api/docs-starter-fern-definition). | ||
- _Note: Don't have an OpenAPI spec? Use Fern's simpler format to define your API._ [_Learn more_](https://github.com/fern-api/docs-starter-fern-definition). | ||
|
||
To modify the other docs pages: | ||
|
||
- Update the Markdown files located in the `docs/pages/` folder, such as `welcome.mdx`. | ||
|
||
To modify site styles and navigation, or to add new pages: | ||
|
||
- See [Writing Content](https://buildwithfern.com/learn/docs/content/write-markdown). | ||
|
||
To learn about Fern's built-in component library you can use within MDX files: | ||
|
||
- See the [Component Library](https://buildwithfern.com/learn/docs/components/overview). | ||
|
||
### Step 8: Set up a custom domain | ||
|
||
If you wish to use a custom subdomain like `https://docs.YOUR_ORGANIZATION.com` or a subpath like `https://YOUR_ORGANIZATION.com/docs`, you can subscribe to the [Starter plan](https://buildwithfern.com/pricing). Once subscribed, update `docs.yml` with the custom domain configuration: | ||
|
||
``` yaml | ||
- url: petstore-openapi.docs.buildwithfern.com | ||
custom-domain: docs.petstore-openapi.com | ||
```yaml | ||
- url: plantstore.docs.buildwithfern.com | ||
custom-domain: plantstore.dev | ||
``` | ||
|
||
### Step 9: Explore advanced features | ||
|
@@ -131,7 +136,7 @@ Good luck creating beautiful and functional documentation! 🌿 | |
|
||
## Support | ||
|
||
Need help? [Set up a call](https://buildwithfern.com/contact) with an expert or email us at [[email protected]](mailto:[email protected]). | ||
Need help? [Set up a call](https://buildwithfern.com/contact) with an expert or email us at [[email protected]](mailto:[email protected]). | ||
|
||
## About OpenAPI (formerly Swagger) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,46 @@ | ||
instances: | ||
- url: petstore-openapi.docs.buildwithfern.com | ||
- url: plantstore.docs.buildwithfern.com | ||
custom-domain: plantstore.dev | ||
edit-this-page: | ||
github: | ||
owner: fern-api | ||
repo: docs-starter | ||
branch: main | ||
|
||
title: Plant Store | ||
|
||
layout: | ||
searchbar-placement: header | ||
page-width: full | ||
|
||
navigation: | ||
- section: Get Started | ||
contents: | ||
contents: | ||
- page: Welcome | ||
path: ./docs/pages/welcome.mdx | ||
path: docs/pages/welcome.mdx | ||
- page: Concepts | ||
path: ./docs/pages/concepts.mdx | ||
path: docs/pages/concepts.mdx | ||
- page: SDKs | ||
path: ./docs/pages/sdks.mdx | ||
path: docs/pages/sdks.mdx | ||
slug: sdks | ||
- api: API Reference | ||
|
||
navbar-links: | ||
navbar-links: | ||
- type: secondary | ||
text: Get support | ||
url: "mailto:support@buildwithfern.com" | ||
text: Fork this repo | ||
url: https://github.com/fern-api/docs-starter | ||
- type: primary | ||
text: Get a demo | ||
url: https://buildwithfern.com/contact | ||
|
||
colors: | ||
accentPrimary: | ||
dark: "#f0c193" | ||
light: "#af5f1b" | ||
dark: "#4CAF50" | ||
light: "#4CAF50" | ||
|
||
logo: | ||
dark: ./docs/assets/logo-dark-mode.png | ||
light: ./docs/assets/logo-light-mode.png | ||
height: 40 | ||
dark: docs/assets/logo-dark.svg | ||
light: docs/assets/logo-light.svg | ||
height: 20 | ||
|
||
favicon: ./docs/assets/favicon.png | ||
favicon: docs/assets/favicon.svg |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
--- | ||
title: Key Concepts | ||
subtitle: Resources that will help you get started using the Pet Store API | ||
subtitle: Resources that will help you get started using the Plant Store API | ||
slug: concepts | ||
description: Learn about the Pet, Store, and User resources that comprise the Pet Store API. | ||
description: Learn about the Plant, Store, and User resources that comprise the Plant Store API. | ||
--- | ||
|
||
### Pet | ||
### Plant | ||
|
||
A pet is an animal that can be bought from the store. It has a name, a category, a status, and a list of photo URLs. | ||
A plant can be bought from the store. It has a name, a category, a status, and a list of photo URLs. | ||
|
||
### Store | ||
### Store | ||
|
||
A store has a collection of pets. It is responsible for managing the inventory of pets. Users place orders for pets from the store. | ||
A store has a collection of plants. It is responsible for managing the inventory of plants. Users place orders for plants from the store. | ||
|
||
### User | ||
|
||
A user is a person who buys pets from the store. Also known as pet parents. | ||
### User | ||
|
||
A user is a person who buys plants from the store. Also known as plant parents. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,51 @@ | ||
--- | ||
title: SDKs | ||
subtitle: We offer client libraries/SDKs for your favorite languages, generated by Fern from your OpenAPI specification file. | ||
subtitle: We offer client libraries/SDKs for your favorite languages, generated by Fern from your OpenAPI specification file. | ||
slug: sdks | ||
--- | ||
|
||
We provide official open-source SDKs (client libraries) for your favorite languages, such as Node.js and Python. These clients make connecting to our API faster and help avoid errors. | ||
|
||
We regularly update our SDKs using [Fern](https://buildwithfern.com/?utm_source=docs-starter-openapi/sdks) and adhere to [semantic versioning](https://semver.org/) (semver) principles, so we won't make breaking changes in minor or patch releases. | ||
|
||
## Official SDKs | ||
## Official SDKs | ||
|
||
<CodeBlocks> | ||
<CodeBlock title="Node"> | ||
```bash | ||
npm install petstore-sdk | ||
# or | ||
yarn add petstore-sdk | ||
``` | ||
</CodeBlock> | ||
<CodeBlock title="Python"> | ||
```bash | ||
pip install petstore | ||
``` | ||
</CodeBlock> | ||
<CodeBlock title="Go"> | ||
```bash | ||
go get -u github.com/fern-demo/petstore-go | ||
``` | ||
</CodeBlock> | ||
<CodeBlock title="Java"> | ||
```bash | ||
<dependency> | ||
<groupId>com.buildwithfern.petstore</groupId> | ||
<artifactId>petstore</artifactId> | ||
<version>0.0.1</version> | ||
</dependency> | ||
# or | ||
implementation("com.buildwithfern.petstore.java:sdk:0.0.1") | ||
``` | ||
</CodeBlock> | ||
<CodeBlock title="Ruby"> | ||
```bash | ||
gem install petstore | ||
``` | ||
</CodeBlock> | ||
<CodeBlock title="C#"> | ||
```bash | ||
nuget install petstore.net | ||
``` | ||
</CodeBlock> | ||
|
||
```shell Node | ||
bash npm install plantstore-sdk # or yarn add plantstore-sdk | ||
``` | ||
|
||
```shell Python | ||
bash pip install plantstore | ||
``` | ||
|
||
```shell Go | ||
bash go get -u github.com/fern-demo/plantstore-go | ||
``` | ||
|
||
```xml Java (Maven) | ||
<dependency> | ||
<groupId>com.buildwithfern.plantstore</groupId> | ||
<artifactId>plantstore</artifactId> | ||
<version>0.0.1</version> | ||
</dependency> | ||
``` | ||
|
||
```gradle Java (Gradle) | ||
implementation 'com.buildwithfern.plantstore:plantstore:0.0.1' | ||
``` | ||
|
||
```shell Ruby | ||
bash gem install plantstore | ||
``` | ||
|
||
```shell C# | ||
bash nuget install plantstore.net | ||
``` | ||
|
||
</CodeBlocks> | ||
|
||
## Request a new SDK | ||
## Request a new SDK | ||
|
||
If you'd like to request an SDK for a language that we don't currently support, [let us know](/welcome.mdx#get-support). We're always looking to expand our SDK offerings and would love to hear from you. | ||
If you'd like to request an SDK for a language that we don't currently support, [let us know](/welcome.mdx#get-support). We're always looking to expand our SDK offerings and would love to hear from you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"organization": "petstore", | ||
"version": "0.29.6" | ||
"organization": "plantstore", | ||
"version": "0.31.24" | ||
} |
Oops, something went wrong.