Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API build and generate 0.19 API docs #3043

Merged
merged 9 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions docs/reference/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ The API source files are located at:

- [Serving API](./serving.md)
- [Eventing API](./eventing/eventing.md)
- [Eventing-contrib resources API](./eventing/eventing-contrib.md)

## Updating API Reference docs (for Knative maintainers)

Expand Down Expand Up @@ -57,7 +56,6 @@ To generate a version of the API:

- [Serving](https://github.com/knative/serving/releases/)
- [Eventing](https://github.com/knative/eventing/releases/)
- [Eventing-contrib resources](https://github.com/knative/eventing-contrib/releases/)

1. To run the `gen-api-reference-docs.sh` command from the `hack` directory, you
specify the commits or tags for each of the corresponding Knative component
Expand All @@ -68,7 +66,6 @@ To generate a version of the API:

KNATIVE_SERVING_COMMIT=[commit_or_tag] \
KNATIVE_EVENTING_COMMIT=[commit_or_tag] \
KNATIVE_EVENTING_CONTRIB_COMMIT=[commit_or_tag] \
./gen-api-reference-docs.sh
```

Expand All @@ -82,6 +79,25 @@ To generate a version of the API:
After a successful build, the tool automatically opens that folder in the
`tmp` directory.

If the script fails, there are a couple possible causes.

* If you get the
`F1116 15:21:23.549503 63473 main.go:129] no API packages found in ./pkg/apis`
error, check if a new version of the script is available:
https://github.com/ahmetb/gen-crd-api-reference-docs/tags

The script is kept up-to-date with changes that go into the Kubernetes API.
As Knative adds support for those APIs, you might need to make sure the
corresponding
[script `gen-crd-api-reference-docs` version](https://github.com/knative/docs/blob/master/hack/gen-api-reference-docs.sh#L26)
is used.

* If you get the
`F0807 13:58:20.621526 168834 main.go:444] type invalid type has kind=Unsupported which is unhandled`
error, the import target might have moved. There might be other causes for that error but view
[#2054](https://github.com/knative/docs/pull/2054) (and the linked Issues) for details about how we handled that error
in the past.

1. Copy the generated API files into the `docs/reference` directory of your
knative/docs clone.

Expand All @@ -107,6 +123,5 @@ v0.18.0 API source files:
```
KNATIVE_SERVING_COMMIT=v0.18.0 \
KNATIVE_EVENTING_COMMIT=v0.18.0 \
KNATIVE_EVENTING_CONTRIB_COMMIT=v0.18.0 \
./gen-api-reference-docs.sh
```
10 changes: 0 additions & 10 deletions docs/reference/api/eventing/eventing-contrib-api.md

This file was deleted.

Loading