You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/postman/README.md
+22-15Lines changed: 22 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,21 @@
1
1
# Postman Collections from OpenAPI
2
2
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.
4
5
5
6
## Purpose of the project
6
7
7
8
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
9
10
API.
10
11
12
+
Process of updating involves:
13
+
11
14
1. Fetching OpenAPI file
12
15
2. Converting OpenAPI file to Postman Collection
13
16
3. Updating information about the Collection
14
17
4. Uploading the Collection to Postman
15
18
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
-
23
19
## Postman Collection Generation Workflow
24
20
25
21
```mermaid
@@ -48,6 +44,20 @@ flowchart TD
48
44
49
45
5.**Upload Collection to Postman**: Use the Postman API to upload the Collection to Postman.
50
46
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
+
51
61
## Local setup and validation
52
62
53
63
### Prerequisites
@@ -64,6 +74,7 @@ To test the scripts locally, you should set up the required environment variable
64
74
BASE_URL=""
65
75
WORKSPACE_ID=""
66
76
POSTMAN_API_KEY=""
77
+
SLACK_WEBHOOK_URL=""
67
78
```
68
79
69
80
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
78
89
-`make transform_collection`
79
90
-`make upload_collection`
80
91
92
+
## Automatic updates
81
93
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