Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 0 additions & 24 deletions server/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7037,30 +7037,6 @@
]
}
},
"/api/v1/event-type/schema/generate-example": {
"post": {
"description": "Generates a fake example from the given JSONSchema",
"parameters": [
{
"description": "The request's idempotency key",
"in": "header",
"name": "idempotency-key",
"schema": {
"type": "string"
},
"style": "simple"
}
],
"responses": {
"204": {
"description": "no content"
}
},
"tags": [
"Event Type"
]
}
},
"/api/v1/event-type/{event_type_name}": {
"delete": {
"description": "Archive an event type.\n\nEndpoints already configured to filter on an event type will continue to do so after archival.\nHowever, new messages can not be sent with it and endpoints can not filter on it.\nAn event type can be unarchived with the\n[create operation](#operation/create_event_type_api_v1_event_type__post).",
Expand Down
14 changes: 1 addition & 13 deletions server/svix-server/src/v1/endpoints/event_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{
db::models::eventtype,
error::{http_error_on_conflict, HttpError, Result},
v1::utils::{
api_not_implemented, apply_pagination, openapi_desc, openapi_tag,
apply_pagination, openapi_tag,
patch::{
patch_field_non_nullable, patch_field_nullable, UnrequiredField,
UnrequiredNullableField,
Expand Down Expand Up @@ -441,9 +441,6 @@ async fn delete_event_type(
Ok(NoContent)
}

const GENERATE_SCHEMA_EXAMPLE_DESCRIPTION: &str =
"Generates a fake example from the given JSONSchema";

pub fn router() -> ApiRouter<AppState> {
let tag = openapi_tag("Event Type");
ApiRouter::new()
Expand All @@ -461,19 +458,10 @@ pub fn router() -> ApiRouter<AppState> {
.delete_with(delete_event_type, delete_event_type_operation),
&tag,
)
.api_route_with(
"/event-type/schema/generate-example",
post_with(
api_not_implemented,
openapi_desc(GENERATE_SCHEMA_EXAMPLE_DESCRIPTION),
),
tag,
)
}

#[cfg(test)]
mod tests {

use serde_json::json;

use super::ListFetchQueryParams;
Expand Down
Loading