Skip to main content

objectiveai_sdk_macros/
lib.rs

1use proc_macro::TokenStream;
2
3/// Marks a type's schema role in the Ref/Owned pattern.
4///
5/// Values: `Owned`, `Ref`, `RefOwnedEnum`
6///
7/// - `Owned`: The struct IS the canonical schema. Its `#[schemars(rename)]`
8///   must equal the module path + type name with "Owned" stripped.
9/// - `Ref`: The borrowed counterpart. Must NOT derive `JsonSchema`.
10/// - `RefOwnedEnum`: The dispatch enum. Must NOT derive `JsonSchema`
11///   (uses a manual impl delegating to the Owned variant).
12#[proc_macro_attribute]
13pub fn schema_override(_attr: TokenStream, item: TokenStream) -> TokenStream {
14    item
15}