We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24377ca commit 46047e4Copy full SHA for 46047e4
1 file changed
crates/vespera_macro/src/lib.rs
@@ -25,6 +25,8 @@ use crate::openapi_generator::generate_openapi_doc_with_metadata;
25
use vespera_core::openapi::Server;
26
use vespera_core::route::HttpMethod;
27
28
+type SchemaStorage = LazyLock<Mutex<Vec<StructMetadata>>>;
29
+
30
/// Validate route function - must be pub and async
31
fn validate_route_fn(item_fn: &syn::ItemFn) -> Result<(), syn::Error> {
32
if !matches!(item_fn.vis, syn::Visibility::Public(_)) {
@@ -65,8 +67,6 @@ pub fn route(attr: TokenStream, item: TokenStream) -> TokenStream {
65
67
}
66
68
69
-type SchemaStorage = LazyLock<Mutex<Vec<StructMetadata>>>;
-
70
static SCHEMA_STORAGE: SchemaStorage = LazyLock::new(|| Mutex::new(Vec::new()));
71
72
/// Extract custom schema name from #[schema(name = "...")] attribute
0 commit comments