{
  "properties": {
    "spec": {
      "properties": {
        "rewriteRules": {
          "description": "A list of Application Gateway rewrite rules",
          "items": {
            "properties": {
              "actions": {
                "description": "A list of Application Gateway rewrite rule actions",
                "properties": {
                  "requestHeaderConfigurations": {
                    "items": {
                      "properties": {
                        "actionType": {
                          "description": "actionType can be set or delete only",
                          "pattern": "^set$|^delete$",
                          "type": "string"
                        },
                        "headerName": {
                          "description": "Name of the header to be set or delete",
                          "type": "string"
                        },
                        "headerValue": {
                          "description": "Value of header to change to if a header is being set. Not needed if actionType is delete",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  },
                  "responseHeaderConfigurations": {
                    "items": {
                      "properties": {
                        "actionType": {
                          "description": "actionType can be set or delete only",
                          "pattern": "^set$|^delete$",
                          "type": "string"
                        },
                        "headerName": {
                          "description": "Name of the header to be set or delete",
                          "type": "string"
                        },
                        "headerValue": {
                          "description": "Value of header to change to if a header is being set. Not needed if actionType is delete",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  },
                  "urlConfiguration": {
                    "properties": {
                      "modifiedPath": {
                        "description": "Resultant path",
                        "type": "string"
                      },
                      "modifiedQueryString": {
                        "description": "Resultant query string",
                        "type": "string"
                      },
                      "reroute": {
                        "description": "Should App Gw reroute the request based on modified path",
                        "type": "boolean"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "conditions": {
                "description": "A list of Application Gateway rewrite rule conditions",
                "items": {
                  "properties": {
                    "ignoreCase": {
                      "description": "Case sensitivity of comparison",
                      "type": "boolean"
                    },
                    "negate": {
                      "description": "Negate the outcome of comparison",
                      "type": "boolean"
                    },
                    "pattern": {
                      "description": "pattern to compare to",
                      "type": "string"
                    },
                    "variable": {
                      "description": "Variable to compare",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "name": {
                "description": "Name of the Application Gateway rewrite rule",
                "type": "string"
              },
              "ruleSequence": {
                "description": "Sequence number (priority) of the Application Gateway rewrite rule",
                "type": "integer"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
