-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
Chore - Properly generate Emily client
1. Description
We generate Emily client based on headers over handlers, which look like this:
#[utoipa::path(
post,
operation_id = "newBlock",
path = "/new_block",
tag = "new_block",
request_body = NewBlockEventRaw,
responses(
(status = 200, description = "New Block event received successfully"),
(status = 400, description = "Invalid request body", body = ErrorResponse),
(status = 404, description = "Address not found", body = ErrorResponse),
(status = 405, description = "Method not allowed", body = ErrorResponse),
(status = 500, description = "Internal server error", body = ErrorResponse)
),
security(("ApiGatewayKey" = []))
)]
#[instrument(skip_all, name = "new-block")]However, this headers are handwritten, and does not depend on actual Emily endpoints structure (which is defined in routes. This can lead to a confusion, where client generated from this headers expect one endpoints structure, while actual endpoints structure (defined in routes) is different. Ideally, we should generate both endpoints structure on client and on Emily itself based on single description, or, at least, add a check that verifies that everything is synced
2. Why It's Necessary
3. Execution Checklist
- TASK_1
- TASK_2
Reactions are currently unavailable