kubernetes-sigs / gateway-api

Repository for the next iteration of composite service (e.g. Ingress) and load balancing APIs.
https://gateway-api.sigs.k8s.io
Apache License 2.0
1.85k stars 480 forks source link

Docs: examples missing whitespace #2555

Open therealmitchconnors opened 1 year ago

therealmitchconnors commented 1 year ago

Many or all of the examples on https://gateway-api.sigs.k8s.io/reference/spec/ are missing leading whitespace on every line. For instance, the example under https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRouteRule appears as:

matches:
- path:
value: "/foo"
headers:
- name: "version"
value: "v2"
- path:
value: "/v2/foo"

but I think it's meant to be

matches:
- path:
    value: "/foo"
  headers:
  - name: "version"
    value: "v2"
- path:
  value: "/v2/foo"
therealmitchconnors commented 1 year ago

btw, this is using Chrome 118.0.5993.117 on OSX 13 if that helps.

murthy95 commented 1 year ago

/assign

kundan2707 commented 1 year ago

/kind documentation

kundan2707 commented 1 year ago

/triage accepted

kundan2707 commented 11 months ago

@murthy95 are you working on it ? if not i can push changes for this.

murthy95 commented 11 months ago

@kundan2707 please push your changes.

kundan2707 commented 11 months ago

/assign

sanjaypujare commented 11 months ago

When is this expected to be fixed? The bad yaml is very confusing so it will be good to get it fixed soon

kundan2707 commented 10 months ago

it seems its issue with doc generation. otherwise there is no issue.

sanjaypujare commented 10 months ago

it seems its issue with doc generation. otherwise there is no issue.

Yes, I understand. But most people see the generated doc and not the original type definitions so it will be good to fix the tooling

robscott commented 10 months ago

Looking through old issues, it looks like https://github.com/kubernetes-sigs/gateway-api/issues/1458 is covering the same thing, will close that one out in favor of this.

I've mentioned this in Slack before but apparently never on GitHub. I believe the issue here is with the tool we're using to generate CRD Reference docs (https://github.com/ahmetb/gen-crd-api-reference-docs). It's possible that moving to a more recently maintained tool like https://github.com/elastic/crd-ref-docs would either fix the issue or enable us to merge a fix into the upstream tool.

@kundan2707 are you still interested in working on this?

kundan2707 commented 10 months ago

@robscott yes i will work on it to fix it.

robscott commented 10 months ago

Thanks @kundan2707!