/// <summary> /// Write the required Open API element map (string to string mapping). /// </summary> /// <param name="writer">The Open API writer.</param> /// <param name="name">The property name.</param> /// <param name="elements">The map values.</param> /// <param name="action">The map element writer action.</param> public static void WriteRequiredMap( this IOpenApiWriter writer, string name, IDictionary <string, string> elements, Action <IOpenApiWriter, string> action) { writer.WriteMapInternal(name, elements, action); }
/// <summary> /// Write the required Open API element map. /// </summary> /// <typeparam name="T">The Open API element type. <see cref="IOpenApiElement"/></typeparam> /// <param name="writer">The Open API writer.</param> /// <param name="name">The property name.</param> /// <param name="elements">The map values.</param> /// <param name="action">The map element writer action.</param> public static void WriteRequiredMap <T>( this IOpenApiWriter writer, string name, IDictionary <string, T> elements, Action <IOpenApiWriter, T> action) where T : IOpenApiElement { writer.WriteMapInternal(name, elements, action); }
/// <summary> /// Write the optional Open API element map (string to string mapping). /// </summary> /// <param name="writer">The Open API writer.</param> /// <param name="name">The property name.</param> /// <param name="elements">The map values.</param> /// <param name="action">The map element writer action.</param> public static void WriteOptionalMap( this IOpenApiWriter writer, string name, IDictionary <string, string> elements, Action <IOpenApiWriter, string> action) { if (elements != null && elements.Any()) { writer.WriteMapInternal(name, elements, action); } }