elastic / crd-ref-docs

Generates Kubernetes CRD API reference documentation
Apache License 2.0
103 stars 53 forks source link

fix: parse standalone types correctly #47

Closed tenstad closed 1 year ago

tenstad commented 1 year ago

Standalone types was previously only parsed correctly if part of a struct, and parsed as a struct field.

Without the processor change, moving Rating to the top causes the following diff:

ERROR: outputs differ

| *`rating`* __xref:{anchor_prefix}-github-com-elastic-crd-re | | *`rating`* __Rating__ | Rating provided by the guest
                                                              <
                                                              <
                                                              <
[id="{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-r <
==== Rating (string)                                          <
                                                              <
Rating is the rating provided by a guest.                     <
                                                              <
.Appears In:                                                  <
****                                                          <
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1 <
****                                                          <
thbkrkr commented 1 year ago

Thank you very much!