Skip to content

Commit c63668a

Browse files
authored
Update UI to add links to openapi docs (#139)
* add Flask-RESTX with OpenAPI documentation * update UI to add links to openapi docs
1 parent fd0096a commit c63668a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ui/src/components/ApiKeyModal/index.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { CopyOutlined } from '@ant-design/icons'
22
import { Modal, Spin, Tag, Typography } from 'antd'
33
import { useApiKey } from '../../hooks/useApiKey'
44
import { useMessageApi } from '../../providers/MessageProvider'
5-
import { examples } from './examples'
65

7-
const { Paragraph, Text } = Typography
6+
const { Paragraph } = Typography
87

98
interface ApiKeyModalProps {
109
open: boolean
@@ -45,10 +44,15 @@ export const ApiKeyModal = ({ open, onCancel }: ApiKeyModalProps) => {
4544
</Tag>
4645
</center>
4746
<br />
48-
<Paragraph>
49-
Examples of using your API key with Python requests:
47+
<Paragraph style={{ textAlign: 'center' }}>
48+
<a href="/api/docs" target="_blank" rel="noopener noreferrer">
49+
OpenAPI Docs
50+
</a>
51+
&nbsp;|&nbsp;
52+
<a href="/api/swagger.json" target="_blank" rel="noopener noreferrer">
53+
Swagger JSON
54+
</a>
5055
</Paragraph>
51-
<Text>{examples}</Text>
5256
</Modal>
5357
)
5458
}

0 commit comments

Comments
 (0)