hunk.code_window:                     for (final ApplicationPage page : pages) {
                           if (pageId.equals(page.getId())) {
                               foundPage = page;
                           }
                       }
                       //Set the order for the pages which has null values. At present we dont store the order and hence we need to update the values
                       for (int i = 1; i <= pages.size(); i++) {
                           ApplicationPage page = pages.get(i - 1);
                           if (page.getOrder() == null) {
                               page.setOrder(i);
                           }
                       }
                       /* there are two cases where page is re-ordered. Lets assume there are five pages 1,2,3,4,5
                        * Case 1(isMovingUp == true): p5 to p2, order of p2,p3,p4 increases by 1.
                        *
                        * Case 2(isMovingUp == false): p2 to p5, order of p3,p4,p5 decreases by 1.
  
hunk.labels: keep keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/services/ApplicationPageServiceImpl.java
hunk.type: replace
file: {
    "form": [
      {
        "sectionName": "General",
        "children": [
          {
            "label": "URL",
            "configProperty": "datasourceConfiguration.url",
            "controlType": "INPUT_TEXT",
            "isRequired": true,
            "placeholderText": "https://example.com"
          },
          {
            "label": "Headers",
            "configProperty": "datasourceConfiguration.headers",
            "controlType": "KEY_VAL_INPUT"
          },
          {
            "label": "Send Authentication Information Key (Do not edit)",
            "configProperty": "datasourceConfiguration.properties[0].key",
            "controlType": "INPUT_TEXT",
            "hidden": true,
            "initialValue": "isSendSessionEnabled"
          },
          {
            "label": "Send Appsmith signature header (X-APPSMITH-SIGNATURE)",
            "configProperty": "datasourceConfiguration.properties[0].value",
            "controlType": "DROP_DOWN",
            "isRequired": true,
            "initialValue": "N",
            "options": [
              {
                "label": "Yes",
                "value": "Y"
              },
              {
                "label": "No",
                "value": "N"
              }
            ]
          },
          {
            "label": "Session Details Signature Key Key (Do not edit)",
            "configProperty": "datasourceConfiguration.properties[1].key",
            "controlType": "INPUT_TEXT",
            "hidden": true,
            "initialValue": "sessionSignatureKey"
          },
          {
            "label": "Session Details Signature Key",
            "configProperty": "datasourceConfiguration.properties[1].value",
            "controlType": "INPUT_TEXT",
            "hidden": {
              "path": "datasourceConfiguration.properties[0].value",
              "comparison": "EQUALS",
              "value": "N"
            }
          },
          {
            "label": "Authentication Type",
            "configProperty": "datasourceConfiguration.authentication.authenticationType",
            "controlType": "DROP_DOWN",
            "options": [
              {
                "label": "None",
                "value": "dbAuth"
              },
              {
                "label": "Basic",
                "value": "basic"
              },
              {
                "label": "OAuth2 (Client credentials)",
                "value": "oAuth2"
              }
            ]
          },
          {
            "label": "Grant Type",
            "configProperty": "datasourceConfiguration.authentication.grantType",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": true
          },
          {
            "label": "Access Token URL",
            "configProperty": "datasourceConfiguration.authentication.accessTokenUrl",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          },
          {
            "label": "Client Id",
            "configProperty": "datasourceConfiguration.authentication.clientId",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          },
          {
            "label": "Client Secret",
            "configProperty": "datasourceConfiguration.authentication.clientSecret",
            "dataType": "PASSWORD",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          },
          {
            "label": "Scope(s)",
            "configProperty": "datasourceConfiguration.authentication.scopeString",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          },
          {
            "label": "Header Prefix",
            "configProperty": "datasourceConfiguration.authentication.headerPrefix",
            "controlType": "INPUT_TEXT",
            "placeholderText": "Bearer (default)",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          },
          {
            "label": "Add token to",
            "configProperty": "datasourceConfiguration.authentication.isTokenHeader",
            "controlType": "DROP_DOWN",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            },
            "options": [
              {
                "label": "Header",
                "value": true
              },
              {
                "label": "Query parameters",
                "value": false
              }
            ]
          },
          {
            "label": "Audience(s)",
            "configProperty": "datasourceConfiguration.authentication.audience",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          },
          {
            "label": "Resource(s)",
            "configProperty": "datasourceConfiguration.authentication.resource",
            "controlType": "INPUT_TEXT",
            "isRequired": false,
            "hidden": {
              "path": "datasourceConfiguration.authentication.authenticationType",
              "comparison": "NOT_EQUALS",
              "value": "oAuth2"
            }
          }
        ]
      }
    ]
  }
  