{
    "anyOf": [
        {
            "$ref": "#/definitions/TestStruct"
        }
    ],
    "definitions": {
        "TestStruct": {
            "anyOf": [
                {
                    "additionalProperties": false,
                    "preferredOrder": [
                        "reqField",
                        "f1",
                        "f2"
                    ],
                    "properties": {
                        "f1": {
                            "description": "should be the first choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the first choice"
                        },
                        "f2": {
                            "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"
                        }
                    }
                },
                {
                    "additionalProperties": false,
                    "preferredOrder": [
                        "reqField",
                        "f1",
                        "f2",
                        "choice1"
                    ],
                    "properties": {
                        "choice1": {
                            "description": "should be the first choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the first choice"
                        },
                        "f1": {
                            "description": "should be the first choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the first choice"
                        },
                        "f2": {
                            "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"
                        }
                    }
                },
                {
                    "additionalProperties": false,
                    "preferredOrder": [
                        "reqField",
                        "f1",
                        "f2",
                        "choice2"
                    ],
                    "properties": {
                        "choice2": {
                            "description": "should be the second choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the second choice"
                        },
                        "f1": {
                            "description": "should be the first choice",
                            "type": "string",
                            "x-intellij-html-description": "should be the first choice"
                        },
                        "f2": {
                            "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"
}