diff --git a/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_0_openapi_yaml__validate b/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_0_openapi_yaml__validate new file mode 100644 index 000000000..4df9de8a7 --- /dev/null +++ b/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_0_openapi_yaml__validate @@ -0,0 +1,9 @@ +invalid paths: invalid path /projects/{projectId}/images/tagged/count: invalid operation GET: example Successful GetTaggedImageCount request: value must be an integer +Schema: + { + "format": "int32", + "type": "integer" + } + +Value: + "10" diff --git a/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_1_openapi_yaml__validate b/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_1_openapi_yaml__validate new file mode 100644 index 000000000..028a2ecb1 --- /dev/null +++ b/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_1_openapi_yaml__validate @@ -0,0 +1,17 @@ +invalid paths: invalid path /projects/{projectId}/images/suggested: invalid operation POST: example Successful QuerySuggestedImages request: Error at "/token/sortBy": value is not one of the allowed values ["UncertaintyAscending","UncertaintyDescending"] +Schema: + { + "description": "OrderBy. Ordering mechanism for your results.", + "enum": [ + "UncertaintyAscending", + "UncertaintyDescending" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "SortBy" + } + } + +Value: + "Newest" diff --git a/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_2_openapi_yaml__validate b/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_2_openapi_yaml__validate new file mode 100644 index 000000000..028a2ecb1 --- /dev/null +++ b/openapi3/testdata/apis_guru_openapi_directory/microsoft_com_cognitiveservices_Training_3_2_openapi_yaml__validate @@ -0,0 +1,17 @@ +invalid paths: invalid path /projects/{projectId}/images/suggested: invalid operation POST: example Successful QuerySuggestedImages request: Error at "/token/sortBy": value is not one of the allowed values ["UncertaintyAscending","UncertaintyDescending"] +Schema: + { + "description": "OrderBy. Ordering mechanism for your results.", + "enum": [ + "UncertaintyAscending", + "UncertaintyDescending" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "SortBy" + } + } + +Value: + "Newest" diff --git a/openapi3/testdata/apis_guru_openapi_directory/mist_com_0_37_7_openapi_yaml__validate b/openapi3/testdata/apis_guru_openapi_directory/mist_com_0_37_7_openapi_yaml__validate new file mode 100644 index 000000000..4aae04ff9 --- /dev/null +++ b/openapi3/testdata/apis_guru_openapi_directory/mist_com_0_37_7_openapi_yaml__validate @@ -0,0 +1 @@ +invalid paths: invalid path /api/v1/sites/{site_id}/devices/{device_id}: invalid operation PUT: invalid example: input matches more than one oneOf schemas diff --git a/openapi3/testdata/apis_guru_openapi_directory/ndhm_gov_in_ndhm_cm_0_5_openapi_yaml__validate b/openapi3/testdata/apis_guru_openapi_directory/ndhm_gov_in_ndhm_cm_0_5_openapi_yaml__validate new file mode 100644 index 000000000..98995445e --- /dev/null +++ b/openapi3/testdata/apis_guru_openapi_directory/ndhm_gov_in_ndhm_cm_0_5_openapi_yaml__validate @@ -0,0 +1,9 @@ +invalid components: schema "HealthInformationNotification": invalid example: value must be a string +Schema: + { + "example": 100005, + "type": "string" + } + +Value: + 100005 diff --git a/openapi3/testdata/apis_guru_openapi_directory/nexmo_com_voice_1_3_10_openapi_yaml__validate b/openapi3/testdata/apis_guru_openapi_directory/nexmo_com_voice_1_3_10_openapi_yaml__validate new file mode 100644 index 000000000..9840f7044 --- /dev/null +++ b/openapi3/testdata/apis_guru_openapi_directory/nexmo_com_voice_1_3_10_openapi_yaml__validate @@ -0,0 +1,10 @@ +invalid components: schema "DTMFRequest": invalid example: value must be a string +Schema: + { + "description": "The digits to send", + "example": 1713, + "type": "string" + } + +Value: + 1713 diff --git a/openapi3/v3_apis_guru_openapi_directory_test.go b/openapi3/v3_apis_guru_openapi_directory_test.go index 85fb6071f..d26401a95 100644 --- a/openapi3/v3_apis_guru_openapi_directory_test.go +++ b/openapi3/v3_apis_guru_openapi_directory_test.go @@ -189,18 +189,9 @@ func TestV3ApisGuruOpenapiDirectory(t *testing.T) { func disabled(shortName string) bool { switch shortName { case "vvv keep these", - "flat_io_2_13_0_openapi_yaml", // TODO: flaky - "microsoft_com_cognitiveservices_Prediction_3_0_openapi_yaml", // TODO: flaky - "microsoft_com_cognitiveservices_Training_3_0_openapi_yaml", // TODO: flaky - "microsoft_com_cognitiveservices_Training_3_1_openapi_yaml", // TODO: flaky - "microsoft_com_cognitiveservices_Training_3_2_openapi_yaml", // TODO: flaky - "mist_com_0_37_7_openapi_yaml", // TODO: flaky - "ndhm_gov_in_ndhm_cm_0_5_openapi_yaml", // TODO: flaky - "nexmo_com_voice_1_3_10_openapi_yaml", // TODO: flaky - "nordigen_com_2_0__v2__openapi_yaml", // TODO: YAML dates in map keys https://github.com/invopop/yaml/issues/10 - "optimade_local_1_1_0_develop_openapi_yaml", // TODO: flaky - "unicourt_com_1_0_0_openapi_yaml", // TODO: YAML dates in map keys https://github.com/invopop/yaml/issues/10 - "zuora_com_2021_08_20_openapi_yaml", // TODO: YAML dates in map keys https://github.com/invopop/yaml/issues/10 + "nordigen_com_2_0__v2__openapi_yaml", // TODO: YAML dates in map keys https://github.com/invopop/yaml/issues/10 + "unicourt_com_1_0_0_openapi_yaml", // TODO: YAML dates in map keys https://github.com/invopop/yaml/issues/10 + "zuora_com_2021_08_20_openapi_yaml", // TODO: YAML dates in map keys https://github.com/invopop/yaml/issues/10 "^^^ lines sorted": return true }