{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/rc3-request/latest.json",
  "title": "rc3 request",
  "description": "RC request information",
  "x-lintel": {
    "source": "https://www.schemastore.org/rc3-request-0.0.3.json",
    "sourceSha256": "2a7fa836baed4fd2b7339f0178264cfce3b89a0d1cfcba162a8c5ae4aa2bd5bd",
    "fileMatch": [
      "**/*.request"
    ]
  },
  "type": "object",
  "properties": {
    "$schema": {
      "description": "The JSON schema to use for validation",
      "type": "string"
    },
    "comment": {
      "description": "A comment to provide documentation for this request",
      "type": "string"
    },
    "method": {
      "description": "The HTTP method to use for this request",
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE",
        "HEAD",
        "OPTIONS"
      ]
    },
    "url": {
      "description": "The URL to use for this request",
      "type": "string"
    },
    "params": {
      "$ref": "#/$defs/nvp",
      "description": "The query parameters to send with this request"
    },
    "form_data": {
      "$ref": "#/$defs/nvp",
      "description": "Form x-www-form-urlencoded data to pass in the request body"
    },
    "auth": {
      "$ref": "https://catalog.lintel.tools/schemas/schemastore/rc3-request/_shared/latest--rc3-auth-0.0.3.json"
    },
    "headers": {
      "$ref": "#/$defs/nvp",
      "description": "The HTTP headers to send with this request"
    },
    "body": {
      "description": "The body of the request",
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "json": {
          "type": "object"
        }
      },
      "additionalProperties": false
    },
    "save_responses": {
      "description": "Whether to save .response files in the same dir as the .request file",
      "type": "boolean"
    },
    "extract": {
      "description": "JSON node, or Text pattern (with regex group) to extract from response",
      "type": "object",
      "properties": {
        "json_path": {
          "description": "A JSON Path expression to extract a single field from JSON",
          "type": "string"
        },
        "text_pattern": {
          "description": "A Python regex pattern with a single REGEX GROUP to be extracted from the response",
          "type": "string"
        },
        "env": {
          "description": "Choose to store the extracted field in either the global env (default), or currently selected env from your collection",
          "type": "string",
          "enum": [
            "global",
            "current"
          ]
        },
        "var": {
          "description": "The var name (default is token) in the environment to store the extracted value in",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "$defs": {
    "nvp": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}
