From 5b7790b25630e451089f41c46ee4cf3bbdb42fc1 Mon Sep 17 00:00:00 2001 From: cw-ozaki Date: Wed, 24 Aug 2022 22:57:28 +0900 Subject: [PATCH] support @specifiedBy directive in SDL export --- src/registry/export_sdl.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs index af0524d0..1b575751 100644 --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -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();