chromium/tools/json_schema_compiler/test/callbacks.json

[
  {
    "namespace": "callbacks",
    "description": "The callbacks API. Tests asynchronous returns",
    "types": [
      {
        "id": "Enumeration",
        "type": "string",
        "enum": ["foo", "bar", "baz"]
      }
    ],
    "functions": [
      {
        "name": "returnsNothing",
        "type": "function",
        "description": "Takes nothing. Returns nothing.",
        "parameters": [],
        "returns_async": {
          "name": "callback",
          "parameters": []
        }
      },
      {
        "name": "returnsObject",
        "description": "Returns an object.",
        "type": "function",
        "parameters": [],
        "returns_async": {
          "name": "callback",
          "parameters": [
            {
              "name": "someObject",
              "type": "object",
              "properties": {
                "state": {
                  "$ref": "Enumeration"
                }
              }
            }
          ]
        }
      },
      {
        "name": "returnsMultiple",
        "description": "Returns an integer and an object.",
        "type": "function",
        "parameters": [],
        "returns_async": {
          "name": "callback",
          "does_not_support_promises": "Multi-parameter callback for test",
          "parameters": [
            {
              "name": "someInteger",
              "type": "integer"
            },
            {
              "name": "someObject",
              "type": "object",
              "properties": {
                "state": {
                  "$ref": "Enumeration"
                }
              }
            }
          ]
        }
      }
    ]
  }
]