support @specifiedBy directive in SDL export
This commit is contained in:
parent
fca337d8a0
commit
5b7790b256
|
@ -205,6 +205,7 @@ impl Registry {
|
|||
description,
|
||||
inaccessible,
|
||||
tags,
|
||||
specified_by_url,
|
||||
..
|
||||
} => {
|
||||
let mut export_scalar = !SYSTEM_SCALARS.contains(&name.as_str());
|
||||
|
@ -217,6 +218,15 @@ impl Registry {
|
|||
}
|
||||
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 *inaccessible {
|
||||
write!(sdl, " @inaccessible").ok();
|
||||
|
|
Loading…
Reference in New Issue