Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions fern/products/sdks/snippets/option-1-openapi.mdx
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
<Accordion title="Option 1: OpenAPI">
Initialize the fern folder using your OpenAPI Specification. Run one of the following commands based on your spec's location.
Initialize the fern folder using your OpenAPI Specification. Fern can
handle both JSON and YML formats for OpenAPI specifications and the
`--openapi` flag accepts either format, so you can use whichever format your
API spec is available in.

<Tip>
Fern can handle both JSON and YML formats for OpenAPI specifications, and the --openapi flag accepts either format, so you can use whichever format your API spec is available in.
</Tip>

<Info>
`--organization <YourOrganization>` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK.
</Info>
Run one of the following commands based on your spec's location:test

<CodeBlocks>

<CodeBlock title="Local file">
```bash
fern init --openapi path/to/openapi.yml --organization <YourOrganization>
fern init --openapi path/to/openapi.yml \
--organization <YourOrganization>
```
</CodeBlock>

<CodeBlock title="Web-hosted file">
```bash
fern init --openapi https://api.example.com/openapi.yml --organization <YourOrganization>
fern init --openapi https://api.example.com/openapi.yml \
--organization <YourOrganization>
```
</CodeBlock>

</CodeBlocks>

This creates a `fern` folder in your current directory with the OpenAPI Specification. The exact folder structure might look different depending on your initial input files.
`--organization <YourOrganization>` configures your organization name in
`fern.config.json`. This is required in order to successfully generate your
SDK.

This creates a `fern` folder in your current directory with the OpenAPI Specification. The exact folder structure might look different depending on your initial input files.

```bash
fern/
Expand Down
4 changes: 2 additions & 2 deletions fern/products/sdks/snippets/option-2-fern-def.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
fern init --organization <YourOrganization>
```

<Info> `--organization <YourOrganization>` configures your organization
`--organization <YourOrganization>` configures your organization
name in `fern.config.json`. This is required in order to successfully
generate your SDK. </Info>
generate your SDK.

This creates a `fern` folder in your current directory with the Fern Definition.

Expand Down