doc-detective-common 1.21.0-openapi.9 → 1.21.1-dev.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.
@@ -1,65 +1,65 @@
1
- {
2
- "title": "checkLink",
3
- "type": "object",
4
- "description": "Check if a URL returns an acceptable status code from a GET request.",
5
- "properties": {
6
- "id": {
7
- "type": "string",
8
- "description": "ID of the step."
9
- },
10
- "description": {
11
- "type": "string",
12
- "description": "Description of the step."
13
- },
14
- "action": {
15
- "type": "string",
16
- "const": "checkLink",
17
- "description": "Action to perform."
18
- },
19
- "url": {
20
- "type": "string",
21
- "description": "URL to check.",
22
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
23
- "transform": ["trim"]
24
- },
25
- "origin": {
26
- "type": "string",
27
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
28
- "transform": ["trim"]
29
- },
30
- "statusCodes": {
31
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
32
- "type": "array",
33
- "items": {
34
- "oneOf": [
35
- {
36
- "type": "integer"
37
- }
38
- ]
39
- },
40
- "default": [200, 201, 202]
41
- }
42
- },
43
- "dynamicDefaults": {
44
- "id": "uuid"
45
- },
46
- "required": ["action", "url"],
47
- "additionalProperties": false,
48
- "examples": [
49
- {
50
- "action": "checkLink",
51
- "url": "https://www.google.com"
52
- },
53
- {
54
- "action": "checkLink",
55
- "url": "https://www.google.com",
56
- "statusCodes": [200]
57
- },
58
- {
59
- "action": "checkLink",
60
- "url": "/search",
61
- "origin": "www.google.com",
62
- "statusCodes": [200]
63
- }
64
- ]
65
- }
1
+ {
2
+ "title": "checkLink",
3
+ "type": "object",
4
+ "description": "Check if a URL returns an acceptable status code from a GET request.",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "description": "ID of the step."
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "description": "Description of the step."
13
+ },
14
+ "action": {
15
+ "type": "string",
16
+ "const": "checkLink",
17
+ "description": "Action to perform."
18
+ },
19
+ "url": {
20
+ "type": "string",
21
+ "description": "URL to check.",
22
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
23
+ "transform": ["trim"]
24
+ },
25
+ "origin": {
26
+ "type": "string",
27
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
28
+ "transform": ["trim"]
29
+ },
30
+ "statusCodes": {
31
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
32
+ "type": "array",
33
+ "items": {
34
+ "oneOf": [
35
+ {
36
+ "type": "integer"
37
+ }
38
+ ]
39
+ },
40
+ "default": [200, 201, 202]
41
+ }
42
+ },
43
+ "dynamicDefaults": {
44
+ "id": "uuid"
45
+ },
46
+ "required": ["action", "url"],
47
+ "additionalProperties": false,
48
+ "examples": [
49
+ {
50
+ "action": "checkLink",
51
+ "url": "https://www.google.com"
52
+ },
53
+ {
54
+ "action": "checkLink",
55
+ "url": "https://www.google.com",
56
+ "statusCodes": [200]
57
+ },
58
+ {
59
+ "action": "checkLink",
60
+ "url": "/search",
61
+ "origin": "www.google.com",
62
+ "statusCodes": [200]
63
+ }
64
+ ]
65
+ }
@@ -501,7 +501,7 @@
501
501
  "$commment": "Only allow operationId at the step level."
502
502
  }
503
503
  },
504
- "required": ["name", "definitionPath"]
504
+ "required": ["name", "descriptionPath"]
505
505
  }
506
506
  ]
507
507
  }
