/// <summary> /// Creates a new instance of the <see cref="OasRequestBody"/> class. /// </summary> /// <param name="description">The brief description of the request body.</param> /// <param name="content">The content of the request body.</param> /// <param name="options">The request body options.</param> public OasRequestBody( string description = default, IReadOnlyDictionary <ContentType, OasMediaType> content = default, OasRequestBodyOptions options = default) { Description = description; Content = content ?? ImmutableDictionary <ContentType, OasMediaType> .Empty; Options = options; }
/// <summary> /// Creates a new instance of the <see cref="OasRequestBodyBuilder"/> class. /// </summary> /// <param name="value">The <see cref="OasRequestBody"/> to copy values from.</param> public OasRequestBodyBuilder(OasRequestBody value) { if (value is null) { throw new ArgumentNullException(nameof(value)); } Description = value.Description; Content = new Dictionary <ContentType, OasMediaType>(value.Content); Options = value.Options; }