@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi
1111 /// <summary>
1212 /// Parameter Object.
1313 /// </summary>
14- public class OpenApiParameter : IOpenApiExtensible , IOpenApiParameter
14+ public class OpenApiParameter : IOpenApiExtensible , IOpenApiParameter , IOpenApiContentElement
1515 {
1616 private bool ? _explode ;
1717 private ParameterStyle ? _style ;
@@ -60,7 +60,15 @@ public bool Explode
6060 /// <inheritdoc/>
6161 public JsonNode ? Example { get ; set ; }
6262
63- /// <inheritdoc/>
63+ /// <summary>
64+ /// A map containing the representations for the parameter.
65+ /// The key is the media type and the value describes it.
66+ /// The map MUST only contain one entry.
67+ /// For more complex scenarios, the content property can define the media type and schema of the parameter.
68+ /// A parameter MUST contain either a schema property, or a content property, but not both.
69+ /// When example or examples are provided in conjunction with the schema object,
70+ /// the example MUST follow the prescribed serialization strategy for the parameter.
71+ /// </summary>
6472 public IDictionary < string , IOpenApiMediaType > ? Content { get ; set ; }
6573
6674 /// <inheritdoc/>
@@ -111,11 +119,11 @@ public virtual void SerializeAsV3(IOpenApiWriter writer)
111119 SerializeInternal ( writer , OpenApiSpecVersion . OpenApi3_0 , ( writer , element ) => element . SerializeAsV3 ( writer ) ) ;
112120 }
113121
114- internal void SerializeInternal ( IOpenApiWriter writer , OpenApiSpecVersion version ,
122+ internal void SerializeInternal ( IOpenApiWriter writer , OpenApiSpecVersion version ,
115123 Action < IOpenApiWriter , IOpenApiSerializable > callback )
116124 {
117125 Utils . CheckArgumentNull ( writer ) ;
118-
126+
119127 // Validate that Cookie style is only used in OpenAPI 3.2 and later
120128 if ( Style == ParameterStyle . Cookie && version < OpenApiSpecVersion . OpenApi3_2 )
121129 {
@@ -226,7 +234,8 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction
226234 // uniqueItems
227235 // enum
228236 // multipleOf
229- var targetSchema = Schema switch {
237+ var targetSchema = Schema switch
238+ {
230239 OpenApiSchemaReference schemaReference => schemaReference . RecursiveTarget ,
231240 OpenApiSchema schema => schema ,
232241 _ => null ,
@@ -271,7 +280,7 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction
271280 public virtual void SerializeAsV2 ( IOpenApiWriter writer )
272281 {
273282 Utils . CheckArgumentNull ( writer ) ;
274-
283+
275284 // Validate that Cookie style is only used in OpenAPI 3.2 and later
276285 if ( Style == ParameterStyle . Cookie )
277286 {
0 commit comments