@@ -163,6 +163,29 @@ unevaluated_error_extra_with_schema_given_in_rst_no_constraint:
163163 properties : {"asil": {}}
164164 unevaluatedProperties : false
165165
166+ unevaluated_error_extra_with_default :
167+ # should complain, the comment field is set via default, and it will appear in the
168+ # unevaluatedProperties evaluation as forbidden additional field
169+ conf : |
170+ extensions = ["sphinx_needs"]
171+ needs_from_toml = "ubproject.toml"
172+ needs_schema_definitions_from_json = "schemas.json"
173+ ubproject : |
174+ [needs.fields.asil]
175+ [needs.fields.comment]
176+ schema.type = "string"
177+ default = "default"
178+ rst : |
179+ .. impl:: title
180+ :id: IMPL_1
181+ :asil: QM
182+ schemas :
183+ schemas :
184+ - validate :
185+ local :
186+ properties : {"asil": {}}
187+ unevaluatedProperties : false
188+
166189unevaluated_error_allof :
167190 # check whether unevaluatedProperties implementation applies to combined schemas (allOf)
168191 # should complain about "approved" given as additional field, but not for comment or asil
@@ -262,7 +285,7 @@ unevaluated_core_status_set_not_in_schema:
262285 properties : {"asil": {}}
263286 unevaluatedProperties : false
264287
265- unevaluated_core_field_in_schema_and_invalid :
288+ unevaluated_core_status_in_schema_and_invalid :
266289 # should complain about status, because it is part of the user schema and actively set,
267290 # therefore it must be kept in the reduced need and validated
268291 conf : |
@@ -283,6 +306,28 @@ unevaluated_core_field_in_schema_and_invalid:
283306 properties : {"asil": {}, "status": {"enum": ["CLOSED"]}}
284307 unevaluatedProperties : false
285308
309+ unevaluated_error_core_status_with_default :
310+ # should complain, the status field has a default, and it will appear in the
311+ # unevaluatedProperties evaluation as forbidden additional field
312+ conf : |
313+ extensions = ["sphinx_needs"]
314+ needs_from_toml = "ubproject.toml"
315+ needs_schema_definitions_from_json = "schemas.json"
316+ ubproject : |
317+ [needs.fields.asil]
318+ [needs.fields.status]
319+ default = "default"
320+ rst : |
321+ .. impl:: title
322+ :id: IMPL_1
323+ :asil: QM
324+ schemas :
325+ schemas :
326+ - validate :
327+ local :
328+ properties : {"asil": {}}
329+ unevaluatedProperties : false
330+
286331unevaluated_core_tags_set_not_in_schema :
287332 # should complain, because the core field tags is treated like an extra field,
288333 # so it is kept when explicitly set and triggers unevaluatedProperties.
@@ -329,6 +374,28 @@ unevaluated_core_tags_in_schema_and_invalid:
329374 items : {type: string, enum: ["tag_b"]}
330375 unevaluatedProperties : false
331376
377+ unevaluated_error_core_tags_with_default :
378+ # should complain, the tags field has a default, and it will appear in the
379+ # unevaluatedProperties evaluation as forbidden additional field
380+ conf : |
381+ extensions = ["sphinx_needs"]
382+ needs_from_toml = "ubproject.toml"
383+ needs_schema_definitions_from_json = "schemas.json"
384+ ubproject : |
385+ [needs.fields.asil]
386+ [needs.fields.tags]
387+ default = ["default"]
388+ rst : |
389+ .. impl:: title
390+ :id: IMPL_1
391+ :asil: QM
392+ schemas :
393+ schemas :
394+ - validate :
395+ local :
396+ properties : {"asil": {}}
397+ unevaluatedProperties : false
398+
332399unevaluated_core_docname_in_schema_and_invalid :
333400 # should complain about docname, because it is part of the user schema,
334401 # therefore it is kept in the reduced need and validated
0 commit comments