Skip to content

Commit

Permalink
fix: unspecified field is undefined (#2477)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanemc authored Dec 13, 2023
1 parent c124e73 commit a0ed4ef
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ const httpOperationParamsToSchema = ({ parameters, parameterType }: ParametersPr
const paramDescription = description || paramSchema.description;

const paramDeprecated = !!(deprecated || paramSchema.deprecated);
const paramStyle = style && defaultStyle[parameterType] !== style ? readableStyles[style] || style : undefined;
const paramStyleUnspecified = style === HttpParamStyles.Unspecified;
const paramStyle = paramStyleUnspecified
? undefined
: style && defaultStyle[parameterType] !== style
? readableStyles[style] || style
: undefined;

if (isPlainObject(schema.properties)) {
schema.properties![p.name] = {
Expand Down

0 comments on commit a0ed4ef

Please sign in to comment.