private static void SerializeExternal(StringBuilder sb, RamlType ramlType, int indentation) { if (!string.IsNullOrWhiteSpace(ramlType.External.Schema)) { RamlSerializerHelper.SerializeSchema(sb, "schema", ramlType.External.Schema, indentation + 4); } if (!string.IsNullOrWhiteSpace(ramlType.External.Xml)) { RamlSerializerHelper.SerializeSchema(sb, "schema", ramlType.External.Xml, indentation + 4); } }
private void SerializeSchemas(StringBuilder sb, IEnumerable <IDictionary <string, string> > schemas) { if (schemas == null || !schemas.Any() || schemas.All(x => !x.Any())) { return; } sb.AppendLine("schemas:"); foreach (var kv in schemas.SelectMany(schemaDic => schemaDic)) { RamlSerializerHelper.SerializeSchema(sb, kv.Key, kv.Value, 2); } }