diff --git a/src/features/Apiexplorer/Schema/RecursiveContent/SchemaBodyHeader/index.tsx b/src/features/Apiexplorer/Schema/RecursiveContent/SchemaBodyHeader/index.tsx index e7dc00c1..43adb987 100644 --- a/src/features/Apiexplorer/Schema/RecursiveContent/SchemaBodyHeader/index.tsx +++ b/src/features/Apiexplorer/Schema/RecursiveContent/SchemaBodyHeader/index.tsx @@ -10,7 +10,7 @@ type TSchemaBodyHeader = { title: string; is_open_object: boolean; setIsOpenObject: (boolean) => void; - examples: string[]; + examples: string[] | number; enum; is_stream_types: boolean; items_type?: string; @@ -144,13 +144,15 @@ const SchemaBodyHeader = ({ {examples && (
example: - {examples.map((el: string, i: number) => { - return ( + {Array.isArray(examples) ? ( + examples.map((el: string, i: number) => (
{el}
- ); - })} + )) + ) : ( + {examples} + )}
)}