Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple esml won't parse #2

Open
TomKaltz opened this issue Jul 10, 2024 · 0 comments
Open

simple esml won't parse #2

TomKaltz opened this issue Jul 10, 2024 · 0 comments

Comments

@TomKaltz
Copy link

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" }
          }
        }
      }
    }
  }
}

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

No branches or pull requests

1 participant