Skip to main content

langfuse_client_base/models/
unstable_public_api_validation_issue.rs

1/*
2 * langfuse
3 *
4 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml
5 *
6 * The version of the OpenAPI document:
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// UnstablePublicApiValidationIssue : One validation issue returned for malformed request bodies or query parameters.  This mirrors the most important parts of a Zod issue: a machine-readable `code`, a human-readable `message`, and a structured `path`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
16pub struct UnstablePublicApiValidationIssue {
17    /// Machine-readable validation issue code emitted by the server validator.
18    #[serde(rename = "code")]
19    pub code: String,
20    /// Human-readable explanation of the validation failure.
21    #[serde(rename = "message")]
22    pub message: String,
23    /// Path to the invalid field, for example `[\"mapping\", 0, \"jsonPath\"]`.
24    #[serde(rename = "path")]
25    pub path: Vec<serde_json::Value>,
26}
27
28impl UnstablePublicApiValidationIssue {
29    /// One validation issue returned for malformed request bodies or query parameters.  This mirrors the most important parts of a Zod issue: a machine-readable `code`, a human-readable `message`, and a structured `path`.
30    pub fn new(
31        code: String,
32        message: String,
33        path: Vec<serde_json::Value>,
34    ) -> UnstablePublicApiValidationIssue {
35        UnstablePublicApiValidationIssue {
36            code,
37            message,
38            path,
39        }
40    }
41}