File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Microsoft.OpenApi.Hidi/Formatters
Microsoft.OpenApi/Services Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ private static IList<OpenApiParameter> ResolveFunctionParameters(IList<OpenApiPa
177
177
178
178
private void AddAddtionalPropertiesToSchema ( OpenApiSchema schema )
179
179
{
180
- if ( schema != null && ! _schemaLoop . Contains ( schema ) && "object" . Equals ( schema ? . Type , StringComparison . OrdinalIgnoreCase ) )
180
+ if ( schema != null && ! _schemaLoop . Contains ( schema ) && "object" . Equals ( schema . Type , StringComparison . OrdinalIgnoreCase ) )
181
181
{
182
182
schema . AdditionalProperties = new OpenApiSchema ( ) { Type = "object" } ;
183
183
Original file line number Diff line number Diff line change @@ -121,10 +121,7 @@ private void EnsureResponsesExists()
121
121
122
122
private void EnsurRequestBodiesExists ( )
123
123
{
124
- if ( _target . Components . RequestBodies == null )
125
- {
126
- _target . Components . RequestBodies = new Dictionary < string , OpenApiRequestBody > ( ) ;
127
- }
124
+ _target . Components . RequestBodies ??= new Dictionary < string , OpenApiRequestBody > ( ) ;
128
125
}
129
126
}
130
127
}
You can’t perform that action at this time.
0 commit comments