---
title: Format validation test
slug: format-validation-test
docTags: 
createdAt: 2026-04-17T07:48:39.600Z
---

{
  "id": "qoiHN6bsVv_NVHB2Choww",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.archbee.com/v2/validation/formats",
    "servers": [
      {
        "url": "https://api.archbee.com/v2/validation/formats",
        "description": "Production server"
      },
      {
        "url": "https://staging-api.archbee.com/v2/validation/formats",
        "description": "Staging server"
      },
      {
        "url": "https://{region}.api.archbee.com/{version}/validation/formats",
        "description": "Regional server with variables"
      }
    ],
    "name": "Format validation test",
    "description": "Tests all string and number format types supported by OpenAPI 3.0.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Tests all supported format types",
          "customType": "FormatTest",
          "schema": [
            {
              "name": "dateField",
              "kind": "optional",
              "type": "string<date>",
              "description": "Full date (YYYY-MM-DD)",
              "example": "2025-07-15",
              "format": "date"
            },
            {
              "name": "dateTimeField",
              "kind": "optional",
              "type": "string<date-time>",
              "description": "Date and time with timezone",
              "example": "2025-07-15T14:30:00Z",
              "format": "date-time"
            },
            {
              "name": "emailField",
              "kind": "optional",
              "type": "string<email>",
              "description": "Email address",
              "example": "test@example.com",
              "format": "email"
            },
            {
              "name": "uriField",
              "kind": "optional",
              "type": "string<uri>",
              "description": "Full URI",
              "example": "https://archbee.com/docs",
              "format": "uri"
            },
            {
              "name": "uuidField",
              "kind": "optional",
              "type": "string<uuid>",
              "description": "UUID v4",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid"
            },
            {
              "name": "passwordField",
              "kind": "optional",
              "type": "string<password>",
              "description": "Password (masked in UI)",
              "example": "s3cr3t!",
              "format": "password"
            },
            {
              "name": "byteField",
              "kind": "optional",
              "type": "string<byte>",
              "description": "Base64-encoded binary data",
              "example": "SGVsbG8gV29ybGQ=",
              "format": "byte"
            },
            {
              "name": "binaryField",
              "kind": "optional",
              "type": "string<binary>",
              "description": "Raw binary data",
              "example": "",
              "format": "binary"
            },
            {
              "name": "int32Field",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "32-bit signed integer",
              "example": 2147483647,
              "format": "int32"
            },
            {
              "name": "int64Field",
              "kind": "optional",
              "type": "integer<int64>",
              "description": "64-bit signed integer",
              "example": 9223372036854776000,
              "format": "int64"
            },
            {
              "name": "floatField",
              "kind": "optional",
              "type": "number<float>",
              "description": "Single-precision floating point",
              "example": 3.14,
              "format": "float"
            },
            {
              "name": "doubleField",
              "kind": "optional",
              "type": "number<double>",
              "description": "Double-precision floating point",
              "example": 3.141592653589793,
              "format": "double"
            }
          ],
          "modelRef": "#/components/schemas/FormatTest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>HTTP Bearer token authentication (JWT)</p>",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "All formats valid",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "valid",
                "kind": "optional",
                "type": "boolean",
                "description": "",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable entity — validation failed",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"VALIDATION_ERROR\",\"message\":\"The request body failed validation\",\"details\":[{\"field\":\"price\",\"message\":\"must be greater than 0\",\"code\":\"INVALID_VALUE\"},{\"field\":\"name\",\"message\":\"must be between 1 and 200 characters\",\"code\":\"INVALID_LENGTH\"}]}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "JSashlIpAN1Ooeeeht3K4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.archbee.com/v2/validation/formats \\\n     --header 'accept: application/json'"
        },
        {
          "id": "kzAyiuCuvM1l1bbFTyhXc",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/v2/validation/formats\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vLarG1HBqcsAb3c9P3WqX",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/v2/validation/formats\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "qJUdqVHynRsOJXUHYVPW_",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/v2/validation/formats\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "JSashlIpAN1Ooeeeht3K4"
    },
    "results": {
      "languages": [
        {
          "id": "Eh02a2Njti_7p2z6qeEla",
          "language": "200",
          "code": "// All formats valid\n{\n  \"valid\": false\n}"
        },
        {
          "id": "DoNvqrfQ5YGLMpydoPN74",
          "language": "422",
          "code": "// Unprocessable entity — validation failed\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "Eh02a2Njti_7p2z6qeEla"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}