cat_gateway/service/common/objects/legacy/
fragments_batch.rsuse poem_openapi::{types::Example, NewType, Object};
use serde::Deserialize;
#[derive(NewType, Deserialize)]
pub(crate) struct FragmentDef(String);
#[derive(Object, Deserialize)]
#[oai(example = true)]
pub(crate) struct FragmentsBatch {
pub fail_fast: bool,
#[oai(validator(
max_items = "100",
max_length = 66,
min_length = 66,
pattern = "0x[0-9a-f]{64}"
))]
pub fragments: Vec<FragmentDef>,
}
impl Example for FragmentsBatch {
fn example() -> Self {
Self {
fail_fast: false,
fragments: vec![],
}
}
}