mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Fix @gitbook/react-openapi when react import are mandatory (#2389)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix missing react imports
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
# `@gitbook/react-openapi`
|
# `@gitbook/react-openapi`
|
||||||
|
|
||||||
React components to render OpenAPI operations.
|
Style-less React components to render OpenAPI operation blocks.
|
||||||
|
|
||||||
## Features
|
Note: The package is a TypeScript package and do not expose JS built files.
|
||||||
|
|
||||||
- Generate code samples for the request
|
|
||||||
- Support custom cde samples with `x-codeSamples` (Redocly syntax)
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- Support for trying out the request
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
export function Markdown(props: { source: string; className?: string }) {
|
export function Markdown(props: { source: string; className?: string }) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { OpenAPIV3 } from 'openapi-types';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { CodeSampleInput, codeSampleGenerators } from './code-samples';
|
import { CodeSampleInput, codeSampleGenerators } from './code-samples';
|
||||||
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
import { OpenAPIRootSchema } from './OpenAPISchema';
|
import { OpenAPIRootSchema } from './OpenAPISchema';
|
||||||
import { noReference } from './utils';
|
import { noReference } from './utils';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
import { OpenAPIRootSchema, OpenAPISchemaProperties } from './OpenAPISchema';
|
import { OpenAPIRootSchema, OpenAPISchemaProperties } from './OpenAPISchema';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import { InteractiveSection } from './InteractiveSection';
|
import { InteractiveSection } from './InteractiveSection';
|
||||||
import { OpenAPIOperationData } from './fetchOpenAPIOperation';
|
import { OpenAPIOperationData } from './fetchOpenAPIOperation';
|
||||||
import { generateSchemaExample } from './generateSchemaExample';
|
import { generateSchemaExample } from './generateSchemaExample';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
import { noReference } from './utils';
|
import { noReference } from './utils';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
import { OpenAPIClientContext } from './types';
|
import { OpenAPIClientContext } from './types';
|
||||||
import { InteractiveSection } from './InteractiveSection';
|
import { InteractiveSection } from './InteractiveSection';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as React from 'react';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
import { OpenAPIServerURLVariable } from './OpenAPIServerURLVariable';
|
import { OpenAPIServerURLVariable } from './OpenAPIServerURLVariable';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactive component to show the value of a server variable and let the user change it.
|
* Interactive component to show the value of a server variable and let the user change it.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
import { OpenAPIV3 } from 'openapi-types';
|
import { OpenAPIV3 } from 'openapi-types';
|
||||||
|
|
||||||
import { OpenAPIOperationData, fromJSON } from './fetchOpenAPIOperation';
|
import { OpenAPIOperationData, fromJSON } from './fetchOpenAPIOperation';
|
||||||
|
|||||||
Reference in New Issue
Block a user