-
In the create event api, how do we provide "event type schema"? DOCS REDOC {
"description": "A user has signed up",
"schemas": {
"1": {
"title": "Invoice Paid Event",
"description": "An invoice was paid by a user",
"type": "object",
"properties": {
"invoiceId": {
"description": "The invoice id",
"type": "string"
},
"userId": {
"description": "The user id",
"type": "string"
}
},
"required": [
"invoiceId",
"userId"
]
}
},
"archived": false,
"name": "user.signup"
}
I would be happy to provide my use case if required & can help improve the docs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's just a standard draft 7 json schema. You can use the visual editor (like in the screenshot) or click on the code tab to see the corresponding generated code. So the answer to all of your questions is: check out json schema draft 7. :) Does this make sense? |
Beta Was this translation helpful? Give feedback.
It's just a standard draft 7 json schema. You can use the visual editor (like in the screenshot) or click on the code tab to see the corresponding generated code.
You fully control the schema to whatever you want, it's a definition of what the content of the event would be. For Svix it doesn't matter how you design your schema. It's up to you.
So the answer to all of your questions is: check out json schema draft 7. :)
Does this make sense?