diff --git a/internal/resources/tests/web-api-practice_test.go b/internal/resources/tests/web-api-practice_test.go index 564dfa6..a584f99 100644 --- a/internal/resources/tests/web-api-practice_test.go +++ b/internal/resources/tests/web-api-practice_test.go @@ -236,6 +236,11 @@ resource "inext_web_api_practice" %[1]q { illegal_http_methods = false } } + schema_validation { + name = "" + data = "" + size = 0 + is_file_exist = false } `, name) } @@ -265,8 +270,8 @@ resource "inext_web_api_practice" %[1]q { schema_validation { name = %[2]q data = %[3]q - size = 0 - is_file_exist = false + size = 1 + is_file_exist = true } } `, name, filename, data) diff --git a/internal/resources/web-api-practice/create.go b/internal/resources/web-api-practice/create.go index 1ee4e3b..173782a 100644 --- a/internal/resources/web-api-practice/create.go +++ b/internal/resources/web-api-practice/create.go @@ -159,6 +159,8 @@ func mapToSchemaValidationInput(schemaValidationMap map[string]any) models.Schem ret.ID = id.(string) } + fmt.Printf("schemaValidationMap: %+v\n", schemaValidationMap) + ret.OASSchema = schemaValidationMap["OasSchema"].(string) return ret