@@ -3665,6 +3665,48 @@ TEST(AlterSchema_lint_2020_12, required_properties_in_properties_15) {
36653665 EXPECT_EQ (document, expected);
36663666}
36673667
3668+ TEST (AlterSchema_lint_2020_12, required_properties_in_properties_16) {
3669+ sourcemeta::core::JSON document = sourcemeta::core::parse_json (R"JSON( {
3670+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3671+ "required": [ "foo", "bar" ],
3672+ "additionalProperties": false
3673+ })JSON" );
3674+
3675+ LINT_AND_FIX_FOR_READABILITY_STRICT (document);
3676+
3677+ const sourcemeta::core::JSON expected = sourcemeta::core::parse_json (R"JSON( {
3678+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3679+ "required": [ "foo", "bar" ],
3680+ "additionalProperties": false
3681+ })JSON" );
3682+
3683+ EXPECT_EQ (document, expected);
3684+ }
3685+
3686+ TEST (AlterSchema_lint_2020_12, required_properties_in_properties_17) {
3687+ sourcemeta::core::JSON document = sourcemeta::core::parse_json (R"JSON( {
3688+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3689+ "required": [ "foo", "bar" ],
3690+ "additionalProperties": false,
3691+ "properties": {
3692+ "foo": true
3693+ }
3694+ })JSON" );
3695+
3696+ LINT_AND_FIX_FOR_READABILITY_STRICT (document);
3697+
3698+ const sourcemeta::core::JSON expected = sourcemeta::core::parse_json (R"JSON( {
3699+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3700+ "required": [ "foo", "bar" ],
3701+ "additionalProperties": false,
3702+ "properties": {
3703+ "foo": true
3704+ }
3705+ })JSON" );
3706+
3707+ EXPECT_EQ (document, expected);
3708+ }
3709+
36683710TEST (AlterSchema_lint_2020_12, unknown_keywords_prefix_1) {
36693711 sourcemeta::core::JSON document = sourcemeta::core::parse_json (R"JSON( {
36703712 "$schema": "https://json-schema.org/draft/2020-12/schema",
0 commit comments