in DTDLValidator/DTDLValidator/Interactive/ShowCommand.cs [15:38]
public Task Run(Interactive p)
{
if (ModelId == null)
{
Log.Error("Please specify a valid model id");
return Task.FromResult<object>(null);
}
try
{
Dtmi modelId = new Dtmi(ModelId);
if (p.Models.TryGetValue(modelId, out DTInterfaceInfo @interface))
{
Console.WriteLine(@interface.GetJsonLdText());
}
}
catch (Exception)
{
Log.Error($"{ModelId} is not a valid dtmi");
}
return Task.FromResult<object>(null);
}