From b564769a0f91bb5e205b3c1314fc530aa78fc31a Mon Sep 17 00:00:00 2001 From: Michael Benavidez Date: Fri, 14 Feb 2020 10:16:17 -0800 Subject: [PATCH] Pipeline Api Website Generation (#1656) * Update README.md * Update README.md Recommended revisions. * Update README.md * Update README.md --- gen-api-reference/README.md | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gen-api-reference/README.md b/gen-api-reference/README.md index 8ac931e6f1..799f2feda0 100644 --- a/gen-api-reference/README.md +++ b/gen-api-reference/README.md @@ -38,3 +38,42 @@ at the root of the repo, and that your GOPATH is set properly. For example: 1. Run `git diff` to verify the changes. 1. Create a PR to merge your changes. + +# Generating the Pipelines API Reference Page + +Use these instructions to generate an updated copy of the [Pipelines API Reference](https://www.kubeflow.org/docs/pipelines/reference/api/kubeflow-pipeline-api-spec/). + +## Prerequisites +* Clone the [kubeflow/pipelines](https://github.com/kubeflow/pipelines) repository. +* Install [npm](https://www.npmjs.com/get-npm). +* Install [bootprint](https://github.com/bootprint/bootprint-openapi) and [html-inline](https://github.com/substack/html-inline) using the following command. + + ``` + npm install -g bootprint + npm install -g bootprint-openapi + npm install -g html-inline + ``` + +## Usage + +1. Run the following command to generate the updated documentation. + + ``` + bootprint openapi + ``` + For example: + + ``` + bootprint openapi C:\path\to\pipelines\backend\api\swagger\kfp_api_single_file.swagger.json C:\path\to\target\directory + ``` +1. From the target directory, run the following command to combine the html and css files, naming the output file `kubeflow-pipeline-api-spec.html`. + + ``` + html-inline -i -o + ``` + For example: + + ``` + html-inline -i index.html -o kubeflow-pipeline-api-spec.html + ``` +1. In a fork of the kubeflow/website repository, overwrite `content/docs/pipelines/reference/api/kubeflow-pipeline-api-spec.html` with the new copy and submit a pull request. Refer to the [kubeflow/website readme](https://github.com/kubeflow/website/blob/master/README.md) for more detailed instructions.