Commit Graph

14 Commits

Author SHA1 Message Date
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
Tania
0409cfd116
Docs: Add Default column to generated schema docs (#64550)
Docs: Add  column to generated schema docs
2023-03-22 18:42:28 +01:00
Kristin Laemmert
8745d7ef1b
extract kindsys to external library (#64562)
* extract kindsys

* reinstate kindsys report

This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)

I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.

Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.

* kindsysreport in codeowners
2023-03-15 12:04:28 -04:00
Tania
40ba848bf5
Codegen: Render disjunctions in docs (#63590)
* Codegen: Render disjunctions in docs

* Fix references

* Regenerate docs
2023-03-03 17:48:25 +01:00
Tania
f0333ac41f
Codegen: Render constraints in generated docs (#63196)
* Add constraints rendering

* Generate docs

* Fix constraint format

* Add type alias

* Compare numbers as strings

* fixup! Compare numbers as strings

* Add missing return
2023-02-10 06:40:50 -05:00
Tania
25756b49a3
Codegen: Remove duplicated sections from generated docs (#62965)
* Remove duplicated sections

* Regenerate docs

* Refactor schema.sections func (#63079)

* Refactor schema.sections func

* Small refactors

---------

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2023-02-08 06:07:00 -05:00
Robert Horvath
0fcc864bbb
Docs: Add Schema maturity docs (#61963)
* Docs: Add Schema maturity docs

* Remove 'which category' section from maturity.md

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Remove Maturity process guides from maturity.md

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Remove Defaults and Field optionality from maturity.md

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Remove MaybeRemove section from maturity.md

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Remove Milestone 3 and 4 from maturity.md

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Rearrange schema maturity docs

* Regenerate schema docs after merge with main

* Update Maturity docs headers, keep single h1

* Update wording in Schema docs

Co-authored-by: Tania <yalyna.ts@gmail.com>

* Regenerate docs after merge with main

---------

Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Tania <yalyna.ts@gmail.com>
2023-02-07 11:02:05 +01:00
Joan López de la Franca Beltran
19ed9181e1
Kindsys: Extend DocsJenny with support for 'allOf' (#62558)
* Kindsys: Extend DocsJenny with support for 'allOf'

* Update generated docs

* Multiple refinements

* Minor fixes

* Undo undesired changes

* Fix

* Fix linter complains

---------

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2023-02-02 16:12:31 +01:00
Tania
3c01ae2c9e
Docs: Render map type fields in generated docs (#62022)
* Render map type in docs

* Generate

* Clenaup rendering properties

* Minor updates

* Update maps rendering
2023-02-02 13:02:29 +01:00
sam boyer
30b4205521
Kindsys: Replace DefForGen with kindsys.Kind (#62642)
* Kindsys: Replace DeclForGen with kindsys.Kind

DeclForGen was always unnecessary - it just wasn't obvious on initial
implementation, when we were focused on generating unique types for each
core kind. This removes it, considerably simplifying interactions with
kindsys - virtually everything now just relies on kindsys.Kind and its
derived interfaces.

* Removed unused jenny

* Rename params in jennies
2023-01-31 19:40:15 -05:00
sam boyer
dbe2f0c8f6
Kindsys: Replace "Declaration" with "Definition" (#62515)
* s/Declaration/Definition/g

* s/DeclForGen/DefForGen/g

* Rename some local vars
2023-01-31 09:50:08 +00:00
Denis Limarev
812c90ec69
Perfomance: Add preallocation for some slices (#61632) 2023-01-23 17:44:27 +01:00
Tania
5f93e67419
Codegen: Generate docs for composable kinds (#61719)
* Generate docs for composable kinds

* Fix getting the kind schema

* Generate composable kinds docs

* Add disclaimer to the generated docs

* Change docs disclaimer
2023-01-22 18:58:49 -05:00
Tania
045a12047f
Codegen: Generate per-kind reference docs (#60416)
* Add docs generator

* Add json-to-md conversion

* Fix lint issues

* Remove check for kind type

* Disable prettier for generated docs

* Use schema ref names as identifiers for links & headers

* Display the default value (if so) in the description

* Undo 'draft:false' introduced by mistake

* Update pkg/codegen/jenny_docs.go

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Undraft and unlist kinds documentation  (#61476)

* Support running containers without root daemon

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use section shortcode to automatically list child pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Undraft and unlist kinds documentation

This page and child pages are directly accessible but are not listed
in the table of contents.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add docs-preview to browse drafted pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Replace end of line and pipe characters in table codegen

* Remove draft status from generated docs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Robert Horvath <robert.horvath@grafana.com>
2023-01-16 13:55:40 +01:00