Skip to content

Commit b2309a9

Browse files
authored
CLOUDP-278958: improve postman documentation (#303)
1 parent e97d097 commit b2309a9

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

.github/workflows/release-postman.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_call:
44
inputs:
55
atlas_prod_base_url:
6-
description: 'Base URL of Atlas.'
6+
description: Base URL of Atlas
77
required: true
88
type: string
99
secrets: # all secrets are passed explicitly in this workflow

tools/postman/README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
# Postman Collections from OpenAPI
22

3-
This folder contains the code required to generate the MongoDB Atlas Postman collections from the MongoDB OpenAPI Specification. All scripts can be run locally if the environment variables for POSTMAN_API_KEY, WORKSPACE_ID, BASE_URL, and SLACK_WEBHOOK_URL are set
3+
Folder contains the code required to generate the [MongoDB Atlas Postman collections](https://www.postman.com/mongodb-devrel?tab=collections).
4+
Collections are generated from from the MongoDB OpenAPI Specification.
45

56
## Purpose of the project
67

78
Scripts allow for the generation of Postman collections from OpenAPI specifications. This allows
8-
the [DevRel Postman workspace](https://www.postman.com/mongodb-devrel) to stay up to date with the latest version of the
9+
the [DevRel Postman workspace](https://www.postman.com/mongodb-devrel?tab=collections) to stay up to date with the latest version of the
910
API.
1011

12+
Process of updating involves:
13+
1114
1. Fetching OpenAPI file
1215
2. Converting OpenAPI file to Postman Collection
1316
3. Updating information about the Collection
1417
4. Uploading the Collection to Postman
1518

16-
## Postman folder structure
17-
18-
- `openapi` - Where the OpenAPI Spec, version information, and fork files are stored
19-
- `tmp` - Where the Postman Collection is generated and the temporary working files are stored
20-
- `scripts` - Where the Bash scripts are stored
21-
- `validation` - Where the files for spectral validation of the generated collection is stored
22-
2319
## Postman Collection Generation Workflow
2420

2521
```mermaid
@@ -48,6 +44,20 @@ flowchart TD
4844

4945
5. **Upload Collection to Postman**: Use the Postman API to upload the Collection to Postman.
5046

47+
## Limitations
48+
49+
Our Postman collection generation has several limitations, meaning some manual user actions may be necessary during setup:
50+
51+
- Only a single content-type header is supported generation, meaning users may have to manually update this header if the API supports more than one; see docs links on endpoint level
52+
- Only a single auth scheme is supported during generation, meaning users may have to update their auth on the collection level or endpoint level if not selecting the default
53+
54+
## Postman folder structure
55+
56+
- `openapi` - Where the OpenAPI Spec, version information, and fork files are stored
57+
- `tmp` - Where the Postman Collection is generated and the temporary working files are stored
58+
- `scripts` - Where the Bash scripts are stored
59+
- `validation` - Where the files for spectral validation of the generated collection is stored
60+
5161
## Local setup and validation
5262

5363
### Prerequisites
@@ -64,6 +74,7 @@ To test the scripts locally, you should set up the required environment variable
6474
BASE_URL=""
6575
WORKSPACE_ID=""
6676
POSTMAN_API_KEY=""
77+
SLACK_WEBHOOK_URL=""
6778
```
6879

6980
Run `make load-env` to set your required and overriding env vars.
@@ -78,10 +89,6 @@ Once env vars are configured, the setup scripts can be run locally using the Mak
7889
- `make transform_collection`
7990
- `make upload_collection`
8091

92+
## Automatic updates
8193

82-
### Limitations
83-
84-
Our Postman collection generation has several limitations, meaning some manual user actions may be necessary during setup:
85-
86-
- Only a single content-type header is supported generation, meaning users may have to manually update this header if the API supports more than one; see docs links on endpoint level
87-
- Only a single auth scheme is supported during generation, meaning users may have to update their auth on the collection level or endpoint level if not selecting the default
94+
Postman collection is regerented automatically by github action [`release-spec.yml`](../../.github/workflows/release-spec.yml)

0 commit comments

Comments
 (0)