diff --git a/tests/schema/__snapshots__/test_schema.ambr b/tests/schema/__snapshots__/test_schema.ambr index 99d1c28b5..7eba0b855 100644 --- a/tests/schema/__snapshots__/test_schema.ambr +++ b/tests/schema/__snapshots__/test_schema.ambr @@ -2861,6 +2861,16 @@ }), }) # --- +# name: test_schemas[schema/fixtures/extra_options-no_schema_with_empty_string_field] + '' +# --- +# name: test_schemas[schema/fixtures/extra_options-no_schema_with_empty_string_field].1 + dict({ + 'validated_needs_count': 1, + 'validation_warnings': dict({ + }), + }) +# --- # name: test_schemas[schema/fixtures/extra_options-number_multiple_of] '' # --- @@ -3001,6 +3011,16 @@ }), }) # --- +# name: test_schemas[schema/fixtures/extra_options-schema_with_null_field] + '' +# --- +# name: test_schemas[schema/fixtures/extra_options-schema_with_null_field].1 + dict({ + 'validated_needs_count': 1, + 'validation_warnings': dict({ + }), + }) +# --- # name: test_schemas[schema/fixtures/extra_options-set_type_string] '' # --- diff --git a/tests/schema/fixtures/extra_options.yml b/tests/schema/fixtures/extra_options.yml index e085e2ca7..eed1a5b6f 100644 --- a/tests/schema/fixtures/extra_options.yml +++ b/tests/schema/fixtures/extra_options.yml @@ -203,6 +203,49 @@ auto_inject_type_wrong_const: asil: const: QM +schema_with_null_field: + conf: | + extensions = ["sphinx_needs"] + needs_from_toml = "ubproject.toml" + ubproject: | + [needs] + schema_definitions_from_json = "schemas.json" + [[needs.extra_options]] + name = "asil" + schema.type = "string" + rst: | + .. impl:: title + :id: IMPL_1 + schemas: + $defs: [] + schemas: + - validate: + local: + properties: + asil: + const: QM + +no_schema_with_empty_string_field: + conf: | + extensions = ["sphinx_needs"] + needs_from_toml = "ubproject.toml" + ubproject: | + [needs] + schema_definitions_from_json = "schemas.json" + [[needs.extra_options]] + name = "asil" + rst: | + .. impl:: title + :id: IMPL_1 + schemas: + $defs: [] + schemas: + - validate: + local: + properties: + asil: + const: QM + required_based_on_select_field_missing: conf: | extensions = ["sphinx_needs"]