diff --git a/packages/react-openapi/src/ScalarApiButton.tsx b/packages/react-openapi/src/ScalarApiButton.tsx index 8417db9e2..0e6ceffe5 100644 --- a/packages/react-openapi/src/ScalarApiButton.tsx +++ b/packages/react-openapi/src/ScalarApiButton.tsx @@ -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 }, ), );