From a0ed4eff94dcb6d18b6682bc42990c6c5fb1f6eb Mon Sep 17 00:00:00 2001 From: lanemc Date: Wed, 13 Dec 2023 11:42:42 -0600 Subject: [PATCH] fix: unspecified field is undefined (#2477) --- .../src/components/Docs/HttpOperation/Parameters.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/elements-core/src/components/Docs/HttpOperation/Parameters.tsx b/packages/elements-core/src/components/Docs/HttpOperation/Parameters.tsx index c9cd9dfb1..71ee6a42c 100644 --- a/packages/elements-core/src/components/Docs/HttpOperation/Parameters.tsx +++ b/packages/elements-core/src/components/Docs/HttpOperation/Parameters.tsx @@ -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] = {