{
    "anyOf": [
        {
            "$ref": "#/definitions/TestStruct"
        }
    ],
    "definitions": {
        "TestStruct": {
            "anyOf": [
                {
                    "additionalProperties": false,
                    "preferredOrder": [
                        "reqField"
                    ],
                    "properties": {
                        "reqField": {
                            "description": "should be required",
                            "type": "string",
                            "x-intellij-html-description": "should be required"
                        }
                    }
                },
                {
                    "additionalProperties": false,
                    "preferredOrder": [
                        "reqField",
                        "field1"
                    ],
                    "properties": {
                        "field1": {
                            "description": "should be the first choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the first choice"
                        },
                        "reqField": {
                            "description": "should be required",
                            "type": "string",
                            "x-intellij-html-description": "should be required"
                        }
                    }
                },
                {
                    "additionalProperties": false,
                    "preferredOrder": [
                        "reqField",
                        "field2"
                    ],
                    "properties": {
                        "field2": {
                            "description": "should be the second choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the second choice"
                        },
                        "reqField": {
                            "description": "should be required",
                            "type": "string",
                            "x-intellij-html-description": "should be required"
                        }
                    }
                }
            ],
            "description": "for testing the schema generator.",
            "required": [
                "reqField"
            ],
            "x-intellij-html-description": "for testing the schema generator."
        }
    },
    "type": "object"
}