Skip to content

simple esml won't parse #2

@TomKaltz

Description

@TomKaltz

The eventually-express server for my service won't render the SVG. I tried to input the below esml into this project's playground and it errors with "MyService.RawWebhookLogged: Invalid input". Using the debugger I see that A LOT of zod union parse errors have been thrown.

{
  "MyService": {
    "WebhookIngestSystem": {
      "type": "system",
      "handles": ["LogWebhook"],
      "emits": ["RawWebhookLogged"]
    },
    "RawWebhookLogged": {
      "type": "event",
      "schema": {
        "requires": {
          "raw": {
            "_def": {
              "innerType": {
                "_def": {
                  "checks": [],
                  "typeName": "ZodString",
                  "coerce": false
                }
              },
              "typeName": "ZodOptional"
            }
          },
          "webhookKey": {
            "_def": {
              "checks": [{ "kind": "min", "value": 4 }],
              "typeName": "ZodString",
              "coerce": false
            }
          },
          "timeWebhookArrived": {
            "_def": { "checks": [], "coerce": true, "typeName": "ZodDate" }
          }
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions