@@ -13,6 +13,7 @@ import { SectionSubtitle } from '../Sections';
13
13
export interface BodyProps {
14
14
body : IHttpOperationRequestBody ;
15
15
onChange ?: ( requestBodyIndex : number ) => void ;
16
+ isHttpWebhookOperation ?: boolean ;
16
17
}
17
18
18
19
export const isBodyEmpty = ( body ?: BodyProps [ 'body' ] ) => {
@@ -23,7 +24,7 @@ export const isBodyEmpty = (body?: BodyProps['body']) => {
23
24
return contents . length === 0 && ! description ?. trim ( ) ;
24
25
} ;
25
26
26
- export const Body = ( { body, onChange } : BodyProps ) => {
27
+ export const Body = ( { body, onChange, isHttpWebhookOperation = false } : BodyProps ) => {
27
28
const [ refResolver , maxRefDepth ] = useSchemaInlineRefResolver ( ) ;
28
29
const [ chosenContent , setChosenContent ] = React . useState ( 0 ) ;
29
30
const { nodeHasChanged, renderExtensionAddon } = useOptionsCtx ( ) ;
@@ -61,13 +62,12 @@ export const Body = ({ body, onChange }: BodyProps) => {
61
62
< NodeAnnotation change = { descriptionChanged } />
62
63
</ Box >
63
64
) }
64
-
65
65
{ isJSONSchema ( schema ) && (
66
66
< JsonSchemaViewer
67
67
resolveRef = { refResolver }
68
68
maxRefDepth = { maxRefDepth }
69
69
schema = { getOriginalObject ( schema ) }
70
- viewMode = " write"
70
+ viewMode = { isHttpWebhookOperation ? 'standalone' : ' write' }
71
71
renderRootTreeLines
72
72
nodeHasChanged = { nodeHasChanged }
73
73
renderExtensionAddon = { renderExtensionAddon }
0 commit comments