From e2dc75ed19795da77dc4c127dce2ceed055c2a29 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Sat, 5 Oct 2024 14:05:02 +0300 Subject: [PATCH] test: add test for enum type checking --- .../wrong_enum_type/string_value.json | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 _testdata/negative/wrong_enum_type/string_value.json diff --git a/_testdata/negative/wrong_enum_type/string_value.json b/_testdata/negative/wrong_enum_type/string_value.json new file mode 100644 index 000000000..bda8f6139 --- /dev/null +++ b/_testdata/negative/wrong_enum_type/string_value.json @@ -0,0 +1,30 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "title", + "version": "v0.1.0" + }, + "paths": { + "/foo": { + "get": { + "responses": { + "200": { + "description": "User info", + "content": { + "application/json": { + "schema": { + "type": "integer", + "enum": [ + "1", + "2", + "3" + ] + } + } + } + } + } + } + } + } +}