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

event types: add x-svix-feature-flags to OAS import docs #169

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion docs/event-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ Here's an example of how a `pet.new` event type should look like in your OpenAPI
"pet.new": {
"post": {
"operationId": "pet.new",
"description": "...",
"description": "A new pet has been added",
"requestBody": {
"content": {
"application/json": {
Expand All @@ -517,6 +517,23 @@ Here's an example of how a `pet.new` event type should look like in your OpenAPI
}
```

You can also add the `x-svix-feature-flag` and `x-svix-group-name` fields to set the [feature flag](#event-type-feature-flags) and group name on the event type.
```json
"webhooks": {
"pet.new": {
"post": {
"operationId": "pet.new",
"x-svix-feature-flag": "beta-feature-a",
"x-svix-group-name": "group-name-1",
"requestBody": {
...
}
}
}
}
```


#### Using the API

The API includes an endpoint which helps keep your [event-types in sync with a JSON OpenAPI Spec](https://api.svix.com/docs#tag/Event-Type/operation/v1.event-type.import-openapi).
Expand Down