Skip to content

Commit 7518b0a

Browse files
committed
Fix missing type
1 parent 6deb04d commit 7518b0a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/gitbook/src/components/DocumentView/OpenAPI/context.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ import { Heading } from '../Heading';
1111

1212
import './scalar.css';
1313
import './style.css';
14-
import type { AnyOpenAPIOperationsBlock, OpenAPISchemasBlock } from '@/lib/openapi/types';
14+
import type {
15+
AnyOpenAPIOperationsBlock,
16+
OpenAPISchemasBlock,
17+
OpenAPIWebhookBlock,
18+
} from '@/lib/openapi/types';
1519

1620
/**
1721
* Get the OpenAPI context to render a block.
1822
*/
1923
export function getOpenAPIContext(args: {
20-
props: BlockProps<AnyOpenAPIOperationsBlock | OpenAPISchemasBlock>;
24+
props: BlockProps<AnyOpenAPIOperationsBlock | OpenAPISchemasBlock | OpenAPIWebhookBlock>;
2125
specUrl: string;
2226
}): OpenAPIContext {
2327
const { props, specUrl } = args;

packages/gitbook/src/lib/openapi/fetch.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { type CacheFunctionOptions, cache, noCacheFetchOptions } from '@/lib/cac
55
import type {
66
AnyOpenAPIOperationsBlock,
77
OpenAPISchemasBlock,
8+
OpenAPIWebhookBlock,
89
ResolveOpenAPIBlockArgs,
910
} from '@/lib/openapi/types';
1011
import { getCloudflareRequestGlobal } from '@v2/lib/data/cloudflare';
@@ -16,7 +17,7 @@ import { isV2 } from '../v2';
1617
import { enrichFilesystem } from './enrich';
1718
import type { FetchOpenAPIFilesystemResult } from './types';
1819

19-
type AnyOpenAPIBlock = AnyOpenAPIOperationsBlock | OpenAPISchemasBlock;
20+
type AnyOpenAPIBlock = AnyOpenAPIOperationsBlock | OpenAPISchemasBlock | OpenAPIWebhookBlock;
2021

2122
/**
2223
* Fetch OpenAPI block.

0 commit comments

Comments
 (0)