Skip to content

Conversation

@igalshilman
Copy link
Contributor

With this PR discovering our examples will yield the following:

{
  "protocolMode": "REQUEST_RESPONSE",
  "minProtocolVersion": 2,
  "maxProtocolVersion": 2,
  "services": [
    {
      "name": "greeter",
      "ty": "SERVICE",
      "handlers": [
        {
          "name": "greet",
          "input": {
            "required": false,
            "contentType": "application/json",
            "jsonSchema": {
              "type": "string"
            }
          },
          "output": {
            "contentType": "application/json",
            "setContentTypeIfEmpty": false,
            "jsonSchema": {
              "type": "string"
            }
          }
        }
      ]
    },
    {
      "name": "counter",
      "ty": "VIRTUAL_OBJECT",
      "handlers": [
        {
          "name": "increment",
          "ty": "EXCLUSIVE",
          "input": {
            "required": false,
            "contentType": "application/json",
            "jsonSchema": {
              "type": "integer"
            }
          },
          "output": {
            "contentType": "application/json",
            "setContentTypeIfEmpty": false,
            "jsonSchema": {
              "type": "integer"
            }
          }
        },
        {
          "name": "count",
          "ty": "SHARED",
          "input": {
            "required": false,
            "contentType": "application/json",
            "jsonSchema": true
          },
          "output": {
            "contentType": "application/json",
            "setContentTypeIfEmpty": false,
            "jsonSchema": {
              "type": "integer"
            }
          }
        }
      ]
    },
    {
      "name": "payment",
      "ty": "WORKFLOW",
      "handlers": [
        {
          "name": "pay",
          "ty": "WORKFLOW",
          "input": {
            "required": false,
            "contentType": "application/json",
            "jsonSchema": {
              "type": "integer"
            }
          },
          "output": {
            "contentType": "application/json",
            "setContentTypeIfEmpty": false,
            "jsonSchema": true
          }
        },
        {
          "name": "payment_verified",
          "ty": "SHARED",
          "input": {
            "required": false,
            "contentType": "application/json",
            "jsonSchema": {
              "type": "string"
            }
          },
          "output": {
            "contentType": "application/json",
            "setContentTypeIfEmpty": false,
            "jsonSchema": true
          }
        }
      ]
    },
    {
      "name": "pydantic_greeter",
      "ty": "SERVICE",
      "handlers": [
        {
          "name": "greet",
          "input": {
            "required": false,
            "contentType": "application/json",
            "jsonSchema": {
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "title": "GreetingRequest",
              "type": "object"
            }
          },
          "output": {
            "contentType": "application/json",
            "setContentTypeIfEmpty": false,
            "jsonSchema": {
              "properties": {
                "message": {
                  "title": "Message",
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "title": "Greeting",
              "type": "object"
            }
          }
        }
      ]
    }
  ]
}

@igalshilman igalshilman merged commit e8d8b8d into restatedev:main Oct 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant