Skip to content

Commit 2ee2ab3

Browse files
committed
Pass correct property to property parameter source builder when using parameter descriptor syntax [Pt. II]
1 parent f774136 commit 2ee2ab3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Dibix.Sdk.CodeGeneration/Registration/ControllerDefinitionProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ private ExplicitParameter CollectExplicitParameterDescriptor(JProperty property,
320320
if (defaultValue != null)
321321
defaultValueReference = JsonValueReferenceParser.Parse(type, defaultValue, _schemaRegistry, Logger);
322322

323-
JProperty sourceProperty = properties.GetPropertySafe("source");
324-
ActionParameterSourceBuilder parameterSourceBuilder = CollectRootParameterSource(sourceProperty, requestBody, pathParameters);
323+
JProperty sourceProperty = properties.Property("source");
324+
ActionParameterSourceBuilder parameterSourceBuilder = sourceProperty != null ? CollectRootParameterSource(sourceProperty, requestBody, pathParameters) : null;
325325
return new ParameterDescriptor(property, type, parameterLocation, defaultValueReference, parameterSourceBuilder) { Visited = isPathParameter };
326326
}
327327

0 commit comments

Comments
 (0)