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

gen-api-reference-docs API docs build script limitations #1559

Closed
RichieEscarez opened this issue Jun 28, 2019 · 2 comments · Fixed by #1561 or knative/eventing-contrib#480
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@RichieEscarez
Copy link
Contributor

RichieEscarez commented Jun 28, 2019

The https://github.com/knative/docs/blob/master/hack/gen-api-reference-docs.sh API docs build script currently has the following issues:

(1)
The HTML output is incorrectly picking up a closing parenthesis from the API comment:
https://github.com/knative/eventing-contrib/blob/9d20f1c0ceeffd937d70d77abbea8bb1df3c32f3/contrib/gcppubsub/pkg/apis/sources/v1alpha1/gcp_pubsub_types.go#L58

The 404 is caused by a closing parenthesis ):
image

(2)
Some Packages are duplicated or appear to be duplicated (lack version qualifier):

image

image

Manual changes that are currently required in the HTML output:

eventing-contrib-resources.md:

  • remove duplicate Packages links
  • remove duplicate section titles
  • consolidate Resource Types into single list
    image
    Example of removing the duplicate section titles and moving the Resource Types into the consolidated list:
    image

serving.md:

  • Qualify v1alpha1 vs v1beta1
    • fix Packages list
    • fix link IDs
    • fix Section titles
      image
      image
      image
@RichieEscarez RichieEscarez added the kind/bug Categorizes issue or PR as related to a bug. label Jun 28, 2019
@ahmetb
Copy link
Contributor

ahmetb commented Jun 28, 2019

@RichieEscarez going forward it would be ideal to create these issues on the tool's repo (or in both places).

Looks like we can't fix the closing parents included in the links. ahmetb/gen-crd-api-reference-docs#8 I recommend adding a space before them in the code. Feel free to make the PRs. I suspect it's not a big issue.

ahmetb added a commit to ahmetb/docs that referenced this issue Jun 29, 2019
This bumps the `gen-crd-api-reference-docs` to v0.1.5 which has two notable
fixes impacting Knative:

1. Prevent types in same apiGroup but different apiVersion (e.g v1beta1 vs
   v1alpha1) from grouped together.
2. De-duplicate the apiGroups list when types belonging to that api group come
   from different Go packages.

Fixes knative#1559.

Signed-off-by: Ahmet Alp Balkan <[email protected]>
knative-prow-robot pushed a commit that referenced this issue Jul 1, 2019
This bumps the `gen-crd-api-reference-docs` to v0.1.5 which has two notable
fixes impacting Knative:

1. Prevent types in same apiGroup but different apiVersion (e.g v1beta1 vs
   v1alpha1) from grouped together.
2. De-duplicate the apiGroups list when types belonging to that api group come
   from different Go packages.

Fixes #1559.

Signed-off-by: Ahmet Alp Balkan <[email protected]>
@RichieEscarez
Copy link
Contributor Author

Parenthesis issue is tracked in ahmetb/gen-crd-api-reference-docs#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
2 participants