Replace is_referenceable()
with always_inline_schema()
This commit is contained in:
parent
1aaa162e0b
commit
f8b56cb455
22 changed files with 53 additions and 52 deletions
|
@ -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> {
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue