openapi-to-postman-complete 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -12,10 +12,12 @@ The official converter gives you valid Postman collections. We give you **usable
|
|
|
12
12
|
Built on top of Postman's official `openapi-to-postmanv2` converter, adding:
|
|
13
13
|
|
|
14
14
|
- **Endpoint filtering** - Keep only what you need
|
|
15
|
+
- **Resource organization** - Nested folders by REST hierarchy
|
|
15
16
|
- **Rich descriptions** - Human-friendly documentation
|
|
16
17
|
- **Real examples** - Actual request/response data
|
|
17
|
-
- **
|
|
18
|
+
- **Path variables** - Automatic environment variable mapping
|
|
18
19
|
- **Auto-generated tests** - Validation out of the box
|
|
20
|
+
- **ID preservation** - Maintain bookmarks across regenerations
|
|
19
21
|
|
|
20
22
|
## Installation
|
|
21
23
|
|
|
@@ -73,6 +75,11 @@ filter:
|
|
|
73
75
|
POST /pets: true
|
|
74
76
|
GET /pets/:id: true
|
|
75
77
|
|
|
78
|
+
organize:
|
|
79
|
+
enabled: true
|
|
80
|
+
strategy: resources
|
|
81
|
+
nestingLevel: 2
|
|
82
|
+
|
|
76
83
|
descriptions:
|
|
77
84
|
collection:
|
|
78
85
|
Pet Store API:
|
|
@@ -90,12 +97,17 @@ examples:
|
|
|
90
97
|
name: Buddy
|
|
91
98
|
|
|
92
99
|
variables:
|
|
93
|
-
path:
|
|
94
|
-
id: '{{petId}}'
|
|
95
100
|
environment:
|
|
96
101
|
baseUrl: https://api.petstore.com
|
|
97
102
|
petId: '1'
|
|
98
103
|
|
|
104
|
+
pathVariables:
|
|
105
|
+
enabled: true
|
|
106
|
+
mapping:
|
|
107
|
+
id:
|
|
108
|
+
reference: '{{petId}}'
|
|
109
|
+
description: Pet ID
|
|
110
|
+
|
|
99
111
|
tests:
|
|
100
112
|
auto: true
|
|
101
113
|
```
|
|
@@ -105,22 +117,32 @@ See [examples](./examples) for more.
|
|
|
105
117
|
## Programmatic Usage
|
|
106
118
|
|
|
107
119
|
```typescript
|
|
108
|
-
import { enrichCollection } from '@
|
|
120
|
+
import { enrichCollection } from '@postman-enricher/core';
|
|
109
121
|
|
|
110
122
|
const collection = JSON.parse(readFileSync('collection.json', 'utf8'));
|
|
111
123
|
|
|
112
|
-
const enriched = enrichCollection(
|
|
113
|
-
|
|
114
|
-
|
|
124
|
+
const enriched = enrichCollection(
|
|
125
|
+
collection,
|
|
126
|
+
{
|
|
127
|
+
organize: { enabled: true, strategy: 'resources' },
|
|
128
|
+
pathVariables: {
|
|
129
|
+
enabled: true,
|
|
130
|
+
mapping: { id: { reference: '{{petId}}' } },
|
|
131
|
+
},
|
|
132
|
+
tests: { auto: true },
|
|
115
133
|
},
|
|
116
|
-
|
|
117
|
-
|
|
134
|
+
'./existing-collection.json' // Optional: preserves IDs
|
|
135
|
+
);
|
|
118
136
|
```
|
|
119
137
|
|
|
120
|
-
Or load from YAML:
|
|
138
|
+
Or load config from YAML:
|
|
121
139
|
|
|
122
140
|
```typescript
|
|
123
|
-
const enriched = enrichCollection(
|
|
141
|
+
const enriched = enrichCollection(
|
|
142
|
+
collection,
|
|
143
|
+
'./config.yaml',
|
|
144
|
+
'./existing-collection.json'
|
|
145
|
+
);
|
|
124
146
|
```
|
|
125
147
|
|
|
126
148
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-to-postman-complete",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Complete OpenAPI to Postman converter with filtering, descriptions, examples, variables, and auto-generated tests",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openapi",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"openapi-to-postmanv2": "^5.5.0",
|
|
31
|
-
"@postman-enricher/core": "1.
|
|
32
|
-
"@postman-enricher/shared": "1.
|
|
31
|
+
"@postman-enricher/core": "1.2.0",
|
|
32
|
+
"@postman-enricher/shared": "1.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@anolilab/semantic-release-pnpm": "^3.0.0",
|