doc-detective-common 3.0.4-dev.0 → 3.0.4-dev.2
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 +2 -2
- package/src/schemas/output_schemas/config_v3.schema.json +30 -0
- package/src/schemas/output_schemas/httpRequest_v3.schema.json +12 -0
- package/src/schemas/output_schemas/openApi_v3.schema.json +6 -0
- package/src/schemas/output_schemas/report_v3.schema.json +400 -1
- package/src/schemas/output_schemas/resolvedTests_v3.schema.json +430 -1
- package/src/schemas/output_schemas/spec_v3.schema.json +400 -1
- package/src/schemas/output_schemas/step_v3.schema.json +12 -0
- package/src/schemas/output_schemas/test_v3.schema.json +394 -1
- package/src/schemas/schemas.json +1684 -4
- package/src/schemas/src_schemas/openApi_v3.schema.json +6 -0
- package/src/schemas/src_schemas/test_v3.schema.json +27 -16
|
@@ -419,6 +419,12 @@
|
|
|
419
419
|
"type": "string",
|
|
420
420
|
"description": "URL or local path to the OpenAPI description."
|
|
421
421
|
},
|
|
422
|
+
"definition": {
|
|
423
|
+
"type": "object",
|
|
424
|
+
"readOnly": true,
|
|
425
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
426
|
+
"additionalProperties": true
|
|
427
|
+
},
|
|
422
428
|
"operationId": {
|
|
423
429
|
"type": "string",
|
|
424
430
|
"description": "ID of the operation to use for the request."
|
|
@@ -2037,6 +2043,12 @@
|
|
|
2037
2043
|
"type": "string",
|
|
2038
2044
|
"description": "URL or local path to the OpenAPI description."
|
|
2039
2045
|
},
|
|
2046
|
+
"definition": {
|
|
2047
|
+
"type": "object",
|
|
2048
|
+
"readOnly": true,
|
|
2049
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
2050
|
+
"additionalProperties": true
|
|
2051
|
+
},
|
|
2040
2052
|
"operationId": {
|
|
2041
2053
|
"type": "string",
|
|
2042
2054
|
"description": "ID of the operation to use for the request."
|
|
@@ -2391,6 +2403,12 @@
|
|
|
2391
2403
|
"type": "string",
|
|
2392
2404
|
"description": "URL or local path to the OpenAPI description."
|
|
2393
2405
|
},
|
|
2406
|
+
"definition": {
|
|
2407
|
+
"type": "object",
|
|
2408
|
+
"readOnly": true,
|
|
2409
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
2410
|
+
"additionalProperties": true
|
|
2411
|
+
},
|
|
2394
2412
|
"operationId": {
|
|
2395
2413
|
"type": "string",
|
|
2396
2414
|
"description": "ID of the operation to use for the request."
|
|
@@ -4665,7 +4683,8 @@
|
|
|
4665
4683
|
}
|
|
4666
4684
|
},
|
|
4667
4685
|
"contexts": {
|
|
4668
|
-
"
|
|
4686
|
+
"title": "Resolved contexts",
|
|
4687
|
+
"type": "array",
|
|
4669
4688
|
"readOnly": true,
|
|
4670
4689
|
"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.",
|
|
4671
4690
|
"items": {
|
|
@@ -4731,6 +4750,185 @@
|
|
|
4731
4750
|
}
|
|
4732
4751
|
}
|
|
4733
4752
|
},
|
|
4753
|
+
"openApi": {
|
|
4754
|
+
"type": "array",
|
|
4755
|
+
"items": {
|
|
4756
|
+
"allOf": [
|
|
4757
|
+
{
|
|
4758
|
+
"version": "1.0.0",
|
|
4759
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4760
|
+
"title": "openApi",
|
|
4761
|
+
"type": "object",
|
|
4762
|
+
"description": "OpenAPI description and configuration.",
|
|
4763
|
+
"additionalProperties": false,
|
|
4764
|
+
"anyOf": [
|
|
4765
|
+
{
|
|
4766
|
+
"required": [
|
|
4767
|
+
"descriptionPath"
|
|
4768
|
+
]
|
|
4769
|
+
},
|
|
4770
|
+
{
|
|
4771
|
+
"required": [
|
|
4772
|
+
"operationId"
|
|
4773
|
+
]
|
|
4774
|
+
}
|
|
4775
|
+
],
|
|
4776
|
+
"properties": {
|
|
4777
|
+
"name": {
|
|
4778
|
+
"type": "string",
|
|
4779
|
+
"description": "Name of the OpenAPI description, as defined in your configuration."
|
|
4780
|
+
},
|
|
4781
|
+
"descriptionPath": {
|
|
4782
|
+
"type": "string",
|
|
4783
|
+
"description": "URL or local path to the OpenAPI description."
|
|
4784
|
+
},
|
|
4785
|
+
"definition": {
|
|
4786
|
+
"type": "object",
|
|
4787
|
+
"readOnly": true,
|
|
4788
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
4789
|
+
"additionalProperties": true
|
|
4790
|
+
},
|
|
4791
|
+
"operationId": {
|
|
4792
|
+
"type": "string",
|
|
4793
|
+
"description": "ID of the operation to use for the request."
|
|
4794
|
+
},
|
|
4795
|
+
"server": {
|
|
4796
|
+
"type": "string",
|
|
4797
|
+
"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."
|
|
4798
|
+
},
|
|
4799
|
+
"validateAgainstSchema": {
|
|
4800
|
+
"type": "string",
|
|
4801
|
+
"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.",
|
|
4802
|
+
"enum": [
|
|
4803
|
+
"request",
|
|
4804
|
+
"response",
|
|
4805
|
+
"both",
|
|
4806
|
+
"none"
|
|
4807
|
+
],
|
|
4808
|
+
"default": "both"
|
|
4809
|
+
},
|
|
4810
|
+
"mockResponse": {
|
|
4811
|
+
"type": "boolean",
|
|
4812
|
+
"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."
|
|
4813
|
+
},
|
|
4814
|
+
"statusCode": {
|
|
4815
|
+
"type": "integer",
|
|
4816
|
+
"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."
|
|
4817
|
+
},
|
|
4818
|
+
"useExample": {
|
|
4819
|
+
"type": [
|
|
4820
|
+
"string"
|
|
4821
|
+
],
|
|
4822
|
+
"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.",
|
|
4823
|
+
"enum": [
|
|
4824
|
+
"request",
|
|
4825
|
+
"response",
|
|
4826
|
+
"both",
|
|
4827
|
+
"none"
|
|
4828
|
+
],
|
|
4829
|
+
"default": "none"
|
|
4830
|
+
},
|
|
4831
|
+
"exampleKey": {
|
|
4832
|
+
"type": "string",
|
|
4833
|
+
"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.",
|
|
4834
|
+
"default": ""
|
|
4835
|
+
},
|
|
4836
|
+
"headers": {
|
|
4837
|
+
"type": "object",
|
|
4838
|
+
"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.",
|
|
4839
|
+
"additionalProperties": {
|
|
4840
|
+
"type": "string"
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
},
|
|
4844
|
+
"components": {
|
|
4845
|
+
"schemas": {
|
|
4846
|
+
"operationId": {
|
|
4847
|
+
"type": "string",
|
|
4848
|
+
"description": "ID of the operation to use for the request."
|
|
4849
|
+
},
|
|
4850
|
+
"descriptionPath": {
|
|
4851
|
+
"type": "string",
|
|
4852
|
+
"description": "URL or local path to the OpenAPI description."
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4855
|
+
},
|
|
4856
|
+
"examples": [
|
|
4857
|
+
{
|
|
4858
|
+
"descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
"name": "Reqres",
|
|
4862
|
+
"operationId": "getUserById"
|
|
4863
|
+
},
|
|
4864
|
+
{
|
|
4865
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4866
|
+
"operationId": "getUserById"
|
|
4867
|
+
},
|
|
4868
|
+
{
|
|
4869
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4870
|
+
"operationId": "createUser",
|
|
4871
|
+
"useExample": "both"
|
|
4872
|
+
},
|
|
4873
|
+
{
|
|
4874
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4875
|
+
"operationId": "createUser",
|
|
4876
|
+
"useExample": "both",
|
|
4877
|
+
"exampleKey": "example1"
|
|
4878
|
+
},
|
|
4879
|
+
{
|
|
4880
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4881
|
+
"operationId": "createUser",
|
|
4882
|
+
"useExample": "both",
|
|
4883
|
+
"exampleKey": "example1",
|
|
4884
|
+
"statusCode": 201
|
|
4885
|
+
},
|
|
4886
|
+
{
|
|
4887
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4888
|
+
"operationId": "createUser",
|
|
4889
|
+
"useExample": "both",
|
|
4890
|
+
"exampleKey": "example1",
|
|
4891
|
+
"statusCode": 201,
|
|
4892
|
+
"validateAgainstSchema": "none"
|
|
4893
|
+
},
|
|
4894
|
+
{
|
|
4895
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4896
|
+
"operationId": "createUser",
|
|
4897
|
+
"useExample": "both",
|
|
4898
|
+
"exampleKey": "example1",
|
|
4899
|
+
"statusCode": 201,
|
|
4900
|
+
"validateAgainstSchema": "none",
|
|
4901
|
+
"mockResponse": true
|
|
4902
|
+
},
|
|
4903
|
+
{
|
|
4904
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
4905
|
+
"operationId": "createUser",
|
|
4906
|
+
"useExample": "both",
|
|
4907
|
+
"exampleKey": "example1",
|
|
4908
|
+
"statusCode": 201,
|
|
4909
|
+
"validateAgainstSchema": "none",
|
|
4910
|
+
"mockResponse": true,
|
|
4911
|
+
"headers": {
|
|
4912
|
+
"Authorization": "Bearer 12345"
|
|
4913
|
+
}
|
|
4914
|
+
}
|
|
4915
|
+
]
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
"type": "object",
|
|
4919
|
+
"not": {
|
|
4920
|
+
"required": [
|
|
4921
|
+
"operationId"
|
|
4922
|
+
]
|
|
4923
|
+
},
|
|
4924
|
+
"required": [
|
|
4925
|
+
"name",
|
|
4926
|
+
"descriptionPath"
|
|
4927
|
+
]
|
|
4928
|
+
}
|
|
4929
|
+
]
|
|
4930
|
+
}
|
|
4931
|
+
},
|
|
4734
4932
|
"steps": {
|
|
4735
4933
|
"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.",
|
|
4736
4934
|
"type": "array",
|
|
@@ -6200,6 +6398,12 @@
|
|
|
6200
6398
|
"type": "string",
|
|
6201
6399
|
"description": "URL or local path to the OpenAPI description."
|
|
6202
6400
|
},
|
|
6401
|
+
"definition": {
|
|
6402
|
+
"type": "object",
|
|
6403
|
+
"readOnly": true,
|
|
6404
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
6405
|
+
"additionalProperties": true
|
|
6406
|
+
},
|
|
6203
6407
|
"operationId": {
|
|
6204
6408
|
"type": "string",
|
|
6205
6409
|
"description": "ID of the operation to use for the request."
|
|
@@ -6554,6 +6758,12 @@
|
|
|
6554
6758
|
"type": "string",
|
|
6555
6759
|
"description": "URL or local path to the OpenAPI description."
|
|
6556
6760
|
},
|
|
6761
|
+
"definition": {
|
|
6762
|
+
"type": "object",
|
|
6763
|
+
"readOnly": true,
|
|
6764
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
6765
|
+
"additionalProperties": true
|
|
6766
|
+
},
|
|
6557
6767
|
"operationId": {
|
|
6558
6768
|
"type": "string",
|
|
6559
6769
|
"description": "ID of the operation to use for the request."
|
|
@@ -8847,6 +9057,189 @@
|
|
|
8847
9057
|
}
|
|
8848
9058
|
],
|
|
8849
9059
|
"additionalProperties": false,
|
|
9060
|
+
"components": {
|
|
9061
|
+
"schemas": {
|
|
9062
|
+
"openApi": {
|
|
9063
|
+
"type": "array",
|
|
9064
|
+
"items": {
|
|
9065
|
+
"allOf": [
|
|
9066
|
+
{
|
|
9067
|
+
"version": "1.0.0",
|
|
9068
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
9069
|
+
"title": "openApi",
|
|
9070
|
+
"type": "object",
|
|
9071
|
+
"description": "OpenAPI description and configuration.",
|
|
9072
|
+
"additionalProperties": false,
|
|
9073
|
+
"anyOf": [
|
|
9074
|
+
{
|
|
9075
|
+
"required": [
|
|
9076
|
+
"descriptionPath"
|
|
9077
|
+
]
|
|
9078
|
+
},
|
|
9079
|
+
{
|
|
9080
|
+
"required": [
|
|
9081
|
+
"operationId"
|
|
9082
|
+
]
|
|
9083
|
+
}
|
|
9084
|
+
],
|
|
9085
|
+
"properties": {
|
|
9086
|
+
"name": {
|
|
9087
|
+
"type": "string",
|
|
9088
|
+
"description": "Name of the OpenAPI description, as defined in your configuration."
|
|
9089
|
+
},
|
|
9090
|
+
"descriptionPath": {
|
|
9091
|
+
"type": "string",
|
|
9092
|
+
"description": "URL or local path to the OpenAPI description."
|
|
9093
|
+
},
|
|
9094
|
+
"definition": {
|
|
9095
|
+
"type": "object",
|
|
9096
|
+
"readOnly": true,
|
|
9097
|
+
"description": "OpenAPI definition object loaded from the `descriptionPath`. This is a resolved version of the OpenAPI description and should not be user-defined.",
|
|
9098
|
+
"additionalProperties": true
|
|
9099
|
+
},
|
|
9100
|
+
"operationId": {
|
|
9101
|
+
"type": "string",
|
|
9102
|
+
"description": "ID of the operation to use for the request."
|
|
9103
|
+
},
|
|
9104
|
+
"server": {
|
|
9105
|
+
"type": "string",
|
|
9106
|
+
"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."
|
|
9107
|
+
},
|
|
9108
|
+
"validateAgainstSchema": {
|
|
9109
|
+
"type": "string",
|
|
9110
|
+
"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.",
|
|
9111
|
+
"enum": [
|
|
9112
|
+
"request",
|
|
9113
|
+
"response",
|
|
9114
|
+
"both",
|
|
9115
|
+
"none"
|
|
9116
|
+
],
|
|
9117
|
+
"default": "both"
|
|
9118
|
+
},
|
|
9119
|
+
"mockResponse": {
|
|
9120
|
+
"type": "boolean",
|
|
9121
|
+
"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."
|
|
9122
|
+
},
|
|
9123
|
+
"statusCode": {
|
|
9124
|
+
"type": "integer",
|
|
9125
|
+
"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."
|
|
9126
|
+
},
|
|
9127
|
+
"useExample": {
|
|
9128
|
+
"type": [
|
|
9129
|
+
"string"
|
|
9130
|
+
],
|
|
9131
|
+
"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.",
|
|
9132
|
+
"enum": [
|
|
9133
|
+
"request",
|
|
9134
|
+
"response",
|
|
9135
|
+
"both",
|
|
9136
|
+
"none"
|
|
9137
|
+
],
|
|
9138
|
+
"default": "none"
|
|
9139
|
+
},
|
|
9140
|
+
"exampleKey": {
|
|
9141
|
+
"type": "string",
|
|
9142
|
+
"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.",
|
|
9143
|
+
"default": ""
|
|
9144
|
+
},
|
|
9145
|
+
"headers": {
|
|
9146
|
+
"type": "object",
|
|
9147
|
+
"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.",
|
|
9148
|
+
"additionalProperties": {
|
|
9149
|
+
"type": "string"
|
|
9150
|
+
}
|
|
9151
|
+
}
|
|
9152
|
+
},
|
|
9153
|
+
"components": {
|
|
9154
|
+
"schemas": {
|
|
9155
|
+
"operationId": {
|
|
9156
|
+
"type": "string",
|
|
9157
|
+
"description": "ID of the operation to use for the request."
|
|
9158
|
+
},
|
|
9159
|
+
"descriptionPath": {
|
|
9160
|
+
"type": "string",
|
|
9161
|
+
"description": "URL or local path to the OpenAPI description."
|
|
9162
|
+
}
|
|
9163
|
+
}
|
|
9164
|
+
},
|
|
9165
|
+
"examples": [
|
|
9166
|
+
{
|
|
9167
|
+
"descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
|
|
9168
|
+
},
|
|
9169
|
+
{
|
|
9170
|
+
"name": "Reqres",
|
|
9171
|
+
"operationId": "getUserById"
|
|
9172
|
+
},
|
|
9173
|
+
{
|
|
9174
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9175
|
+
"operationId": "getUserById"
|
|
9176
|
+
},
|
|
9177
|
+
{
|
|
9178
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9179
|
+
"operationId": "createUser",
|
|
9180
|
+
"useExample": "both"
|
|
9181
|
+
},
|
|
9182
|
+
{
|
|
9183
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9184
|
+
"operationId": "createUser",
|
|
9185
|
+
"useExample": "both",
|
|
9186
|
+
"exampleKey": "example1"
|
|
9187
|
+
},
|
|
9188
|
+
{
|
|
9189
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9190
|
+
"operationId": "createUser",
|
|
9191
|
+
"useExample": "both",
|
|
9192
|
+
"exampleKey": "example1",
|
|
9193
|
+
"statusCode": 201
|
|
9194
|
+
},
|
|
9195
|
+
{
|
|
9196
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9197
|
+
"operationId": "createUser",
|
|
9198
|
+
"useExample": "both",
|
|
9199
|
+
"exampleKey": "example1",
|
|
9200
|
+
"statusCode": 201,
|
|
9201
|
+
"validateAgainstSchema": "none"
|
|
9202
|
+
},
|
|
9203
|
+
{
|
|
9204
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9205
|
+
"operationId": "createUser",
|
|
9206
|
+
"useExample": "both",
|
|
9207
|
+
"exampleKey": "example1",
|
|
9208
|
+
"statusCode": 201,
|
|
9209
|
+
"validateAgainstSchema": "none",
|
|
9210
|
+
"mockResponse": true
|
|
9211
|
+
},
|
|
9212
|
+
{
|
|
9213
|
+
"descriptionPath": "https://api.example.com/openapi.json",
|
|
9214
|
+
"operationId": "createUser",
|
|
9215
|
+
"useExample": "both",
|
|
9216
|
+
"exampleKey": "example1",
|
|
9217
|
+
"statusCode": 201,
|
|
9218
|
+
"validateAgainstSchema": "none",
|
|
9219
|
+
"mockResponse": true,
|
|
9220
|
+
"headers": {
|
|
9221
|
+
"Authorization": "Bearer 12345"
|
|
9222
|
+
}
|
|
9223
|
+
}
|
|
9224
|
+
]
|
|
9225
|
+
},
|
|
9226
|
+
{
|
|
9227
|
+
"type": "object",
|
|
9228
|
+
"not": {
|
|
9229
|
+
"required": [
|
|
9230
|
+
"operationId"
|
|
9231
|
+
]
|
|
9232
|
+
},
|
|
9233
|
+
"required": [
|
|
9234
|
+
"name",
|
|
9235
|
+
"descriptionPath"
|
|
9236
|
+
]
|
|
9237
|
+
}
|
|
9238
|
+
]
|
|
9239
|
+
}
|
|
9240
|
+
}
|
|
9241
|
+
}
|
|
9242
|
+
},
|
|
8850
9243
|
"examples": [
|
|
8851
9244
|
{
|
|
8852
9245
|
"steps": [
|