Merge pull request #1041 from k-kinzal/support-specified-by-directive
support @specifiedBy directive in SDL export
This commit is contained in:
commit
21c6129ade
|
@ -205,6 +205,7 @@ impl Registry {
|
||||||
description,
|
description,
|
||||||
inaccessible,
|
inaccessible,
|
||||||
tags,
|
tags,
|
||||||
|
specified_by_url,
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
let mut export_scalar = !SYSTEM_SCALARS.contains(&name.as_str());
|
let mut export_scalar = !SYSTEM_SCALARS.contains(&name.as_str());
|
||||||
|
@ -217,6 +218,15 @@ impl Registry {
|
||||||
}
|
}
|
||||||
write!(sdl, "scalar {}", name).ok();
|
write!(sdl, "scalar {}", name).ok();
|
||||||
|
|
||||||
|
if let Some(specified_by_url) = specified_by_url {
|
||||||
|
write!(
|
||||||
|
sdl,
|
||||||
|
" @specifiedBy(url: \"{}\")",
|
||||||
|
specified_by_url.replace('"', "\\\"")
|
||||||
|
)
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
|
||||||
if options.federation {
|
if options.federation {
|
||||||
if *inaccessible {
|
if *inaccessible {
|
||||||
write!(sdl, " @inaccessible").ok();
|
write!(sdl, " @inaccessible").ok();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user