Skip to content

Conversation

@baywet
Copy link
Member

@baywet baywet commented Jan 22, 2025

fixes a bug where OpenAPI v2 body parameter references would not serialize properly and always inline the definition

Comment on lines +126 to +133
if (writer.GetSettings().ShouldInlineReference(_reference))
{
return Target.ConvertToBodyParameter(writer);
}
else
{
return new OpenApiParameterReference(_reference.Id, _reference.HostDocument);
}

Check notice

Code scanning / CodeQL

Missed ternary opportunity Note

Both branches of this 'if' statement return - consider using '?' to express intent better.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@baywet baywet changed the title fixes OpenAPI v2 request body parameter references fixes OpenAPI v2 request body parameter references serialization Jan 22, 2025
@baywet baywet merged commit 4af0878 into dev Jan 23, 2025
13 of 14 checks passed
@baywet baywet deleted the fix/request-body-reference-v2 branch January 23, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants