feat(api-docs): render documentation of type asyncapi

This commit is contained in:
Dominik Henneke
2020-07-24 16:15:48 +02:00
parent 3534c0804c
commit 5a023c3c49
4 changed files with 1303 additions and 0 deletions
@@ -15,6 +15,7 @@
*/
import React, { FC } from 'react';
import { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget/AsyncApiDefinitionWidget';
import { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget/OpenApiDefinitionWidget';
import { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget/PlainApiDefinitionWidget';
@@ -26,6 +27,9 @@ export const ApiDefinitionWidget: FC<{
case 'openapi':
return <OpenApiDefinitionWidget definition={definition} />;
case 'asyncapi':
return <AsyncApiDefinitionWidget definition={definition} />;
default:
return <PlainApiDefinitionWidget definition={definition} />;
}
@@ -0,0 +1,25 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AsyncApi from '@kyma-project/asyncapi-react';
import React, { FC } from 'react';
import './style.css';
export const AsyncApiDefinitionWidget: FC<{
definition: any;
}> = ({ definition }) => {
return <AsyncApi schema={definition} />;
};
File diff suppressed because it is too large Load Diff