Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Json schema proxy to original implementor #1210

Merged
merged 7 commits into from
Jun 29, 2024
4 changes: 1 addition & 3 deletions near-sdk-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,7 @@ pub fn derive_near_schema(#[allow(unused)] input: TokenStream) -> TokenStream {
#[automatically_derived]
impl #generics #near_sdk_crate::schemars::JsonSchema for #input_ident_proxy #generics #where_clause {
fn schema_name() -> ::std::string::String {
// TODO: consider replacing with
// <#input_ident #generics as #near_sdk_crate::schemars::JsonSchema>::schema_name()
stringify!(#input_ident #generics).to_string()
<#input_ident #generics as #near_sdk_crate::schemars::JsonSchema>::schema_name()
}

fn json_schema(gen: &mut #near_sdk_crate::schemars::gen::SchemaGenerator) -> #near_sdk_crate::schemars::schema::Schema {
Expand Down
Loading