Don't include "doc" in list of helper attributes

This commit is contained in:
Graham Esau 2019-12-09 21:56:19 +00:00
parent f55572f735
commit b5e1821f3a
2 changed files with 4 additions and 4 deletions

View file

@ -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 :(

View file

@ -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);