use kynos_openapi::{Operation, PathItem, Schema, SchemaObject};
#[test]
fn a_path_item_does_not_inline_its_operations() {
let path_item = size_of::<PathItem>();
let operation = size_of::<Operation>();
assert!(
path_item < operation,
"PathItem ({path_item} bytes) should not inline Operation ({operation} bytes); \
the per-method slots must stay boxed"
);
assert!(
path_item <= 512,
"PathItem grew to {path_item} bytes; box any large field that was added"
);
}
#[test]
fn a_schema_does_not_inline_its_keywords() {
let schema = size_of::<Schema>();
let object = size_of::<SchemaObject>();
assert!(
schema < object,
"Schema ({schema} bytes) should not inline SchemaObject ({object} bytes); \
schemas nest deeply and are cloned often"
);
assert!(
schema <= 32,
"Schema grew to {schema} bytes; it is the most-copied type in the model"
);
}