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 ### Installation
``` ```
$ yarn $ yarn install
``` ```
### Local Development ### Local Development

View File

@ -4,12 +4,12 @@ hide_title: true
sidebar_position: 9 sidebar_position: 9
--- ---
import { Buffer } from "buffer"; import { Buffer } from 'buffer';
global.Buffer = Buffer; global.Buffer = Buffer;
import SwaggerUI from "swagger-ui-react"; import SwaggerUI from 'swagger-ui-react';
import openapi from "/resources/openapi.json"; import openapi from '/resources/openapi.json';
import "swagger-ui-react/swagger-ui.css"; import 'swagger-ui-react/swagger-ui.css';
// import { Alert } from "antd"; import { Alert } from 'antd';
## API ## API
@ -18,28 +18,16 @@ Superset's public **REST API** follows the
documented here. The docs bellow are generated using documented here. The docs bellow are generated using
[Swagger React UI](https://www.npmjs.com/package/swagger-ui-react). [Swagger React UI](https://www.npmjs.com/package/swagger-ui-react).
<!-- <Alert
TODO: (corbinrobb) Uncomment Alert if/when antd gets added and remove Infima alert. Fix SwaggerUI readability in dark mode.
-->
<!-- <Alert
type="info" type="info"
message={ message={
<div> <div>
<strong>NOTE! </strong> <strong>NOTE! </strong>
You can find an interactive version of this documentation on your local Superset 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>
}
} />
/> -->
<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 />
<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" "typecheck": "tsc"
}, },
"dependencies": { "dependencies": {
"@algolia/client-search": "^4.13.0",
"@ant-design/icons": "^4.7.0", "@ant-design/icons": "^4.7.0",
"@docsearch/react": "^3.0.0", "@docsearch/react": "^3.0.0",
"@docusaurus/core": "^2.0.0-beta.15", "@docusaurus/core": "^2.0.0-beta.17",
"@docusaurus/plugin-client-redirects": "^2.0.0-beta.15", "@docusaurus/plugin-client-redirects": "^2.0.0-beta.17",
"@docusaurus/preset-classic": "^2.0.0-beta.15", "@docusaurus/preset-classic": "^2.0.0-beta.17",
"@emotion/core": "^10.1.1", "@emotion/core": "^10.1.1",
"@emotion/styled": "^10.0.27", "@emotion/styled": "^10.0.27",
"@mdx-js/react": "^1.6.21", "@mdx-js/react": "^1.6.22",
"@saucelabs/theme-github-codeblock": "^0.1.1", "@saucelabs/theme-github-codeblock": "^0.1.1",
"@superset-ui/style": "^0.14.23", "@superset-ui/style": "^0.14.23",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"antd": "^4.8.0", "antd": "^4.19.3",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"clsx": "^1.1.1", "clsx": "^1.1.1",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
@ -37,13 +38,14 @@
"react-github-btn": "^1.2.0", "react-github-btn": "^1.2.0",
"stream": "^0.0.2", "stream": "^0.0.2",
"swagger-ui-react": "^4.1.2", "swagger-ui-react": "^4.1.2",
"theme-ui": "^0.3.1",
"url-loader": "^4.1.1" "url-loader": "^4.1.1"
}, },
"devDependencies": { "devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.15", "@docusaurus/module-type-aliases": "^2.0.0-beta.17",
"@tsconfig/docusaurus": "^1.0.4", "@tsconfig/docusaurus": "^1.0.4",
"typescript": "^4.3.5" "@types/react": "^17.0.42",
"typescript": "^4.3.5",
"webpack": "^5.61.0"
}, },
"browserslist": { "browserslist": {
"production": [ "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""" """Regenerate the openapi.json file in docs"""
superset_dir = os.path.abspath(os.path.dirname(__file__)) superset_dir = os.path.abspath(os.path.dirname(__file__))
openapi_json = os.path.join( openapi_json = os.path.join(
superset_dir, "..", "docs", "src", "resources", "openapi.json" superset_dir, "..", "..", "docs", "static", "resources", "openapi.json"
) )
api_version = "v1" api_version = "v1"
@ -149,6 +149,7 @@ def update_api_docs() -> None:
click.secho("Generating openapi.json", fg="green") click.secho("Generating openapi.json", fg="green")
with open(openapi_json, "w") as outfile: with open(openapi_json, "w") as outfile:
json.dump(api_spec.to_dict(), outfile, sort_keys=True, indent=2) json.dump(api_spec.to_dict(), outfile, sort_keys=True, indent=2)
outfile.write("\n")
else: else:
click.secho("API version not found", err=True) click.secho("API version not found", err=True)