Skip to content

Commit

Permalink
Bump apidoc-markdown from v6.0.0 to v7.2.4 (#144007)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Watson authored Dec 13, 2022
1 parent 29841da commit 47ad5ed
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 153 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,6 @@
"@testing-library/react": "^12.1.5",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^13.5.0",
"@types/apidoc": "^0.22.3",
"@types/archiver": "^5.3.1",
"@types/async": "^3.2.3",
"@types/babel__core": "^7.1.20",
Expand Down Expand Up @@ -976,8 +975,7 @@
"aggregate-error": "^3.1.0",
"ajv": "^8.11.0",
"antlr4ts-cli": "^0.5.0-alpha.3",
"apidoc": "^0.29.0",
"apidoc-markdown": "^6.0.0",
"apidoc-markdown": "^7.2.4",
"argsplit": "^1.0.5",
"autoprefixer": "^10.4.7",
"axe-core": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/ml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"scripts": {
"build:apiDocScripts": "cd server/routes/apidoc_scripts && ../../../../../../node_modules/.bin/tsc",
"generateHeader": "node server/routes/apidoc_scripts/target/header_generator.js",
"apiDocs": "yarn build:apiDocScripts && yarn generateHeader && cd ./server/routes/ && ../../../../../node_modules/.bin/apidoc --parse-workers apischema=./apidoc_scripts/target/schema_worker.js --parse-parsers apischema=./apidoc_scripts/target/schema_parser.js --parse-filters apiversion=./apidoc_scripts/target/version_filter.js -i . -o ../routes_doc && ../../../../../node_modules/.bin/apidoc-markdown -p ../routes_doc -o ../routes_doc/ML_API.mdx --header ./apidoc_scripts/header.md --template ./apidoc_scripts/template.md"
"apiDocs": "yarn build:apiDocScripts && yarn generateHeader && cd ./server/routes/ && ../../../../../node_modules/.bin/apidoc-markdown --parse-workers apischema=./apidoc_scripts/target/schema_worker.js --parse-parsers apischema=./apidoc_scripts/target/schema_parser.js --parse-filters apiversion=./apidoc_scripts/target/version_filter.js -i . -o ../routes_doc/ML_API.mdx --header ./apidoc_scripts/header.md --template ./apidoc_scripts/template.md"
}
}
3 changes: 1 addition & 2 deletions x-pack/plugins/ml/server/routes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

This folder contains ML API routes in Kibana.

Each route handler requires [apiDoc](https://github.com/apidoc/apidoc) annotations in order
Each route handler requires [apidoc-markdown](https://github.com/apidoc/apidoc-markdown) annotations in order
to generate documentation.
The [apidoc-markdown](https://github.com/rigwild/apidoc-markdown) package is also required in order to generate the markdown.

There are custom parser and worker (`x-pack/plugins/ml/server/routes/apidoc_scripts`) to process api schemas for each documentation entry. It's written with typescript so make sure all the scripts in the folder are compiled before executing `apidoc` command.

Expand Down
16 changes: 0 additions & 16 deletions x-pack/plugins/transform/server/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# Transform Kibana API routes

This folder contains Transform API routes in Kibana.

Each route handler requires [apiDoc](https://github.com/apidoc/apidoc) annotations in order
to generate documentation.
The [apidoc-markdown](https://github.com/rigwild/apidoc-markdown) package is also required in order to generate the markdown.

There are custom parser and worker (`x-pack/plugins/transform/server/routes/apidoc_scripts`) to process api schemas for each documentation entry. It's written with typescript so make sure all the scripts in the folder are compiled before executing `apidoc` command.

Make sure you have run `yarn kbn bootstrap` to get all requires dev dependencies. Then execute the following command from the transform plugin folder:
```
yarn run apiDocs
```
It compiles all the required scripts and generates the documentation both in HTML and Markdown formats.


It will create a new directory `routes_doc` (next to the `routes` folder) which contains the documentation in HTML format
as well as `Transform_API.md` file.
Loading

0 comments on commit 47ad5ed

Please sign in to comment.