Edge cases

Sparse, nested, null, unicode, and larger payload cases. Load a template into the create form, then adjust the response before creating an endpoint.

200application/jsonGET

Null and sparse fields

Test rendering when optional values are null or missing.

Use template
View payload and cURL

Headers

none

Body

{
  "id": "case_sparse",
  "display_name": null,
  "metadata": {},
  "items": [
    null,
    {
      "id": "item_1"
    },
    {}
  ]
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"id\": \"case_sparse\",\n  \"display_name\": null,\n  \"metadata\": {},\n  \"items\": [null, {\"id\": \"item_1\"}, {}]\n}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200application/jsonGET

Unicode text

Check multilingual text and emoji in a JSON response.

Use template
View payload and cURL

Headers

none

Body

{
  "message": "Cafe deja vu - hello, こんにちは, مرحبا, 👋"
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\"message\":\"Cafe deja vu - hello, こんにちは, مرحبا, 👋\"}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200application/jsonGET

Deeply nested object

Test path access and defensive rendering with nested JSON.

Use template
View payload and cURL

Headers

none

Body

{
  "level1": {
    "level2": {
      "level3": {
        "value": "found"
      }
    }
  }
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"level1\": {\n    \"level2\": {\n      \"level3\": {\n        \"value\": \"found\"\n      }\n    }\n  }\n}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200application/jsonGET

Type mismatches

Catch clients that assume IDs, booleans, or counts use one type.

Use template
View payload and cURL

Headers

none

Body

{
  "id": 123,
  "active": "yes",
  "count": "7",
  "tags": "alpha,beta"
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"id\": 123,\n  \"active\": \"yes\",\n  \"count\": \"7\",\n  \"tags\": \"alpha,beta\"\n}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200application/jsonGET

Empty string values

Check forms and detail pages with blank-but-present values.

Use template
View payload and cURL

Headers

none

Body

{
  "title": "",
  "description": "",
  "items": [
    {
      "name": "",
      "note": "present but blank"
    }
  ]
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"title\": \"\",\n  \"description\": \"\",\n  \"items\": [{\"name\": \"\", \"note\": \"present but blank\"}]\n}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
200application/jsonGET

Mixed array

Test clients that need to handle mixed array values.

Use template
View payload and cURL

Headers

none

Body

[
  "alpha",
  42,
  {
    "nested": true
  },
  false,
  null,
  [
    "inner"
  ]
]

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "[\"alpha\",42,{\"nested\":true},false,null,[\"inner\"]]",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'

Other recipe shelves