problem-spec 0.2.0

problem spec(https://www.rfc-editor.org/rfc/rfc7807) lib in rust
Documentation
use bon::Builder;
use serde::Serialize;

#[derive(Debug)]
pub enum Severity {
    ADVICE,
    ERROR,
    WARNING,
}

#[derive(Builder, Default, Debug, Clone, Serialize)]
pub struct ProblemGroup {
    pub name: &'static str,
    pub display_name: &'static str,
    pub parent: Option<Box<ProblemGroup>>,
}

impl Default for &ProblemGroup {
    fn default() -> Self {
        &ProblemGroup { name: "", display_name: "", parent: None }
    }
}

#[derive(Builder, Debug, Default, Clone, Serialize)]
pub struct ProblemSpec<'a> {
    id: &'a ProblemGroup,
    details: &'a str,
    solution: Option<String>,
    file_location: Option<String>,
    contextual_label: &'a str,
    // err: Box<dyn Error>,
}


#[cfg(test)]
mod test {
    use crate::problem::ProblemSpec;
    use crate::problem::ProblemGroup;

    #[test]
    fn test_ok() {
        // let id = ProblemGroup::::default().name("test").display_name("this is a problem!!").build().unwrap();
        // let b = ProblemSpec::builder ::default().id(&id).details("happen").contextual_label("fund-app").build().unwrap();
        //
        //
        // println!("{:?}", b);
        // println!("{:?}", serde_json::to_string(&b).unwrap());

        let problem_group = ProblemGroup::builder().name("test").display_name("this is a prolem").build();

        println!("{:?}", serde_json::to_string(&problem_group).unwrap());
        let problem_spec = ProblemSpec::builder().id(&problem_group).details("happen").contextual_label("fund").solution("this is soluton".to_string())
            .file_location("herere".to_string()).build();

        println!("{:?}", serde_json::to_string(&problem_spec).unwrap());
    }
}