Apply fix from marclave

This commit is contained in:
Steven Hall
2024-05-14 10:59:58 +01:00
parent 4cb2ae91b0
commit edb68df499
@@ -7,6 +7,7 @@ import {
getRequestFromOperation,
Query,
Header,
RequestBody,
} from '@scalar/oas-utils';
import React from 'react';
@@ -99,7 +100,12 @@ export function ScalarApiClient(props: { children: React.ReactNode }) {
url: operationData.path,
},
getRequestFromOperation(
{ ...operation, information: operationData.operation },
{
...operation,
information: {
requestBody: operationData.operation.requestBody as RequestBody,
},
},
{ requiredOnly: false },
),
);