Skip to content

Commit 3146afc

Browse files
committed
fix: stream enum casing and bump to 0.1.7
1 parent a1f930a commit 3146afc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "uapi-sdk-rust"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
description = "UAPI Rust SDK - idiomatic, typed, domain-driven API client."

src/models/generated/post_translate_stream_request.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
* UAPI 官方接口文档
55
*
66
* The version of the OpenAPI document: 1.0.0
7-
*
7+
*
88
* Generated by: https://openapi-generator.tech
99
*/
1010

11-
use crate::models;
1211
use serde::{Deserialize, Serialize};
1312

1413
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
@@ -37,34 +36,35 @@ impl PostTranslateStreamRequest {
3736
}
3837
}
3938
}
39+
4040
/// 目标语言,支持:中文、英文
4141
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
4242
pub enum ToLang {
4343
#[serde(rename = "中文")]
44-
,
44+
Zh,
4545
#[serde(rename = "英文")]
46-
2,
46+
En,
4747
}
4848

4949
impl Default for ToLang {
5050
fn default() -> ToLang {
51-
Self::
51+
Self::Zh
5252
}
5353
}
54+
5455
/// 源语言,支持:中文、英文、auto(自动检测)。默认为auto
5556
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
5657
pub enum FromLang {
5758
#[serde(rename = "中文")]
58-
,
59+
Zh,
5960
#[serde(rename = "英文")]
60-
2,
61+
En,
6162
#[serde(rename = "auto")]
6263
Auto,
6364
}
6465

6566
impl Default for FromLang {
6667
fn default() -> FromLang {
67-
Self::
68+
Self::Auto
6869
}
6970
}
70-

0 commit comments

Comments
 (0)