Skip to content

Commit

Permalink
Pipeline Api Website Generation (kubeflow#1656)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README.md

Recommended revisions.

* Update README.md

* Update README.md
  • Loading branch information
OfficePop authored Feb 14, 2020
1 parent c3ef19c commit b564769
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions gen-api-reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <swagger file> <target directory>
```
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 <input file> -o <output file>
```
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.

0 comments on commit b564769

Please sign in to comment.