macro_rules! describe_type {
(raw_model => $model:ident) => { ... };
(raw_type => {
$(description: $description:literal)?
ident: $type:ident
}) => { ... };
(string => {
$(description: $description:literal)?
$(format: $format:literal)?
$(example: $example:literal)?
$(variants: [$($variants:literal),*])?
}) => { ... };
(number => {
$(description: $description:literal)?
$(format: $format:literal)?
$(example: $example:literal)?
}) => { ... };
(integer => {
$(description: $description:literal)?
$(format: $format:literal)?
$(example: $example:literal)?
}) => { ... };
(boolean => {
$(description: $description:literal)?
}) => { ... };
(array => {
$(description: $description:literal)?
items: ($($property_tail:tt)*)
}) => { ... };
(object => {
$(description: $description:literal)?
properties: {
$($property_name:ident$([$required:tt])?: ($($property_tail:tt)*))*
}
}) => { ... };
(@object_property [$properties:ident, $required:ident] $property_name:ident: ($($property_tail:tt)*)) => { ... };
(@object_property [$properties:ident, $required:ident] $property_name:ident[required]: ($($property_tail:tt)*)) => { ... };
(@object_property_value link => $ref:literal) => { ... };
(@object_property_value link => $ref:ident) => { ... };
(@object_property_value $type:ident => $($tail:tt)*) => { ... };
}