Skip to content

Parameters Serialization - Style doesn't respect the default value #858

@safepage

Description

@safepage

This is similar to the issue in Pull Request 544.

There is now an inconsistency as Style is not set to a default value (but Explode is):
“Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.”

I assume the fix would be similar?

Although the serialization code for Explode also looks wrong:

writer.WriteProperty(OpenApiConstants.Explode, Explode, Style.HasValue && Style.Value == ParameterStyle.Form);

Maybe it should be:

writer.WriteProperty(OpenApiConstants.Explode, _explode);

Then the serialized model would reflect the actual values read in (as _explode is a nullable bool?).

Metadata

Metadata

Assignees

Labels

type:bugA broken experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions