Don't include "doc" in list of helper attributes
This commit is contained in:
parent
f55572f735
commit
b5e1821f3a
2 changed files with 4 additions and 4 deletions
|
@ -23,10 +23,10 @@ pub struct MyStruct {
|
||||||
#[derive(Debug, JsonSchema)]
|
#[derive(Debug, JsonSchema)]
|
||||||
pub struct MyUnitStruct;
|
pub struct MyUnitStruct;
|
||||||
|
|
||||||
/// # This is the enum's title
|
#[doc = " # This is the enum's title "]
|
||||||
/// This is
|
#[doc = " This is "]
|
||||||
#[derive(Debug, JsonSchema)]
|
#[derive(Debug, JsonSchema)]
|
||||||
/// the enum's description.
|
#[doc = " the enum's description."]
|
||||||
pub enum MyEnum {
|
pub enum MyEnum {
|
||||||
UndocumentedUnit,
|
UndocumentedUnit,
|
||||||
/// This comment is not included in the generated schema :(
|
/// This comment is not included in the generated schema :(
|
||||||
|
|
|
@ -15,7 +15,7 @@ use serde_derive_internals::attr::{self as serde_attr, Default as SerdeDefault,
|
||||||
use serde_derive_internals::{Ctxt, Derive};
|
use serde_derive_internals::{Ctxt, Derive};
|
||||||
use syn::spanned::Spanned;
|
use syn::spanned::Spanned;
|
||||||
|
|
||||||
#[proc_macro_derive(JsonSchema, attributes(schemars, serde, doc))]
|
#[proc_macro_derive(JsonSchema, attributes(schemars, serde))]
|
||||||
pub fn derive_json_schema(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
pub fn derive_json_schema(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||||
let mut input = parse_macro_input!(input as syn::DeriveInput);
|
let mut input = parse_macro_input!(input as syn::DeriveInput);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue