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
|
@@ -5234,6 +5234,7 @@
|
|
|
5234
5234
|
}
|
|
5235
5235
|
},
|
|
5236
5236
|
"contexts": {
|
|
5237
|
+
"title": "Resolved contexts",
|
|
5237
5238
|
"array": "array",
|
|
5238
5239
|
"readOnly": true,
|
|
5239
5240
|
"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.",
|
|
@@ -5300,6 +5301,179 @@
|
|
|
5300
5301
|
}
|
|
5301
5302
|
}
|
|
5302
5303
|
},
|
|
5304
|
+
"openApi": {
|
|
5305
|
+
"type": "array",
|
|
5306
|
+
"items": {
|
|
5307
|
+
"allOf": [
|
|
5308
|
+
{
|
|
5309
|
+
"version": "1.0.0",
|
|
5310
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5311
|
+
"title": "openApi",
|
|
5312
|
+
"type": "object",
|
|
5313
|
+
"description": "OpenAPI description and configuration.",
|
|
5314
|
+
"additionalProperties": false,
|
|
5315
|
+
"anyOf": [
|
|
5316
|
+
{
|
|
5317
|
+
"required": [
|
|
5318
|
+
"descriptionPath"
|
|
5319
|
+
]
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
"required": [
|
|
5323
|
+
"operationId"
|
|
5324
|
+
]
|
|
5325
|
+
}
|
|
5326
|
+
],
|
|
5327
|
+
"properties": {
|
|
5328
|
+
"name": {
|
|
5329
|
+
"type": "string",
|
|
5330
|
+
"description": "Name of the OpenAPI description, as defined in your configuration."
|
|
5331
|
+
},
|
|
5332
|
+
"descriptionPath": {
|
|
5333
|
+
"type": "string",
|
|
5334
|
+
"description": "URL or local path to the OpenAPI description."
|
|
5335
|
+
},
|
|
5336
|
+
"operationId": {
|
|
5337
|
+
"type": "string",
|
|
5338
|
+
"description": "ID of the operation to use for the request."
|
|
5339
|
+
},
|
|
5340
|
+
"server": {
|
|
5341
|
+
"type": "string",
|
|
5342
|
+
"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."
|
|
5343
|
+
},
|
|
5344
|
+
"validateAgainstSchema": {
|
|
5345
|
+
"type": "string",
|
|
5346
|
+
"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.",
|
|
5347
|
+
"enum": [
|
|
5348
|
+
"request",
|
|
5349
|
+
"response",
|
|
5350
|
+
"both",
|
|
5351
|
+
"none"
|
|
5352
|
+
],
|
|
5353
|
+
"default": "both"
|
|
5354
|
+
},
|
|
5355
|
+
"mockResponse": {
|
|
5356
|
+
"type": "boolean",
|
|
5357
|
+
"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."
|
|
5358
|
+
},
|
|
5359
|
+
"statusCode": {
|
|
5360
|
+
"type": "integer",
|
|
5361
|
+
"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."
|
|
5362
|
+
},
|
|
5363
|
+
"useExample": {
|
|
5364
|
+
"type": [
|
|
5365
|
+
"string"
|
|
5366
|
+
],
|
|
5367
|
+
"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.",
|
|
5368
|
+
"enum": [
|
|
5369
|
+
"request",
|
|
5370
|
+
"response",
|
|
5371
|
+
"both",
|
|
5372
|
+
"none"
|
|
5373
|
+
],
|
|
5374
|
+
"default": "none"
|
|
5375
|
+
},
|
|
5376
|
+
"exampleKey": {
|
|
5377
|
+
"type": "string",
|
|
5378
|
+
"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.",
|
|
5379
|
+
"default": ""
|
|
5380
|
+
},
|
|
5381
|
+
"headers": {
|
|
5382
|
+
"type": "object",
|
|
5383
|
+
"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.",
|
|
5384
|
+
"additionalProperties": {
|
|
5385
|
+
"type": "string"
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
},
|
|
5389
|
+
"components": {
|
|
5390
|
+
"schemas": {
|
|
5391
|
+
"operationId": {
|
|
5392
|
+
"type": "string",
|
|
5393
|
+
"description": "ID of the operation to use for the request."
|
|
5394
|
+
},
|
|
5395
|
+
"descriptionPath": {
|
|
5396
|
+
"type": "string",
|
|
5397
|
+
"description": "URL or local path to the OpenAPI description."
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
},
|
|
5401
|
+
"examples": [
|
|
5402
|
+
{
|
|
5403
|
+
"descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
|
|
5404
|
+
},
|
|
5405
|
+
{
|
|
5406
|
+
"name": "Reqres",
|
|
5407
|
+
"operationId": "getUserById"
|
|
5408
|
+
},
|
|
5409
|
+
{
|
|
5410
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5411
|
+
"operationId": "getUserById"
|
|
5412
|
+
},
|
|
5413
|
+
{
|
|
5414
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5415
|
+
"operationId": "createUser",
|
|
5416
|
+
"useExample": "both"
|
|
5417
|
+
},
|
|
5418
|
+
{
|
|
5419
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5420
|
+
"operationId": "createUser",
|
|
5421
|
+
"useExample": "both",
|
|
5422
|
+
"exampleKey": "example1"
|
|
5423
|
+
},
|
|
5424
|
+
{
|
|
5425
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5426
|
+
"operationId": "createUser",
|
|
5427
|
+
"useExample": "both",
|
|
5428
|
+
"exampleKey": "example1",
|
|
5429
|
+
"statusCode": 201
|
|
5430
|
+
},
|
|
5431
|
+
{
|
|
5432
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5433
|
+
"operationId": "createUser",
|
|
5434
|
+
"useExample": "both",
|
|
5435
|
+
"exampleKey": "example1",
|
|
5436
|
+
"statusCode": 201,
|
|
5437
|
+
"validateAgainstSchema": "none"
|
|
5438
|
+
},
|
|
5439
|
+
{
|
|
5440
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5441
|
+
"operationId": "createUser",
|
|
5442
|
+
"useExample": "both",
|
|
5443
|
+
"exampleKey": "example1",
|
|
5444
|
+
"statusCode": 201,
|
|
5445
|
+
"validateAgainstSchema": "none",
|
|
5446
|
+
"mockResponse": true
|
|
5447
|
+
},
|
|
5448
|
+
{
|
|
5449
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
5450
|
+
"operationId": "createUser",
|
|
5451
|
+
"useExample": "both",
|
|
5452
|
+
"exampleKey": "example1",
|
|
5453
|
+
"statusCode": 201,
|
|
5454
|
+
"validateAgainstSchema": "none",
|
|
5455
|
+
"mockResponse": true,
|
|
5456
|
+
"headers": {
|
|
5457
|
+
"Authorization": "Bearer 12345"
|
|
5458
|
+
}
|
|
5459
|
+
}
|
|
5460
|
+
]
|
|
5461
|
+
},
|
|
5462
|
+
{
|
|
5463
|
+
"type": "object",
|
|
5464
|
+
"not": {
|
|
5465
|
+
"required": [
|
|
5466
|
+
"operationId"
|
|
5467
|
+
]
|
|
5468
|
+
},
|
|
5469
|
+
"required": [
|
|
5470
|
+
"name",
|
|
5471
|
+
"descriptionPath"
|
|
5472
|
+
]
|
|
5473
|
+
}
|
|
5474
|
+
]
|
|
5475
|
+
}
|
|
5476
|
+
},
|
|
5303
5477
|
"steps": {
|
|
5304
5478
|
"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.",
|
|
5305
5479
|
"type": "array",
|
|
@@ -9416,6 +9590,183 @@
|
|
|
9416
9590
|
}
|
|
9417
9591
|
],
|
|
9418
9592
|
"additionalProperties": false,
|
|
9593
|
+
"components": {
|
|
9594
|
+
"schemas": {
|
|
9595
|
+
"openApi": {
|
|
9596
|
+
"type": "array",
|
|
9597
|
+
"items": {
|
|
9598
|
+
"allOf": [
|
|
9599
|
+
{
|
|
9600
|
+
"version": "1.0.0",
|
|
9601
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
9602
|
+
"title": "openApi",
|
|
9603
|
+
"type": "object",
|
|
9604
|
+
"description": "OpenAPI description and configuration.",
|
|
9605
|
+
"additionalProperties": false,
|
|
9606
|
+
"anyOf": [
|
|
9607
|
+
{
|
|
9608
|
+
"required": [
|
|
9609
|
+
"descriptionPath"
|
|
9610
|
+
]
|
|
9611
|
+
},
|
|
9612
|
+
{
|
|
9613
|
+
"required": [
|
|
9614
|
+
"operationId"
|
|
9615
|
+
]
|
|
9616
|
+
}
|
|
9617
|
+
],
|
|
9618
|
+
"properties": {
|
|
9619
|
+
"name": {
|
|
9620
|
+
"type": "string",
|
|
9621
|
+
"description": "Name of the OpenAPI description, as defined in your configuration."
|
|
9622
|
+
},
|
|
9623
|
+
"descriptionPath": {
|
|
9624
|
+
"type": "string",
|
|
9625
|
+
"description": "URL or local path to the OpenAPI description."
|
|
9626
|
+
},
|
|
9627
|
+
"operationId": {
|
|
9628
|
+
"type": "string",
|
|
9629
|
+
"description": "ID of the operation to use for the request."
|
|
9630
|
+
},
|
|
9631
|
+
"server": {
|
|
9632
|
+
"type": "string",
|
|
9633
|
+
"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."
|
|
9634
|
+
},
|
|
9635
|
+
"validateAgainstSchema": {
|
|
9636
|
+
"type": "string",
|
|
9637
|
+
"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.",
|
|
9638
|
+
"enum": [
|
|
9639
|
+
"request",
|
|
9640
|
+
"response",
|
|
9641
|
+
"both",
|
|
9642
|
+
"none"
|
|
9643
|
+
],
|
|
9644
|
+
"default": "both"
|
|
9645
|
+
},
|
|
9646
|
+
"mockResponse": {
|
|
9647
|
+
"type": "boolean",
|
|
9648
|
+
"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."
|
|
9649
|
+
},
|
|
9650
|
+
"statusCode": {
|
|
9651
|
+
"type": "integer",
|
|
9652
|
+
"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."
|
|
9653
|
+
},
|
|
9654
|
+
"useExample": {
|
|
9655
|
+
"type": [
|
|
9656
|
+
"string"
|
|
9657
|
+
],
|
|
9658
|
+
"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.",
|
|
9659
|
+
"enum": [
|
|
9660
|
+
"request",
|
|
9661
|
+
"response",
|
|
9662
|
+
"both",
|
|
9663
|
+
"none"
|
|
9664
|
+
],
|
|
9665
|
+
"default": "none"
|
|
9666
|
+
},
|
|
9667
|
+
"exampleKey": {
|
|
9668
|
+
"type": "string",
|
|
9669
|
+
"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.",
|
|
9670
|
+
"default": ""
|
|
9671
|
+
},
|
|
9672
|
+
"headers": {
|
|
9673
|
+
"type": "object",
|
|
9674
|
+
"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.",
|
|
9675
|
+
"additionalProperties": {
|
|
9676
|
+
"type": "string"
|
|
9677
|
+
}
|
|
9678
|
+
}
|
|
9679
|
+
},
|
|
9680
|
+
"components": {
|
|
9681
|
+
"schemas": {
|
|
9682
|
+
"operationId": {
|
|
9683
|
+
"type": "string",
|
|
9684
|
+
"description": "ID of the operation to use for the request."
|
|
9685
|
+
},
|
|
9686
|
+
"descriptionPath": {
|
|
9687
|
+
"type": "string",
|
|
9688
|
+
"description": "URL or local path to the OpenAPI description."
|
|
9689
|
+
}
|
|
9690
|
+
}
|
|
9691
|
+
},
|
|
9692
|
+
"examples": [
|
|
9693
|
+
{
|
|
9694
|
+
"descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
|
|
9695
|
+
},
|
|
9696
|
+
{
|
|
9697
|
+
"name": "Reqres",
|
|
9698
|
+
"operationId": "getUserById"
|
|
9699
|
+
},
|
|
9700
|
+
{
|
|
9701
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9702
|
+
"operationId": "getUserById"
|
|
9703
|
+
},
|
|
9704
|
+
{
|
|
9705
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9706
|
+
"operationId": "createUser",
|
|
9707
|
+
"useExample": "both"
|
|
9708
|
+
},
|
|
9709
|
+
{
|
|
9710
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9711
|
+
"operationId": "createUser",
|
|
9712
|
+
"useExample": "both",
|
|
9713
|
+
"exampleKey": "example1"
|
|
9714
|
+
},
|
|
9715
|
+
{
|
|
9716
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9717
|
+
"operationId": "createUser",
|
|
9718
|
+
"useExample": "both",
|
|
9719
|
+
"exampleKey": "example1",
|
|
9720
|
+
"statusCode": 201
|
|
9721
|
+
},
|
|
9722
|
+
{
|
|
9723
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9724
|
+
"operationId": "createUser",
|
|
9725
|
+
"useExample": "both",
|
|
9726
|
+
"exampleKey": "example1",
|
|
9727
|
+
"statusCode": 201,
|
|
9728
|
+
"validateAgainstSchema": "none"
|
|
9729
|
+
},
|
|
9730
|
+
{
|
|
9731
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9732
|
+
"operationId": "createUser",
|
|
9733
|
+
"useExample": "both",
|
|
9734
|
+
"exampleKey": "example1",
|
|
9735
|
+
"statusCode": 201,
|
|
9736
|
+
"validateAgainstSchema": "none",
|
|
9737
|
+
"mockResponse": true
|
|
9738
|
+
},
|
|
9739
|
+
{
|
|
9740
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9741
|
+
"operationId": "createUser",
|
|
9742
|
+
"useExample": "both",
|
|
9743
|
+
"exampleKey": "example1",
|
|
9744
|
+
"statusCode": 201,
|
|
9745
|
+
"validateAgainstSchema": "none",
|
|
9746
|
+
"mockResponse": true,
|
|
9747
|
+
"headers": {
|
|
9748
|
+
"Authorization": "Bearer 12345"
|
|
9749
|
+
}
|
|
9750
|
+
}
|
|
9751
|
+
]
|
|
9752
|
+
},
|
|
9753
|
+
{
|
|
9754
|
+
"type": "object",
|
|
9755
|
+
"not": {
|
|
9756
|
+
"required": [
|
|
9757
|
+
"operationId"
|
|
9758
|
+
]
|
|
9759
|
+
},
|
|
9760
|
+
"required": [
|
|
9761
|
+
"name",
|
|
9762
|
+
"descriptionPath"
|
|
9763
|
+
]
|
|
9764
|
+
}
|
|
9765
|
+
]
|
|
9766
|
+
}
|
|
9767
|
+
}
|
|
9768
|
+
}
|
|
9769
|
+
},
|
|
9419
9770
|
"examples": [
|
|
9420
9771
|
{
|
|
9421
9772
|
"steps": [
|