openapi-to-postman-complete 0.0.2 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +33 -11
  2. package/dist/index.js +1 -1
  3. package/package.json +4 -4
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
- - **Environment variables** - Dynamic, reusable collections
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 '@openapi-to-postman-complete/core';
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(collection, {
113
- variables: {
114
- environment: { baseUrl: 'https://api.example.com' },
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
- tests: { auto: true },
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(collection, './config.yaml');
141
+ const enriched = enrichCollection(
142
+ collection,
143
+ './config.yaml',
144
+ './existing-collection.json'
145
+ );
124
146
  ```
125
147
 
126
148
  ## License
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Command-line tool for converting OpenAPI specs to production-ready Postman collections
5
5
  */
6
6
  import { readFileSync, writeFileSync } from 'fs';
7
- import { enrichCollection } from '@openapi-to-postman-complete/core';
7
+ import { enrichCollection } from '@postman-enricher/core';
8
8
  // @ts-expect-error - openapi-to-postmanv2 doesn't have types
9
9
  import Converter from 'openapi-to-postmanv2';
10
10
  function showHelp() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-to-postman-complete",
3
- "version": "0.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Complete OpenAPI to Postman converter with filtering, descriptions, examples, variables, and auto-generated tests",
5
5
  "keywords": [
6
6
  "openapi",
@@ -9,7 +9,7 @@
9
9
  "api",
10
10
  "converter",
11
11
  "collection",
12
- "complete",
12
+ "enricher",
13
13
  "production-ready",
14
14
  "testing",
15
15
  "examples",
@@ -28,8 +28,8 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "openapi-to-postmanv2": "^5.5.0",
31
- "@openapi-to-postman-complete/core": "0.0.0-development",
32
- "@openapi-to-postman-complete/shared": "0.0.0-development"
31
+ "@postman-enricher/core": "1.1.0",
32
+ "@postman-enricher/shared": "1.1.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@anolilab/semantic-release-pnpm": "^3.0.0",