redo Fix ChildParameter types (#37812)
This commit is contained in:
@@ -11,7 +11,7 @@ type Props = {
|
||||
slug: string
|
||||
childParamsGroups: ChildParameter[]
|
||||
parentName: string
|
||||
parentType: string
|
||||
parentType?: string
|
||||
oneOfObject?: boolean
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,13 @@ export function ParameterRow({
|
||||
<ChildBodyParametersRows
|
||||
slug={slug}
|
||||
parentName={rowParams.name}
|
||||
parentType={Array.isArray(rowParams.type) ? rowParams.type.join(' or ') : rowParams.type}
|
||||
parentType={
|
||||
rowParams.type
|
||||
? Array.isArray(rowParams.type)
|
||||
? rowParams.type.join(' or ')
|
||||
: rowParams.type
|
||||
: undefined
|
||||
}
|
||||
childParamsGroups={rowParams.childParamsGroups}
|
||||
open={rowParams.name === clickedBodyParameterName}
|
||||
oneOfObject={rowParams.oneOfObject}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface BodyParameter {
|
||||
export interface ChildParameter {
|
||||
name: string
|
||||
description: string
|
||||
type: string
|
||||
type?: string
|
||||
isRequired?: boolean
|
||||
enum?: Array<string | null>
|
||||
default?: string | boolean | number | undefined | string[]
|
||||
|
||||
Reference in New Issue
Block a user