docs: update lock + general cleanup (#19350)

* docs: update lock file

* remove redundant npm lock file

* add missing peer deps

* fix TODO and bump antd

* fix API spec script
This commit is contained in:
Ville Brofeldt 2022-03-24 15:43:30 +02:00 committed by GitHub
parent f37fc1a7f0
commit 3313530f4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 6816 additions and 15658 deletions

View File

@ -24,7 +24,7 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta
### Installation
```
$ yarn
$ yarn install
```
### Local Development

View File

@ -4,12 +4,12 @@ hide_title: true
sidebar_position: 9
---
import { Buffer } from "buffer";
import { Buffer } from 'buffer';
global.Buffer = Buffer;
import SwaggerUI from "swagger-ui-react";
import openapi from "/resources/openapi.json";
import "swagger-ui-react/swagger-ui.css";
// import { Alert } from "antd";
import SwaggerUI from 'swagger-ui-react';
import openapi from '/resources/openapi.json';
import 'swagger-ui-react/swagger-ui.css';
import { Alert } from 'antd';
## API
@ -18,28 +18,16 @@ Superset's public **REST API** follows the
documented here. The docs bellow are generated using
[Swagger React UI](https://www.npmjs.com/package/swagger-ui-react).
<!--
TODO: (corbinrobb) Uncomment Alert if/when antd gets added and remove Infima alert. Fix SwaggerUI readability in dark mode.
-->
<!-- <Alert
<Alert
type="info"
message={
<div>
<strong>NOTE! </strong>
You can find an interactive version of this documentation on your local Superset
instance at <strong>/swagger/v1</strong> (if enabled)
instance at <strong>/swagger/v1</strong> (unless disabled)
</div>
}
/> -->
<div class="alert alert--info" role="alert">
<strong>NOTE! </strong>
You can find an interactive version of this documentation on your local Superset
instance at <strong>/swagger/v1</strong> (if enabled)
</div>
}
/>
<br />
<br />

13541
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,18 +16,19 @@
"typecheck": "tsc"
},
"dependencies": {
"@algolia/client-search": "^4.13.0",
"@ant-design/icons": "^4.7.0",
"@docsearch/react": "^3.0.0",
"@docusaurus/core": "^2.0.0-beta.15",
"@docusaurus/plugin-client-redirects": "^2.0.0-beta.15",
"@docusaurus/preset-classic": "^2.0.0-beta.15",
"@docusaurus/core": "^2.0.0-beta.17",
"@docusaurus/plugin-client-redirects": "^2.0.0-beta.17",
"@docusaurus/preset-classic": "^2.0.0-beta.17",
"@emotion/core": "^10.1.1",
"@emotion/styled": "^10.0.27",
"@mdx-js/react": "^1.6.21",
"@mdx-js/react": "^1.6.22",
"@saucelabs/theme-github-codeblock": "^0.1.1",
"@superset-ui/style": "^0.14.23",
"@svgr/webpack": "^5.5.0",
"antd": "^4.8.0",
"antd": "^4.19.3",
"buffer": "^6.0.3",
"clsx": "^1.1.1",
"file-loader": "^6.2.0",
@ -37,13 +38,14 @@
"react-github-btn": "^1.2.0",
"stream": "^0.0.2",
"swagger-ui-react": "^4.1.2",
"theme-ui": "^0.3.1",
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.15",
"@docusaurus/module-type-aliases": "^2.0.0-beta.17",
"@tsconfig/docusaurus": "^1.0.4",
"typescript": "^4.3.5"
"@types/react": "^17.0.42",
"typescript": "^4.3.5",
"webpack": "^5.61.0"
},
"browserslist": {
"production": [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -128,7 +128,7 @@ def update_api_docs() -> None:
"""Regenerate the openapi.json file in docs"""
superset_dir = os.path.abspath(os.path.dirname(__file__))
openapi_json = os.path.join(
superset_dir, "..", "docs", "src", "resources", "openapi.json"
superset_dir, "..", "..", "docs", "static", "resources", "openapi.json"
)
api_version = "v1"
@ -149,6 +149,7 @@ def update_api_docs() -> None:
click.secho("Generating openapi.json", fg="green")
with open(openapi_json, "w") as outfile:
json.dump(api_spec.to_dict(), outfile, sort_keys=True, indent=2)
outfile.write("\n")
else:
click.secho("API version not found", err=True)