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

Code blocks not rendered properly in API Documentation (Quantity) #35712

Open
Jefftree opened this issue Aug 4, 2022 · 18 comments
Open

Code blocks not rendered properly in API Documentation (Quantity) #35712

Jefftree opened this issue Aug 4, 2022 · 18 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Jefftree
Copy link
Member

Jefftree commented Aug 4, 2022

This is a Bug Report

Problem: Code blocks not rendered properly in documentation

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#quantity-resource-core

The Quantity description has a code block embedded in the code https://github.com/kubernetes/kubernetes/blob/3ffdfbe286ebcea5d75617da6accaf67f815e0cf/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json#L177

(This is the same as what is provided in the swagger.json. The swagger.json file wasn't able to be linked because it's too large for Github's code search)

This is not being rendered properly and is just dumped on one line in the documentation

Proposed Solution: I haven't really looked into the code, is this something that can be fixed in the Markdown rendering?

Page to Update:
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#quantity-resource-core

^ Docs for future k8s versions

@Jefftree Jefftree added the kind/bug Categorizes issue or PR as related to a bug. label Aug 4, 2022
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 4, 2022
@sftim
Copy link
Contributor

sftim commented Aug 4, 2022

/remove-kind bug

/kind feature

We see reference doc generation as best-effort. There's definitely room for improvement.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Aug 4, 2022
@RA489
Copy link

RA489 commented Aug 15, 2022

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 15, 2022
@sftim
Copy link
Contributor

sftim commented Sep 21, 2022

Duplicated by #36947

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 20, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 19, 2023
@Jefftree
Copy link
Member Author

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 19, 2023
@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jan 20, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 19, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 19, 2024
@sftim
Copy link
Contributor

sftim commented May 21, 2024

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label May 21, 2024
@sftim
Copy link
Contributor

sftim commented May 21, 2024

@sftim
Copy link
Contributor

sftim commented May 21, 2024

How I'd like this fixed:

  • define and use a convention in the Go source code to mark when comments are Markdown
    I learned that OpenAPI description is always Markdown
  • publish Markdown for the field descriptions using an extension
    I learned that OpenAPI description is always Markdown
  • render the Markdown description to plain text for the description OpenAPI field
    I learned that OpenAPI description is always Markdown
  • update the reference documentation generator to use the Markdown, not the plain text with heuristics

We should either:

  • convert all the source code to use Markdown in comments that could become an OpenAPI description
  • convert all the source code to a different in comments that could become an OpenAPI description, and implement a translation layer that produces Markdown (CommonMark)

Optionally, also:

  • lint the hypertext embedded within k/k source code

@sftim
Copy link
Contributor

sftim commented May 21, 2024

Also see kubernetes-sigs/reference-docs#293

@sftim
Copy link
Contributor

sftim commented May 21, 2024

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 21, 2024
@sftim
Copy link
Contributor

sftim commented Jun 12, 2024

/remove-kind feature
/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Jun 12, 2024
@sftim
Copy link
Contributor

sftim commented Jul 3, 2024

Duplicated by #47070

@robert-cronin
Copy link
Contributor

I have a couple of ideas for a potential fix for this issue if no one has picked it up yet.
/assign

@sftim
Copy link
Contributor

sftim commented Oct 20, 2024

Help is (still) welcome. It may be that most of the work is around getting the OpenAPI to contain the right Markdown, and then the docs generation becomes relatively easy.

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. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

6 participants