diff --git a/fern/products/api-def/asyncapi-pages/overview.mdx b/fern/products/api-def/asyncapi-pages/overview.mdx index 4846485db..4b4ebbbd8 100644 --- a/fern/products/api-def/asyncapi-pages/overview.mdx +++ b/fern/products/api-def/asyncapi-pages/overview.mdx @@ -132,13 +132,13 @@ fern/ └─ asyncapi.yml ``` - + Add a `fern.config.json` file in your fern directory that lists your organization and the current version of the Fern CLI: ```json title="fern.config.json" { "organization": "your-organization", - "version": "0.77.2" + "version": "" } ``` @@ -149,7 +149,7 @@ fern/ └─ asyncapi.yml ``` - + Create a `generators.yml` file in your fern directory and add a reference to your AsyncAPI spec: ```yaml title="generators.yml" diff --git a/fern/products/api-def/grpc-pages/overview.mdx b/fern/products/api-def/grpc-pages/overview.mdx index 634cff600..236c257ba 100644 --- a/fern/products/api-def/grpc-pages/overview.mdx +++ b/fern/products/api-def/grpc-pages/overview.mdx @@ -162,18 +162,62 @@ enum ChatMessageType { Need help getting started with gRPC and Fern? Get live support [here](https://fern-community.slack.com/join/shared_invite/zt-2dpftfmif-MuAegl8AfP_PK8s2tx350Q%EF%BB%BF#/shared-invite/email) -Start by initializing your fern folder with a gRPC service - -```sh protobuf -fern init --proto ./path/to/service.proto + + +Create a `fern/` folder in your project root. + +``` +fern/ +``` + + +Add your gRPC files to the fern directory. You can place it in a subfolder called `proto` or directly in the fern directory. + +``` +fern/ + └─ proto/ + ├─ user_service.proto + └─ common.proto ``` -```sh directory -fern init --proto-directory ./path/to/proto/files + + +Add a `fern.config.json` file in your fern directory that lists your organization and the current version of the Fern CLI: + +```json title="fern.config.json" +{ + "organization": "your-organization", + "version": "" +} ``` - -This will initialize a directory like the following +``` +fern/ + ├─ fern.config.json + └─ proto/ + ├─ user_service.proto + └─ common.proto +``` + + +Create a `generators.yml` file in your fern directory and add a reference to your gRPC proto files: + +```yaml title="generators.yml" +# Your API definition +api: + specs: + - proto: + root: ./proto + target: ./proto/user_service.proto + +groups: + external: + generators: + # Your generator configurations here +``` + +Your final directory structure: + ``` fern/ ├─ fern.config.json @@ -181,4 +225,6 @@ fern/ └─ proto/ ├─ user_service.proto └─ common.proto -``` \ No newline at end of file +``` + + \ No newline at end of file diff --git a/fern/products/api-def/openrpc-pages/overview.mdx b/fern/products/api-def/openrpc-pages/overview.mdx index cb9a03cb3..d08122d45 100644 --- a/fern/products/api-def/openrpc-pages/overview.mdx +++ b/fern/products/api-def/openrpc-pages/overview.mdx @@ -146,22 +146,63 @@ components: Considering options to generate an OpenRPC spec? Get live support [here](https://fern-community.slack.com/join/shared_invite/zt-2dpftfmif-MuAegl8AfP_PK8s2tx350Q%EF%BB%BF#/shared-invite/email) -Start by initializing your fern folder with an OpenRPC spec + + +Create a `fern/` folder in your project root. - -```sh file -fern init --openrpc ./path/to/openrpc ``` -```sh url -fern init --openrpc https://host/path/to/openrpc +fern/ +``` + + +Add your OpenRPC spec to the fern directory. You can place it in a subfolder called `openrpc` or directly in the fern directory. + +``` +fern/ + └─ openrpc/ + └─ openrpc.yml +``` + + +Add a `fern.config.json` file in your fern directory that lists your organization and the current version of the Fern CLI: + +```json title="fern.config.json" +{ + "organization": "your-organization", + "version": "" +} ``` - -This will initialize a directory like the following +``` +fern/ + ├─ fern.config.json + └─ openrpc/ + └─ openrpc.yml +``` + + +Create a `generators.yml` file in your fern directory and add a reference to your OpenRPC spec: + +```yaml title="generators.yml" +# Your API definition +api: + specs: + - openrpc: ./openrpc/openrpc.yml + +groups: + external: + generators: + # Your generator configurations here +``` + +Your final directory structure: + ``` fern/ ├─ fern.config.json ├─ generators.yml └─ openrpc/ - ├─ openrpc.yml -``` \ No newline at end of file + └─ openrpc.yml +``` + +