doc-detective-common 3.0.4-dev.0 → 3.0.4-dev.1
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/package.json +1 -1
- package/src/schemas/output_schemas/report_v3.schema.json +351 -0
- package/src/schemas/output_schemas/resolvedTests_v3.schema.json +351 -0
- package/src/schemas/output_schemas/spec_v3.schema.json +351 -0
- package/src/schemas/output_schemas/test_v3.schema.json +351 -0
- package/src/schemas/schemas.json +1404 -0
- package/src/schemas/src_schemas/test_v3.schema.json +26 -15
|
@@ -15014,6 +15014,7 @@
|
|
|
15014
15014
|
}
|
|
15015
15015
|
},
|
|
15016
15016
|
"contexts": {
|
|
15017
|
+
"title": "Resolved contexts",
|
|
15017
15018
|
"array": "array",
|
|
15018
15019
|
"readOnly": true,
|
|
15019
15020
|
"description": "Resolved contexts to run the test in. This is a resolved version of the `runOn` property. It is not user-defined and should not be used in test specifications.",
|
|
@@ -15080,6 +15081,179 @@
|
|
|
15080
15081
|
}
|
|
15081
15082
|
}
|
|
15082
15083
|
},
|
|
15084
|
+
"openApi": {
|
|
15085
|
+
"type": "array",
|
|
15086
|
+
"items": {
|
|
15087
|
+
"allOf": [
|
|
15088
|
+
{
|
|
15089
|
+
"version": "1.0.0",
|
|
15090
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
15091
|
+
"title": "openApi",
|
|
15092
|
+
"type": "object",
|
|
15093
|
+
"description": "OpenAPI description and configuration.",
|
|
15094
|
+
"additionalProperties": false,
|
|
15095
|
+
"anyOf": [
|
|
15096
|
+
{
|
|
15097
|
+
"required": [
|
|
15098
|
+
"descriptionPath"
|
|
15099
|
+
]
|
|
15100
|
+
},
|
|
15101
|
+
{
|
|
15102
|
+
"required": [
|
|
15103
|
+
"operationId"
|
|
15104
|
+
]
|
|
15105
|
+
}
|
|
15106
|
+
],
|
|
15107
|
+
"properties": {
|
|
15108
|
+
"name": {
|
|
15109
|
+
"type": "string",
|
|
15110
|
+
"description": "Name of the OpenAPI description, as defined in your configuration."
|
|
15111
|
+
},
|
|
15112
|
+
"descriptionPath": {
|
|
15113
|
+
"type": "string",
|
|
15114
|
+
"description": "URL or local path to the OpenAPI description."
|
|
15115
|
+
},
|
|
15116
|
+
"operationId": {
|
|
15117
|
+
"type": "string",
|
|
15118
|
+
"description": "ID of the operation to use for the request."
|
|
15119
|
+
},
|
|
15120
|
+
"server": {
|
|
15121
|
+
"type": "string",
|
|
15122
|
+
"description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI description."
|
|
15123
|
+
},
|
|
15124
|
+
"validateAgainstSchema": {
|
|
15125
|
+
"type": "string",
|
|
15126
|
+
"description": "Validates the request and/or response against the schema in the OpenAPI description. If the request or response doesn't match the schema, the step fails.",
|
|
15127
|
+
"enum": [
|
|
15128
|
+
"request",
|
|
15129
|
+
"response",
|
|
15130
|
+
"both",
|
|
15131
|
+
"none"
|
|
15132
|
+
],
|
|
15133
|
+
"default": "both"
|
|
15134
|
+
},
|
|
15135
|
+
"mockResponse": {
|
|
15136
|
+
"type": "boolean",
|
|
15137
|
+
"description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI description as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
|
|
15138
|
+
},
|
|
15139
|
+
"statusCode": {
|
|
15140
|
+
"type": "integer",
|
|
15141
|
+
"description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
|
|
15142
|
+
},
|
|
15143
|
+
"useExample": {
|
|
15144
|
+
"type": [
|
|
15145
|
+
"string"
|
|
15146
|
+
],
|
|
15147
|
+
"description": "Uses the example from the OpenAPI description as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
|
|
15148
|
+
"enum": [
|
|
15149
|
+
"request",
|
|
15150
|
+
"response",
|
|
15151
|
+
"both",
|
|
15152
|
+
"none"
|
|
15153
|
+
],
|
|
15154
|
+
"default": "none"
|
|
15155
|
+
},
|
|
15156
|
+
"exampleKey": {
|
|
15157
|
+
"type": "string",
|
|
15158
|
+
"description": "Key of the example to use from the `examples` property in the OpenAPI description. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
|
|
15159
|
+
"default": ""
|
|
15160
|
+
},
|
|
15161
|
+
"headers": {
|
|
15162
|
+
"type": "object",
|
|
15163
|
+
"description": "Request headers to add to requests. For example, to set `Authorization` headers for all requests from the specified OpenAPI document. If specified in both a config and a step, the step value overrides the config value.",
|
|
15164
|
+
"additionalProperties": {
|
|
15165
|
+
"type": "string"
|
|
15166
|
+
}
|
|
15167
|
+
}
|
|
15168
|
+
},
|
|
15169
|
+
"components": {
|
|
15170
|
+
"schemas": {
|
|
15171
|
+
"operationId": {
|
|
15172
|
+
"type": "string",
|
|
15173
|
+
"description": "ID of the operation to use for the request."
|
|
15174
|
+
},
|
|
15175
|
+
"descriptionPath": {
|
|
15176
|
+
"type": "string",
|
|
15177
|
+
"description": "URL or local path to the OpenAPI description."
|
|
15178
|
+
}
|
|
15179
|
+
}
|
|
15180
|
+
},
|
|
15181
|
+
"examples": [
|
|
15182
|
+
{
|
|
15183
|
+
"descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
|
|
15184
|
+
},
|
|
15185
|
+
{
|
|
15186
|
+
"name": "Reqres",
|
|
15187
|
+
"operationId": "getUserById"
|
|
15188
|
+
},
|
|
15189
|
+
{
|
|
15190
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15191
|
+
"operationId": "getUserById"
|
|
15192
|
+
},
|
|
15193
|
+
{
|
|
15194
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15195
|
+
"operationId": "createUser",
|
|
15196
|
+
"useExample": "both"
|
|
15197
|
+
},
|
|
15198
|
+
{
|
|
15199
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15200
|
+
"operationId": "createUser",
|
|
15201
|
+
"useExample": "both",
|
|
15202
|
+
"exampleKey": "example1"
|
|
15203
|
+
},
|
|
15204
|
+
{
|
|
15205
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15206
|
+
"operationId": "createUser",
|
|
15207
|
+
"useExample": "both",
|
|
15208
|
+
"exampleKey": "example1",
|
|
15209
|
+
"statusCode": 201
|
|
15210
|
+
},
|
|
15211
|
+
{
|
|
15212
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15213
|
+
"operationId": "createUser",
|
|
15214
|
+
"useExample": "both",
|
|
15215
|
+
"exampleKey": "example1",
|
|
15216
|
+
"statusCode": 201,
|
|
15217
|
+
"validateAgainstSchema": "none"
|
|
15218
|
+
},
|
|
15219
|
+
{
|
|
15220
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15221
|
+
"operationId": "createUser",
|
|
15222
|
+
"useExample": "both",
|
|
15223
|
+
"exampleKey": "example1",
|
|
15224
|
+
"statusCode": 201,
|
|
15225
|
+
"validateAgainstSchema": "none",
|
|
15226
|
+
"mockResponse": true
|
|
15227
|
+
},
|
|
15228
|
+
{
|
|
15229
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
15230
|
+
"operationId": "createUser",
|
|
15231
|
+
"useExample": "both",
|
|
15232
|
+
"exampleKey": "example1",
|
|
15233
|
+
"statusCode": 201,
|
|
15234
|
+
"validateAgainstSchema": "none",
|
|
15235
|
+
"mockResponse": true,
|
|
15236
|
+
"headers": {
|
|
15237
|
+
"Authorization": "Bearer 12345"
|
|
15238
|
+
}
|
|
15239
|
+
}
|
|
15240
|
+
]
|
|
15241
|
+
},
|
|
15242
|
+
{
|
|
15243
|
+
"type": "object",
|
|
15244
|
+
"not": {
|
|
15245
|
+
"required": [
|
|
15246
|
+
"operationId"
|
|
15247
|
+
]
|
|
15248
|
+
},
|
|
15249
|
+
"required": [
|
|
15250
|
+
"name",
|
|
15251
|
+
"descriptionPath"
|
|
15252
|
+
]
|
|
15253
|
+
}
|
|
15254
|
+
]
|
|
15255
|
+
}
|
|
15256
|
+
},
|
|
15083
15257
|
"steps": {
|
|
15084
15258
|
"description": "Steps to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails. By default, if a step fails, the test stops and the remaining steps are not executed.",
|
|
15085
15259
|
"type": "array",
|
|
@@ -19196,6 +19370,183 @@
|
|
|
19196
19370
|
}
|
|
19197
19371
|
],
|
|
19198
19372
|
"additionalProperties": false,
|
|
19373
|
+
"components": {
|
|
19374
|
+
"schemas": {
|
|
19375
|
+
"openApi": {
|
|
19376
|
+
"type": "array",
|
|
19377
|
+
"items": {
|
|
19378
|
+
"allOf": [
|
|
19379
|
+
{
|
|
19380
|
+
"version": "1.0.0",
|
|
19381
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
19382
|
+
"title": "openApi",
|
|
19383
|
+
"type": "object",
|
|
19384
|
+
"description": "OpenAPI description and configuration.",
|
|
19385
|
+
"additionalProperties": false,
|
|
19386
|
+
"anyOf": [
|
|
19387
|
+
{
|
|
19388
|
+
"required": [
|
|
19389
|
+
"descriptionPath"
|
|
19390
|
+
]
|
|
19391
|
+
},
|
|
19392
|
+
{
|
|
19393
|
+
"required": [
|
|
19394
|
+
"operationId"
|
|
19395
|
+
]
|
|
19396
|
+
}
|
|
19397
|
+
],
|
|
19398
|
+
"properties": {
|
|
19399
|
+
"name": {
|
|
19400
|
+
"type": "string",
|
|
19401
|
+
"description": "Name of the OpenAPI description, as defined in your configuration."
|
|
19402
|
+
},
|
|
19403
|
+
"descriptionPath": {
|
|
19404
|
+
"type": "string",
|
|
19405
|
+
"description": "URL or local path to the OpenAPI description."
|
|
19406
|
+
},
|
|
19407
|
+
"operationId": {
|
|
19408
|
+
"type": "string",
|
|
19409
|
+
"description": "ID of the operation to use for the request."
|
|
19410
|
+
},
|
|
19411
|
+
"server": {
|
|
19412
|
+
"type": "string",
|
|
19413
|
+
"description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI description."
|
|
19414
|
+
},
|
|
19415
|
+
"validateAgainstSchema": {
|
|
19416
|
+
"type": "string",
|
|
19417
|
+
"description": "Validates the request and/or response against the schema in the OpenAPI description. If the request or response doesn't match the schema, the step fails.",
|
|
19418
|
+
"enum": [
|
|
19419
|
+
"request",
|
|
19420
|
+
"response",
|
|
19421
|
+
"both",
|
|
19422
|
+
"none"
|
|
19423
|
+
],
|
|
19424
|
+
"default": "both"
|
|
19425
|
+
},
|
|
19426
|
+
"mockResponse": {
|
|
19427
|
+
"type": "boolean",
|
|
19428
|
+
"description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI description as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
|
|
19429
|
+
},
|
|
19430
|
+
"statusCode": {
|
|
19431
|
+
"type": "integer",
|
|
19432
|
+
"description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
|
|
19433
|
+
},
|
|
19434
|
+
"useExample": {
|
|
19435
|
+
"type": [
|
|
19436
|
+
"string"
|
|
19437
|
+
],
|
|
19438
|
+
"description": "Uses the example from the OpenAPI description as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
|
|
19439
|
+
"enum": [
|
|
19440
|
+
"request",
|
|
19441
|
+
"response",
|
|
19442
|
+
"both",
|
|
19443
|
+
"none"
|
|
19444
|
+
],
|
|
19445
|
+
"default": "none"
|
|
19446
|
+
},
|
|
19447
|
+
"exampleKey": {
|
|
19448
|
+
"type": "string",
|
|
19449
|
+
"description": "Key of the example to use from the `examples` property in the OpenAPI description. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
|
|
19450
|
+
"default": ""
|
|
19451
|
+
},
|
|
19452
|
+
"headers": {
|
|
19453
|
+
"type": "object",
|
|
19454
|
+
"description": "Request headers to add to requests. For example, to set `Authorization` headers for all requests from the specified OpenAPI document. If specified in both a config and a step, the step value overrides the config value.",
|
|
19455
|
+
"additionalProperties": {
|
|
19456
|
+
"type": "string"
|
|
19457
|
+
}
|
|
19458
|
+
}
|
|
19459
|
+
},
|
|
19460
|
+
"components": {
|
|
19461
|
+
"schemas": {
|
|
19462
|
+
"operationId": {
|
|
19463
|
+
"type": "string",
|
|
19464
|
+
"description": "ID of the operation to use for the request."
|
|
19465
|
+
},
|
|
19466
|
+
"descriptionPath": {
|
|
19467
|
+
"type": "string",
|
|
19468
|
+
"description": "URL or local path to the OpenAPI description."
|
|
19469
|
+
}
|
|
19470
|
+
}
|
|
19471
|
+
},
|
|
19472
|
+
"examples": [
|
|
19473
|
+
{
|
|
19474
|
+
"descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
|
|
19475
|
+
},
|
|
19476
|
+
{
|
|
19477
|
+
"name": "Reqres",
|
|
19478
|
+
"operationId": "getUserById"
|
|
19479
|
+
},
|
|
19480
|
+
{
|
|
19481
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19482
|
+
"operationId": "getUserById"
|
|
19483
|
+
},
|
|
19484
|
+
{
|
|
19485
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19486
|
+
"operationId": "createUser",
|
|
19487
|
+
"useExample": "both"
|
|
19488
|
+
},
|
|
19489
|
+
{
|
|
19490
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19491
|
+
"operationId": "createUser",
|
|
19492
|
+
"useExample": "both",
|
|
19493
|
+
"exampleKey": "example1"
|
|
19494
|
+
},
|
|
19495
|
+
{
|
|
19496
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19497
|
+
"operationId": "createUser",
|
|
19498
|
+
"useExample": "both",
|
|
19499
|
+
"exampleKey": "example1",
|
|
19500
|
+
"statusCode": 201
|
|
19501
|
+
},
|
|
19502
|
+
{
|
|
19503
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19504
|
+
"operationId": "createUser",
|
|
19505
|
+
"useExample": "both",
|
|
19506
|
+
"exampleKey": "example1",
|
|
19507
|
+
"statusCode": 201,
|
|
19508
|
+
"validateAgainstSchema": "none"
|
|
19509
|
+
},
|
|
19510
|
+
{
|
|
19511
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19512
|
+
"operationId": "createUser",
|
|
19513
|
+
"useExample": "both",
|
|
19514
|
+
"exampleKey": "example1",
|
|
19515
|
+
"statusCode": 201,
|
|
19516
|
+
"validateAgainstSchema": "none",
|
|
19517
|
+
"mockResponse": true
|
|
19518
|
+
},
|
|
19519
|
+
{
|
|
19520
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
19521
|
+
"operationId": "createUser",
|
|
19522
|
+
"useExample": "both",
|
|
19523
|
+
"exampleKey": "example1",
|
|
19524
|
+
"statusCode": 201,
|
|
19525
|
+
"validateAgainstSchema": "none",
|
|
19526
|
+
"mockResponse": true,
|
|
19527
|
+
"headers": {
|
|
19528
|
+
"Authorization": "Bearer 12345"
|
|
19529
|
+
}
|
|
19530
|
+
}
|
|
19531
|
+
]
|
|
19532
|
+
},
|
|
19533
|
+
{
|
|
19534
|
+
"type": "object",
|
|
19535
|
+
"not": {
|
|
19536
|
+
"required": [
|
|
19537
|
+
"operationId"
|
|
19538
|
+
]
|
|
19539
|
+
},
|
|
19540
|
+
"required": [
|
|
19541
|
+
"name",
|
|
19542
|
+
"descriptionPath"
|
|
19543
|
+
]
|
|
19544
|
+
}
|
|
19545
|
+
]
|
|
19546
|
+
}
|
|
19547
|
+
}
|
|
19548
|
+
}
|
|
19549
|
+
},
|
|
19199
19550
|
"examples": [
|
|
19200
19551
|
{
|
|
19201
19552
|
"steps": [
|