@@ -611,7 +611,7 @@
611
611
  "openApi": [
612
612
  {
613
613
  "name": "Acme",
614
- "definitionPath": "https://www.acme.com/openapi.json",
614
+ "descriptionPath": "https://www.acme.com/openapi.json",
615
615
  "server": "https://api.acme.com",
616
616
  "mockResponse": true
617
617
  }
@@ -1,58 +1,58 @@
1
- {
2
- "title": "goTo",
3
- "type": "object",
4
- "description": "Navigate to a specified URL.",
5
- "properties": {
6
- "id": {
7
- "type": "string",
8
- "description": "ID of the step."
9
- },
10
- "description": {
11
- "type": "string",
12
- "description": "Description of the step."
13
- },
14
- "action": {
15
- "type": "string",
16
- "const": "goTo",
17
- "description": "Action to perform."
18
- },
19
- "url": {
20
- "type": "string",
21
- "description": "URL to navigate to.",
22
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
23
- "transform": ["trim"]
24
- },
25
- "origin": {
26
- "type": "string",
27
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
28
- "transform": ["trim"]
29
- }
30
- },
31
- "dynamicDefaults": {
32
- "id": "uuid"
33
- },
34
- "required": [
35
- "action",
36
- "url"
37
- ],
38
- "additionalProperties": false,
39
- "examples": [
40
- {
41
- "action": "goTo",
42
- "url": "https://www.google.com"
43
- },
44
- {
45
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
46
- "description": "This is a test!",
47
- "action": "goTo",
48
- "url": "https://www.google.com"
49
- },
50
- {
51
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
52
- "description": "This is a test!",
53
- "action": "goTo",
54
- "url": "/search",
55
- "origin": "https://www.google.com"
56
- }
57
- ]
1
+ {
2
+ "title": "goTo",
3
+ "type": "object",
4
+ "description": "Navigate to a specified URL.",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "description": "ID of the step."
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "description": "Description of the step."
13
+ },
14
+ "action": {
15
+ "type": "string",
16
+ "const": "goTo",
17
+ "description": "Action to perform."
18
+ },
19
+ "url": {
20
+ "type": "string",
21
+ "description": "URL to navigate to.",
22
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
23
+ "transform": ["trim"]
24
+ },
25
+ "origin": {
26
+ "type": "string",
27
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
28
+ "transform": ["trim"]
29
+ }
30
+ },
31
+ "dynamicDefaults": {
32
+ "id": "uuid"
33
+ },
34
+ "required": [
35
+ "action",
36
+ "url"
37
+ ],
38
+ "additionalProperties": false,
39
+ "examples": [
40
+ {
41
+ "action": "goTo",
42
+ "url": "https://www.google.com"
43
+ },
44
+ {
45
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
46
+ "description": "This is a test!",
47
+ "action": "goTo",
48
+ "url": "https://www.google.com"
49
+ },
50
+ {
51
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
52
+ "description": "This is a test!",
53
+ "action": "goTo",
54
+ "url": "/search",
55
+ "origin": "https://www.google.com"
56
+ }
57
+ ]
58
58
  }
@@ -244,7 +244,7 @@
244
244
  {
245
245
  "action": "httpRequest",
246
246
  "openApi": {
247
- "definitionPath": "https://api.example.com/openapi.json",
247
+ "descriptionPath": "https://api.example.com/openapi.json",
248
248
  "operationId": "getUserById"
249
249
  },
250
250
  "requestParams": {
@@ -254,7 +254,7 @@
254
254
  {
255
255
  "action": "httpRequest",
256
256
  "openApi": {
257
- "definitionPath": "https://api.example.com/openapi.json",
257
+ "descriptionPath": "https://api.example.com/openapi.json",
258
258
  "operationId": "createUser",
259
259
  "useExample": "both"
260
260
  }
@@ -262,7 +262,7 @@
262
262
  {
263
263
  "action": "httpRequest",
264
264
  "openApi": {
265
- "definitionPath": "https://api.example.com/openapi.json",
265
+ "descriptionPath": "https://api.example.com/openapi.json",
266
266
  "operationId": "updateUser",
267
267
  "useExample": "request",
268
268
  "exampleKey": "acme"
@@ -271,7 +271,7 @@
271
271
  {
272
272
  "action": "httpRequest",
273
273
  "openApi": {
274
- "definitionPath": "https://api.example.com/openapi.json",
274
+ "descriptionPath": "https://api.example.com/openapi.json",
275
275
  "operationId": "updateUser",
276
276
  "useExample": "request",
277
277
  "exampleKey": "acme",
@@ -1,4 +1,7 @@
1
1
  {
2
+ "$id": "openApi_v2.schema.json",
3
+ "version": "1.0.0",
4
+ "$schema": "http://json-schema.org/draft-07/schema#",
2
5
  "title": "openApi",
3
6
  "type": "object",
4
7
  "description": "OpenAPI definition and configuration.",
@@ -8,7 +11,7 @@
8
11
  "type": "string",
9
12
  "description": "Name of the OpenAPI definition, as defined in your configuration."
10
13
  },
11
- "definitionPath": {
14
+ "descriptionPath": {
12
15
  "type": "string",
13
16
  "description": "URL or local path to the OpenAPI definition."
14
17
  },
@@ -55,7 +58,7 @@
55
58
  },
56
59
  "examples":[
57
60
  {
58
- "definitionPath": "https://petstore.swagger.io/v2/swagger.json"
61
+ "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
59
62
  }
60
63
  ]
61
64
  }
@@ -1,38 +1,38 @@
1
- {
2
- "title": "setVariables",
3
- "type": "object",
4
- "description": "Load environment variables from a `.env` file.",
5
- "properties": {
6
- "id": {
7
- "type": "string",
8
- "description": "ID of the step."
9
- },
10
- "description": {
11
- "type": "string",
12
- "description": "Description of the step."
13
- },
14
- "action": {
15
- "type": "string",
16
- "const": "setVariables",
17
- "description": "Action to perform."
18
- },
19
- "path": {
20
- "type": "string",
21
- "description": "Path to the `.env` file."
22
- }
23
- },
24
- "dynamicDefaults": {
25
- "id": "uuid"
26
- },
27
- "required": [
28
- "action",
29
- "path"
30
- ],
31
- "additionalProperties": false,
32
- "examples": [
33
- {
34
- "action": "setVariables",
35
- "path": ".env"
36
- }
37
- ]
1
+ {
2
+ "title": "setVariables",
3
+ "type": "object",
4
+ "description": "Load environment variables from a `.env` file.",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "description": "ID of the step."
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "description": "Description of the step."
13
+ },
14
+ "action": {
15
+ "type": "string",
16
+ "const": "setVariables",
17
+ "description": "Action to perform."
18
+ },
19
+ "path": {
20
+ "type": "string",
21
+ "description": "Path to the `.env` file."
22
+ }
23
+ },
24
+ "dynamicDefaults": {
25
+ "id": "uuid"
26
+ },
27
+ "required": [
28
+ "action",
29
+ "path"
30
+ ],
31
+ "additionalProperties": false,
32
+ "examples": [
33
+ {
34
+ "action": "setVariables",
35
+ "path": ".env"
36
+ }
37
+ ]
38
38
  }
@@ -25,6 +25,26 @@
25
25
  ]
26
26
  }
27
27
  },
28
+ "openApi": {
29
+ "type": "array",
30
+ "items": {
31
+ "allOf": [
32
+ {
33
+ "$ref": "openApi_v2.schema.json#"
34
+ },
35
+ {
36
+ "type": "object",
37
+ "properties": {
38
+ "operationId": {
39
+ "type": "null",
40
+ "$commment": "Only allow operationId at the step level."
41
+ }
42
+ },
43
+ "required": ["name", "descriptionPath"]
44
+ }
45
+ ]
46
+ }
47
+ },
28
48
  "tests": {
29
49
  "description": "[Tests](test) to perform.",
30
50
  "type": "array",
@@ -125,6 +145,31 @@
125
145
  ]
126
146
  }
127
147
  ]
