diff --git a/validation_tags_to_schema.go b/validation_tags_to_schema.go index 778f140..8cccc8e 100644 --- a/validation_tags_to_schema.go +++ b/validation_tags_to_schema.go @@ -192,6 +192,8 @@ func ValidationTagsToSchema(validationTag string) (tagSchema Schema, required bo schema.Pattern = "^urn:[a-zA-Z0-9][a-zA-Z0-9-]{0,31}:([a-zA-Z0-9()+,\\-.:=@;$_!*'%/?#]|%[0-9a-fA-F]{2})+$" // Primitives + case "dive": + continue case "required": fieldRequired = true diff --git a/validation_tags_to_schema_test.go b/validation_tags_to_schema_test.go index 21d5cbc..f020b12 100644 --- a/validation_tags_to_schema_test.go +++ b/validation_tags_to_schema_test.go @@ -658,6 +658,11 @@ func TestValidateTagsToSchema(t *testing.T) { validateTag: "urn_rfc2141", expectedSchema: singleSchemaFromPattern("^urn:[a-zA-Z0-9][a-zA-Z0-9-]{0,31}:([a-zA-Z0-9()+,\\-.:=@;$_!*'%/?#]|%[0-9a-fA-F]{2})+$"), }, + { + name: "dive", + validateTag: "dive", + expectedSchema: allOfSchemas(), + }, { name: "required", validateTag: "required",