feat(codegen): implemented oneOf unions for primitive types
This commit is contained in:
parent
83dfdb27ac
commit
39731f2f5d
8 changed files with 380 additions and 129 deletions
|
|
@ -9,8 +9,8 @@ pub(super) mod test {
|
|||
use crate::{
|
||||
executor::{ExecutorExt, ReqwestClient},
|
||||
models::{
|
||||
AttackCode, FactionSelectionName, PersonalStatsCategoryEnum, PersonalStatsStatName,
|
||||
UserListEnum,
|
||||
faction_selection_name::FactionSelectionNameVariant, AttackCode, FactionSelectionName,
|
||||
PersonalStatsCategoryEnum, PersonalStatsStatName, UserListEnum,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -67,7 +67,10 @@ pub(super) mod test {
|
|||
let r = client
|
||||
.faction()
|
||||
.for_selections(|b| {
|
||||
b.selections([FactionSelectionName::Basic, FactionSelectionName::Balance])
|
||||
b.selections([
|
||||
FactionSelectionNameVariant::Basic,
|
||||
FactionSelectionNameVariant::Balance,
|
||||
])
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
|
@ -424,7 +427,7 @@ pub(super) mod test {
|
|||
let forum_scope = ForumScope(&client);
|
||||
|
||||
forum_scope
|
||||
.threads_for_category_ids([2.into()].into(), |b| b)
|
||||
.threads_for_category_ids([2].into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
@ -495,14 +498,14 @@ pub(super) mod test {
|
|||
racing_scope.carupgrades(|b| b).await.unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
/* #[tokio::test]
|
||||
async fn racing_races() {
|
||||
let client = test_client().await;
|
||||
|
||||
let racing_scope = RacingScope(&client);
|
||||
|
||||
racing_scope.races(|b| b).await.unwrap();
|
||||
}
|
||||
} */
|
||||
|
||||
#[tokio::test]
|
||||
async fn racing_race_for_race_id() {
|
||||
|
|
@ -648,10 +651,7 @@ pub(super) mod test {
|
|||
|
||||
let torn_scope = TornScope(&client);
|
||||
|
||||
torn_scope
|
||||
.items_for_ids([1.into()].into(), |b| b)
|
||||
.await
|
||||
.unwrap();
|
||||
torn_scope.items_for_ids([1].into(), |b| b).await.unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue