Skip to content

Commit

Permalink
Merge 68fb9e9 into 4b072be
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVarchuk committed May 27, 2021
2 parents 4b072be + 68fb9e9 commit 12de36a
Show file tree
Hide file tree
Showing 28 changed files with 3,372 additions and 52 deletions.
9 changes: 7 additions & 2 deletions demo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { resolve as urlResolve } from 'url';
import { RedocStandalone } from '../src';
import ComboBox from './ComboBox';

const DEFAULT_SPEC = 'openapi.yaml';
const NEW_VERSION_SPEC = 'openapi-3-1.yaml';

const demos = [
{ value: NEW_VERSION_SPEC, label: 'OpenApi 3.1' },
{ value: 'https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml', label: 'Instagram' },
{
value: 'https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml',
Expand All @@ -16,8 +20,6 @@ const demos = [
{ value: 'https://docs.graphhopper.com/openapi.json', label: 'GraphHopper' },
];

const DEFAULT_SPEC = 'openapi.yaml';

class DemoApp extends React.Component<
{},
{ specUrl: string; dropdownOpen: boolean; cors: boolean }
Expand Down Expand Up @@ -45,6 +47,9 @@ class DemoApp extends React.Component<
}

handleChange = (url: string) => {
if (url === NEW_VERSION_SPEC) {
this.setState({ cors: false })
}
this.setState({
specUrl: url,
});
Expand Down

0 comments on commit 12de36a

Please sign in to comment.