148
+ },
149
+ {
150
+ "id": "Make a request from an OpenAPI definition",
151
+ "openApi": [
152
+ {
153
+ "name": "Acme",
154
+ "descriptionPath": "https://www.acme.com/openapi.json",
155
+ "server": "https://api.acme.com"
156
+ }
157
+ ],
158
+ "tests": [
159
+ {
160
+ "steps": [
161
+ {
162
+ "action": "httpRequest",
163
+ "openApi": {
164
+ "operationId": "getUserById"
165
+ },
166
+ "requestParams": {
167
+ "id": 123
168
+ }
169
+ }
170
+ ]
171
+ }
172
+ ]
128
173
  }
129
174
  ]
130
175
  }
@@ -1,32 +1,32 @@
1
- {
2
- "title": "stopRecording",
3
- "type": "object",
4
- "description": "Stop the current recording.",
5
- "properties": {
6
- "id": {
7
- "type": "string",
8
- "description": "ID of the step."
9
- },
10
- "description": {
11
- "type": "string",
12
- "description": "Description of the step."
13
- },
14
- "action": {
15
- "type": "string",
16
- "const": "stopRecording",
17
- "description": "The action to perform."
18
- }
19
- },
20
- "dynamicDefaults": {
21
- "id": "uuid"
22
- },
23
- "required": [
24
- "action"
25
- ],
26
- "additionalProperties": false,
27
- "examples": [
28
- {
29
- "action": "stopRecording"
30
- }
31
- ]
1
+ {
2
+ "title": "stopRecording",
3
+ "type": "object",
4
+ "description": "Stop the current recording.",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "description": "ID of the step."
9
+ },
10
+ "description": {
11
+ "type": "string",
12
+ "description": "Description of the step."
13
+ },
14
+ "action": {
15
+ "type": "string",
16
+ "const": "stopRecording",
17
+ "description": "The action to perform."
18
+ }
19
+ },
20
+ "dynamicDefaults": {
21
+ "id": "uuid"
22
+ },
23
+ "required": [
24
+ "action"
25
+ ],
26
+ "additionalProperties": false,
27
+ "examples": [
28
+ {
29
+ "action": "stopRecording"
30
+ }
31
+ ]
32
32
  }