Replace is_referenceable() with always_inline_schema()

This commit is contained in:
Graham Esau 2024-05-26 16:51:42 +01:00
parent 1aaa162e0b
commit f8b56cb455
22 changed files with 53 additions and 52 deletions

View file

@ -56,8 +56,8 @@ fn derive_json_schema(mut input: syn::DeriveInput, repr: bool) -> syn::Result<To
#[automatically_derived]
impl #impl_generics schemars::JsonSchema for #type_name #ty_generics #where_clause {
fn is_referenceable() -> bool {
<#ty as schemars::JsonSchema>::is_referenceable()
fn always_inline_schema() -> bool {
<#ty as schemars::JsonSchema>::always_inline_schema()
}
fn schema_name() -> std::borrow::Cow<'static, str> {

View file

@ -110,8 +110,8 @@ fn type_for_schema(with_attr: &WithAttr) -> (syn::Type, Option<TokenStream>) {
struct #ty_name;
impl schemars::JsonSchema for #ty_name {
fn is_referenceable() -> bool {
false
fn always_inline_schema() -> bool {
true
}
fn schema_name() -> std::borrow::Cow<'static, str> {