Skip to content

Commit

Permalink
JSON Schema Docgen Rework (#63639)
Browse files Browse the repository at this point in the history
* Replace keys with Object.keys

* Update codegen to use entries

* Re-add useRootPaddingAwareAlignments to the docs

* Code readability for markup tables

* Simplify file paths

* Re-add doc comments

* Add dereference options

* Fix doc comments

* Refactor properties markup functions

* Use import JSONSchema type

* Simplify getSectionMarkup

* Fix spacing

* Convert arrow functions to functions

* Update template and template part autogen

* Fix capitalization for patterns property

* Wrap autogen in main function

* Use node:fs/promises

* Use for loops for imperative code

* Simplify formatType

* Simplify properties checks as we can assume a valid JSON schema

* Simplify formatting of properties and types

* Inline table generation

* Create functino for document generation

* Rename and reorganize

* Add settings and styles descriptions

* Remove template type because it should be obvious

* Revamp type gen

* Update type generation

* Rename and refactor functions

* Update JSDoc

* Update comments

* Stringify default value

* Add descriptions for styles and settings

* Fix falsy default values

* Lowercase settings and styles

* Update strings

* Refactor main

* Clarify doc comment

* Add comment for why one line of description

* Update how top-level only settings are selected and rendered

* Select styles directly instead of through definitions

* Update variable names

* Reorder patterns type in docs

Co-authored-by: ajlende <ajlende@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
4 people authored Jul 23, 2024
1 parent ac65268 commit 2bab454
Show file tree
Hide file tree
Showing 2 changed files with 378 additions and 358 deletions.
Loading

0 comments on commit 2bab454

Please sign in to comment.