Skip to content

Commit 0e3f0d1

Browse files
authored
Move Postman info from Docs --> SDKs (#572)
1 parent 4866cff commit 0e3f0d1

File tree

4 files changed

+131
-82
lines changed

4 files changed

+131
-82
lines changed
Lines changed: 8 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
---
22
title: "Postman Integration"
33
description: "Generate a postman collection full of example requests and responses"
4-
subtitle: "Generate a postman collection full of example requests and responses"
54
---
65

6+
You can generate a Postman collection full of example requests and responses and
7+
publish your collection to Postman. The configuration for the postman generator
8+
lives in your fern folder, in a file called
9+
[`generators.yml`](/sdks/overview/github#generatorsyml).
10+
11+
712
## Showcase
813

914
<CardGroup cols={2}>
@@ -15,93 +20,14 @@ subtitle: "Generate a postman collection full of example requests and responses"
1520
icon={<img src="https://cdn.prod.website-files.com/5e9dc792e1210c5325f7ebbc/64b039144f484892355032dd_62146168.png" />}
1621
iconSize={12}
1722
/>
18-
19-
<Card
20-
title="MirrorWOrld"
21-
href="https://developer.mirrorworld.fun/"
22-
horizontal
23-
icon={<img src="https://cdn.brandfetch.io/idLEJUb6Vb/w/400/h/400/theme/dark/icon.jpeg" />}
24-
iconSize={12}
25-
/>
26-
2723
</CardGroup>
2824

2925
## Getting started
3026

31-
The configuration for the postman generator lives in your fern folder, in a file
32-
called [`generators.yml`](/learn/api-definition/introduction/what-is-the-fern-folder#generatorsyml).
33-
34-
### **Step 1**: Configure your `generators.yml`
35-
36-
Start by running the following command:
37-
38-
```sh
39-
fern add fern-postman --group postman
40-
```
41-
42-
Once the command completes, you will see the following configuration added:
43-
44-
```yaml title="generators.yml" {2-8}
45-
groups:
46-
postman:
47-
generators:
48-
- name: fernapi/fern-postman
49-
version: 0.0.45
50-
output:
51-
location: local-file-system
52-
path: ../postman
53-
```
54-
55-
### **Step 2**: Generate a `collection.json`
56-
57-
Start by running the following command:
58-
59-
```sh
60-
fern generate --group postman
61-
```
62-
63-
This will trigger postman collection on Fern's cloud. Once complete, you'll see a `collection.json`:
64-
65-
```bash {4-5}
66-
fern/
67-
├─ fern.config.json
68-
├─ generators.yml
69-
postman
70-
├─ collection.json
71-
```
27+
For information on how to generate a Postman collection, see the [Postman Quickstart](/products/sdks/overview/postman/quickstart.mdx).
7228

7329
## Publishing
7430

75-
If you'd like Fern to publish the collection directly to Postman instead, you can modify your `generators.yml` configuration
76-
in the following way:
77-
78-
```yaml title="generators.yml" {6-9}
79-
generators:
80-
postman:
81-
generators:
82-
- name: fernapi/fern-postman
83-
version: 0.4.0
84-
output:
85-
location: postman
86-
api-key: ${POSTMAN_API_KEY}
87-
workspace-id: 07e228e5-3f91-4223-8e27-bbfe4a81a601
88-
config:
89-
collection-name: My collection name
90-
```
31+
For information on how to publish to a specific collection or directly to Postman, see [Publishing to Postman](/products/sdks/overview/postman/publishing-to-postman.mdx).
9132

92-
If you'd like to publish to a particular collection, just specify the collection ID.
9333

94-
```yaml title="generators.yml" {10}
95-
generators:
96-
postman:
97-
generators:
98-
- name: fernapi/fern-postman
99-
version: 0.4.0
100-
output:
101-
location: postman
102-
api-key: ${POSTMAN_API_KEY}
103-
workspace-id: 07e228e5-3f91-4223-8e27-bbfe4a81a601
104-
collection-id: 21510182-14b07230-46e2-431e-8153-d5c7d217b214
105-
config:
106-
collection-name: My collection name
107-
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Publishing to Postman
3+
description: Publish a Postman collection full of example requests and responses
4+
---
5+
6+
Publish your Postman collection directly to Postman workspaces, making it easy for your team and API consumers to discover and test your endpoints.
7+
8+
## Publish directly to Postman
9+
10+
To publish your collection directly to Postman, configure the output and specify the name of your collection:
11+
12+
```yaml title="generators.yml" {6-9}
13+
generators:
14+
postman:
15+
generators:
16+
- name: fernapi/fern-postman
17+
version: 0.4.0
18+
output:
19+
location: postman
20+
api-key: ${POSTMAN_API_KEY}
21+
workspace-id: 07e228e5-3f91-4223-8e27-bbfe4a81a601
22+
config:
23+
collection-name: My collection name
24+
```
25+
26+
## Publish to a collection
27+
28+
To publish to a particular collection, configure the output and specify the name of your collection and collection ID:
29+
30+
```yaml title="generators.yml" {10}
31+
generators:
32+
postman:
33+
generators:
34+
- name: fernapi/fern-postman
35+
version: 0.4.0
36+
output:
37+
location: postman
38+
api-key: ${POSTMAN_API_KEY}
39+
workspace-id: 07e228e5-3f91-4223-8e27-bbfe4a81a601
40+
collection-id: 21510182-14b07230-46e2-431e-8153-d5c7d217b214
41+
config:
42+
collection-name: My collection name
43+
```
44+
45+
46+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Postman quickstart
3+
description: "Generate a postman collection full of example requests and responses"
4+
---
5+
6+
A Postman collection contains ready-to-use HTTP requests with example payloads and responses that developers can immediately test and explore in Postman. Each API definition generates one complete collection with all endpoints organized into folders.
7+
8+
Generate a Postman collection by following the instructions on this page.
9+
10+
<Info>
11+
This page assumes that you have an initialized `fern` folder on your local
12+
machine. See [Set up the `fern` folder](/sdks/overview/quickstart).
13+
</Info>
14+
15+
<Steps>
16+
17+
<Markdown src="/products/sdks/snippets/pass-fern-check.mdx"/>
18+
19+
### Add the Postman generator
20+
21+
Run the following command to add the Postman generator to `generators.yml`:
22+
23+
```sh
24+
fern add fern-postman --group postman
25+
```
26+
27+
<Note>
28+
`postman` is the name of the `generators.yml` group that configures your Postman collection's output location and other metadata. You can customize this group name to differentiate between multiple collections if you have multiple APIs in your organization.
29+
</Note>
30+
31+
This command adds the following `group` to `generators.yml`:
32+
33+
```yaml title="generators.yml" {2-8}
34+
groups:
35+
postman:
36+
generators:
37+
- name: fernapi/fern-postman
38+
version: 0.0.45
39+
output:
40+
location: local-file-system
41+
path: ../postman
42+
```
43+
44+
### Generate the collection
45+
46+
Run the following command:
47+
48+
```sh
49+
fern generate --group postman
50+
```
51+
52+
<Note>
53+
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
54+
55+
```bash
56+
fern generate --group postman --api your-api-name
57+
```
58+
</Note>
59+
60+
This creates a Postman collection on Fern's cloud. Once complete, you'll see a `collection.json`:
61+
62+
```bash {4-5}
63+
fern/
64+
├─ fern.config.json
65+
├─ generators.yml
66+
postman
67+
├─ collection.json
68+
```
69+
</Steps>

fern/products/sdks/sdks.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ navigation:
179179
slug: changelog
180180
- link: Customer showcase
181181
href: https://buildwithfern.com/showcase#sdk-customers.ruby
182+
- section: Postman
183+
contents:
184+
- page: Quickstart
185+
path: ./overview/postman/quickstart.mdx
186+
slug: quickstart
187+
- page: Publishing to Postman
188+
path: ./overview/postman/publishing-to-postman.mdx
189+
slug: publishing
182190
- page: MCP Server
183191
path: ./overview/mcp-server/introduction.mdx
184192
slug: mcp-server

0 commit comments

Comments
 (0)