File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/Microsoft.OpenApi/Models Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ public IEnumerable<IOpenApiParameter> ConvertToFormDataParameters(IOpenApiWriter
137137 OpenApiSchema s => s , // we already have a copy
138138 // we have a copy of a reference but don't want to mutate the source schema
139139 // TODO might need recursive resolution of references here
140- OpenApiSchemaReference r => ( OpenApiSchema ? ) r . Target ? . CreateShallowCopy ( ) ,
140+ OpenApiSchemaReference r when r . Target is not null => ( OpenApiSchema ) r . Target . CreateShallowCopy ( ) ,
141+ OpenApiSchemaReference r2 when r . Target is null => throw new InvalidOperationException ( "Unresolved reference target" ) ,
141142 _ => throw new InvalidOperationException ( "Unexpected schema type" )
142143 } ;
143144 if ( updatedSchema is not null )
You can’t perform that action at this time.
0 commit comments