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
This commit is contained in:
Tania
2023-02-10 06:40:50 -05:00
committed by GitHub
parent 7f6a1c06a6
commit f0333ac41f
11 changed files with 131 additions and 45 deletions
@@ -16,14 +16,14 @@ A standalone panel
| Property | Type | Required | Description |
|-----------------|-------------------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------|
| `model` | [object](#model) | **Yes** | TODO: should be the same panel schema defined in dashboard<br/>Typescript: Omit<Panel, 'gridPos' &#124; 'id' &#124; 'libraryPanel'>; |
| `name` | string | **Yes** | Panel name (also saved in the model) |
| `type` | string | **Yes** | The panel type (from inside the model) |
| `name` | string | **Yes** | Panel name (also saved in the model)<br/>Constraint: `length >=1`. |
| `type` | string | **Yes** | The panel type (from inside the model)<br/>Constraint: `length >=1`. |
| `uid` | string | **Yes** | Library element UID |
| `version` | integer | **Yes** | panel version, incremented each time the dashboard is updated. |
| `description` | string | No | Panel description |
| `folderUid` | string | No | Folder UID |
| `meta` | [LibraryElementDTOMeta](#libraryelementdtometa) | No | |
| `schemaVersion` | integer | No | Dashboard version when this was saved (zero if unknown) |
| `schemaVersion` | uint16 | No | Dashboard version when this was saved (zero if unknown) |
### LibraryElementDTOMeta