Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 059bab0

Browse files
author
Phil Sturgeon
committed
Paths are all being placed under root when converted to swagger
1 parent 5fab016 commit 059bab0

3 files changed

Lines changed: 779 additions & 1 deletion

File tree

testing/e2e/postman-collection2-internal/e2e.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const fixDiff = (actual, index) => {
4545
}
4646

4747
describe('postman collection v2 -> internal', () => {
48-
for (let index = 0; index < 1; index += 1) {
48+
for (let index = 0; index < 2; index += 1) {
4949
it('should match expected output for test case #' + index, (done) => {
5050
const output = fs.readFileSync(
5151
resolve(__dirname, './test-case-' + index + '/output.json'),
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"info": {
3+
"name": "User Management API",
4+
"description": "Certainly not a snippet from a real thing at work",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+
},
7+
"item": [
8+
{
9+
"name": "Users",
10+
"description": "User Management API",
11+
"item": [
12+
{
13+
"name": "Fetch Users",
14+
"request": {
15+
"method": "GET",
16+
"header": [
17+
{
18+
"value": "Bearer {{access_token}}",
19+
"key": "Authorization"
20+
}
21+
],
22+
"body": {
23+
"mode": "raw",
24+
"raw": ""
25+
},
26+
"url": {
27+
"raw": "http://example.org/users",
28+
"host": [
29+
"http://example.org"
30+
],
31+
"path": [
32+
"users"
33+
]
34+
}
35+
},
36+
"response": []
37+
},
38+
{
39+
"name": "Create a User",
40+
"request": {
41+
"method": "POST",
42+
"header": [
43+
{
44+
"value": "application/json",
45+
"key": "Content-Type"
46+
},
47+
{
48+
"value": "Bearer {{access_token}}",
49+
"key": "Authorization"
50+
}
51+
],
52+
"body": {
53+
"mode": "raw",
54+
"raw": "{\n \"data\" : {\n \"attributes\" : {\n \"username\" : \"user\",\n \"email\" : \"user@example.org\",\n \"firstName\" : \"Some\",\n \"lastName\" : \"User\",\n \"enabled\" : true,\n \"password\" : \"abc123\"\n }\n }\n}"
55+
},
56+
"url": {
57+
"raw": "http://example.org/users",
58+
"host": [
59+
"http://example.org"
60+
],
61+
"path": [
62+
"users"
63+
]
64+
}
65+
},
66+
"response": []
67+
},
68+
{
69+
"name": "Update a User",
70+
"request": {
71+
"method": "PATCH",
72+
"header": [
73+
{
74+
"value": "application/json",
75+
"key": "Content-Type"
76+
},
77+
{
78+
"value": "Bearer {{access_token}}",
79+
"key": "Authorization"
80+
}
81+
],
82+
"body": {
83+
"mode": "raw",
84+
"raw": "{\n \"data\" : {\n \"attributes\" : {\n \"foo\" : \"bar\",\n \"password\": null\n }\n }\n}"
85+
},
86+
"url": {
87+
"raw": "http://example.org/users/{{user_id}}",
88+
"host": [
89+
"http://example.org"
90+
],
91+
"path": [
92+
"users",
93+
"{{user_id}}"
94+
]
95+
},
96+
"description": "Update an existing user"
97+
},
98+
"response": []
99+
}
100+
]
101+
}
102+
]
103+
}

0 commit comments

Comments
 (0)