MCPcopy
hub / github.com/GitbookIO/gitbook / checkIsReference

Function checkIsReference

packages/react-openapi/src/utils.ts:7–9  ·  view source on GitHub ↗
(input: unknown)

Source from the content-addressed store, hash-verified

5import type { OpenAPICustomSecurityScheme, OpenAPIOperationData } from './types';
6
7export function checkIsReference(input: unknown): input is OpenAPIV3.ReferenceObject {
8 return typeof input === 'object' && !!input && '$ref' in input;
9}
10
11export function createStateKey(key: string, scope?: string) {
12 return scope ? `${scope}_${key}` : key;

Callers 11

generateCodeSamplesFunction · 0.90
getSchemaPropertiesFunction · 0.90
flattenAlternativesFunction · 0.90
mergeRequiredFieldsFunction · 0.90
resolveSecurityScopesFunction · 0.90
OpenAPIRequestBodyFunction · 0.90
OpenAPIResponseExampleFunction · 0.90
resolveParameterSchemaFunction · 0.85
parameterToPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected