Skip to content

Commit

Permalink
docs: update TR-Dataset and TR-Organization to be uuid::Uuid everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
cdxker authored and densumesh committed Oct 8, 2024
1 parent f60a300 commit 2345823
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 80 deletions.
20 changes: 10 additions & 10 deletions server/src/handlers/analytics_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use utoipa::ToSchema;
(status = 400, description = "Service error relating to getting cluster analytics", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -88,7 +88,7 @@ pub struct RateQueryRequest {
(status = 400, description = "Service error relating to rating a search query", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -126,7 +126,7 @@ pub async fn set_search_query_rating(
(status = 400, description = "Service error relating to rating a RAG query", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -164,7 +164,7 @@ pub async fn set_rag_query_rating(
(status = 400, description = "Service error relating to getting search analytics", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -321,7 +321,7 @@ pub async fn get_search_analytics(
(status = 400, description = "Service error relating to getting RAG analytics", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -407,7 +407,7 @@ pub async fn get_rag_analytics(
(status = 400, description = "Service error relating to getting recommendation analytics", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -499,7 +499,7 @@ pub struct CTRDataRequestBody {
(status = 400, description = "Service error relating to sending CTR data", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -536,7 +536,7 @@ pub async fn send_ctr_data(
(status = 400, description = "Service error relating to sending event data", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -572,7 +572,7 @@ pub async fn send_event_data(
(status = 400, description = "Service error relating to getting CTR analytics", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -704,7 +704,7 @@ pub struct GetTopDatasetsRequestBody {
tag = "Analytics",
request_body(content = GetTopDatasetsRequestBody, description = "JSON request payload to filter the top datasets", content_type = "application/json"),
params(
("TR-Organization" = String, Header, description = "The organization id to use for the request"),
("TR-Organization" = uuid::Uuid, Header, description = "The organization id to use for the request"),
),
responses(
(status = 200, description = "The top datasets for the request", body = Vec<TopDatasetsResponse>),
Expand Down
30 changes: 15 additions & 15 deletions server/src/handlers/chunk_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub enum CreateChunkReqPayloadEnum {
(status = 400, description = "Error typically due to deserialization issues", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -446,7 +446,7 @@ pub async fn create_chunk(
(status = 400, description = "Service error relating to finding a chunk by tracking_id", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("chunk_id" = Option<uuid::Uuid>, Path, description = "Id of the chunk you want to fetch."),
),
security(
Expand Down Expand Up @@ -492,7 +492,7 @@ pub async fn delete_chunk(
(status = 400, description = "Service error relating to finding a chunk by tracking_id", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("tracking_id" = Option<String>, Path, description = "tracking_id of the chunk you want to delete"),
),
security(
Expand Down Expand Up @@ -599,7 +599,7 @@ pub struct UpdateIngestionMessage {
(status = 400, description = "Service error relating to to updating chunk, likely due to conflicting tracking_id", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -766,7 +766,7 @@ pub struct UpdateChunkByTrackingIdData {
(status = 400, description = "Service error relating to to updating chunk", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["admin"]),
Expand Down Expand Up @@ -1148,7 +1148,7 @@ pub fn parse_query(
(status = 400, description = "Service error relating to searching", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.")
),
security(
Expand Down Expand Up @@ -1394,7 +1394,7 @@ impl From<AutocompleteReqPayload> for SearchChunksReqPayload {
(status = 400, description = "Service error relating to searching", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.")
),
security(
Expand Down Expand Up @@ -1521,7 +1521,7 @@ pub struct ScrollChunksReqPayload {
(status = 400, description = "Service error relating to scrolling chunks", body = ErrorResponseBody)
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["readonly"]),
Expand Down Expand Up @@ -1597,7 +1597,7 @@ pub async fn scroll_dataset_chunks(
(status = 404, description = "Chunk not found", body = ErrorResponseBody)
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise."),
("chunk_id" = Option<uuid::Uuid>, Path, description = "Id of the chunk you want to fetch."),
),
Expand Down Expand Up @@ -1697,7 +1697,7 @@ pub struct CountChunkQueryResponseBody {
(status = 404, description = "Failed to count chunks", body = ErrorResponseBody)
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["readonly"]),
Expand Down Expand Up @@ -1782,7 +1782,7 @@ pub async fn count_chunks(
(status = 404, description = "Chunk not found", body = ErrorResponseBody)
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise."),
("tracking_id" = Option<String>, Path, description = "tracking_id of the chunk you want to fetch"),
),
Expand Down Expand Up @@ -1843,7 +1843,7 @@ pub struct GetChunksData {
(status = 404, description = "Any one of the specified chunks not found", body = ErrorResponseBody)
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.")
),
security(
Expand Down Expand Up @@ -1915,7 +1915,7 @@ pub struct GetTrackingChunksData {
(status = 400, description = "Service error relating to finding a chunk by tracking_id", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.")
),
security(
Expand Down Expand Up @@ -2022,7 +2022,7 @@ pub enum RecommendResponseTypes {
(status = 400, description = "Service error relating to to getting similar chunks", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("X-API-Version" = Option<APIVersion>, Header, description = "The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.")
),
security(
Expand Down Expand Up @@ -2360,7 +2360,7 @@ pub struct GenerateOffChunksReqPayload {
(status = 400, description = "Service error relating to to updating chunk, likely due to conflicting tracking_id", body = ErrorResponseBody),
),
params(
("TR-Dataset" = String, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
("TR-Dataset" = uuid::Uuid, Header, description = "The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid."),
),
security(
("ApiKey" = ["readonly"]),
Expand Down
Loading

0 comments on commit 2345823

Please sign in to comment.