openapi-nexus 0.1.1

OpenAPI 3.x multi-language code generator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct KotlinOkhttpConfig {
    #[serde(default)]
    pub package_name: Option<String>,
}

impl From<toml::value::Table> for KotlinOkhttpConfig {
    fn from(table: toml::value::Table) -> Self {
        toml::Value::Table(table).try_into().unwrap_or_else(|e| {
            tracing::warn!("Failed to parse kotlin-okhttp config: {e}; using defaults");
            Self::default()
        })
    }
}