You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/main/validation.feature
-67
Original file line number
Diff line number
Diff line change
@@ -87,74 +87,7 @@ Feature: Using validations groups
87
87
And the JSON node "detail" should be equal to "test: This value should not be null."
88
88
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
89
89
90
-
@!mongodb
91
90
@createSchema
92
-
Scenario: Create a resource with collectDenormalizationErrors
93
-
When I add "Content-type" header equal to "application/ld+json"
94
-
And I send a "POST" request to "/dummy_collect_denormalization" with body:
95
-
"""
96
-
{
97
-
"foo": 3,
98
-
"bar": "baz",
99
-
"qux": true,
100
-
"uuid": "y",
101
-
"relatedDummy": 8,
102
-
"relatedDummies": 76
103
-
}
104
-
"""
105
-
Then the response status code should be 422
106
-
And the response should be in JSON
107
-
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
108
-
And the JSON should be a superset of:
109
-
"""
110
-
{
111
-
"@context": "/contexts/ConstraintViolation",
112
-
"@type": "ConstraintViolation",
113
-
"hydra:title": "An error occurred",
114
-
"hydra:description": "baz: This value should be of type string.\nqux: This value should be of type string.\nfoo: This value should be of type bool.\nbar: This value should be of type int.\nuuid: This value should be of type uuid.\nrelatedDummy: This value should be of type array|string.\nrelatedDummies: This value should be of type array.",
115
-
"violations": [
116
-
{
117
-
"propertyPath": "baz",
118
-
"message": "This value should be of type string.",
119
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40",
120
-
"hint": "Failed to create object because the class misses the \"baz\" property."
121
-
},
122
-
{
123
-
"propertyPath": "qux",
124
-
"message": "This value should be of type string.",
125
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40"
126
-
},
127
-
{
128
-
"propertyPath": "foo",
129
-
"message": "This value should be of type bool.",
130
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40"
131
-
},
132
-
{
133
-
"propertyPath": "bar",
134
-
"message": "This value should be of type int.",
135
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40"
136
-
},
137
-
{
138
-
"propertyPath": "uuid",
139
-
"message": "This value should be of type uuid.",
140
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40",
141
-
"hint": "Invalid UUID string: y"
142
-
},
143
-
{
144
-
"propertyPath": "relatedDummy",
145
-
"message": "This value should be of type array|string.",
146
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40",
147
-
"hint": "The type of the \"relatedDummy\" attribute must be \"array\" (nested document) or \"string\" (IRI), \"integer\" given."
148
-
},
149
-
{
150
-
"propertyPath": "relatedDummies",
151
-
"message": "This value should be of type array.",
152
-
"code": "ba785a8c-82cb-4283-967c-3cf342181b40"
153
-
}
154
-
]
155
-
}
156
-
"""
157
-
158
91
@!mongodb
159
92
Scenario: Get violations constraints
160
93
When I add "Accept" header equal to "application/json"
0 commit comments