content: {
    "$defs": {
      "ChildOneOf": {
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "child1",
              "child4"
            ],
            "title": "group1"
          },
          {
            "required": [
              "child2",
              "child3"
            ],
            "title": "group2"
          }
        ],
        "properties": {
          "child1": {
            "type": "string"
          },
          "child2": {
            "type": "string"
          },
          "child3": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array"
              }
            ]
          },
          "child4": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RootOneOf": {
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "field1",
              "field4"
            ],
            "title": "group1"
          },
          {
            "required": [
              "field2"
            ],
            "title": "group2"
          }
        ],
        "properties": {
          "child": {
            "$ref": "#/$defs/ChildOneOf"
          },
          "field1": {
            "type": "string"
          },
          "field2": {
            "type": "string"
          },
          "field3": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array"
              }
            ]
          },
          "field4": {
            "type": "string"
          },
          "field6": {
            "oneOf": [
              {
                "$ref": "Outer"
              },
              {
                "$ref": "OuterNamed"
              },
              {
                "$ref": "OuterPtr"
              }
            ]
          }
        },
        "type": "object"
      }
    },
    "$id": "https://github.com/invopop/jsonschema/root-one-of",
    "$ref": "#/$defs/RootOneOf",
    "$schema": "https://json-schema.org/draft/2020-12/schema"
  }