mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-11-09 00:26:36 +03:00
13a73ab635
Hi! I reduced some of the errors in the daily CI. Still there are a few of them, but at least is something - Added the badge for the `daily.yml` (currently failing) - removed old `docker` from v0.60 - removed old `git` from auto-generate completions - removed `nethack` from auto-generate completions (wasn't very useful) - removed `root` from auto-generate completions (wasn't very useful) - removed `valgrind` from auto-generate completions (wasn't very useful) - moved `less` from auto-generate to custom-completions. - moved `mix` from auto-generate to custom-completions. - moved `tar` from auto-generate to custom-completions. - moved `tcpdump` from auto-generate to custom-completions. - moved `virsh` from auto-generate to custom-completions. - moved `zef` from auto-generate to custom-completions. - fixed `base16.nu` - fixed `from-cpuinfo.nu` - fixed `from-dmicode.nu` - fixed `to-number-format.nu` - fixed `to-json-schema.nu` |
||
---|---|---|
.. | ||
README.md | ||
to-json-schema.nu |
Notes
title
properties are generated from input property names converting all capital letters to lowercase with space before them like:someImportantKey
->some important key
description
properties are generated from input property names converting all capital letters to lowercase with space before them and appended doc urls like:someImportantKey
->some important key\nhttps://some/documentation
type
properties are generated from input property valuesminimum
properties are generated for input properties containingwidth
/height
/size
worddefault
properties are generated for input properties not starting withmy
/sample
/example
wordsexample
properties are generated for input properties starting withmy
/sample
/example
words
Example
Input JSON:
{
"size": "normal",
"myInput": 1,
"width": 21,
"files": ["test.blend", "test.blend"]
}
Output JSON schema:
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "config",
"description": "A config",
"type": "object",
"properties": {
"size": {
"title": "size",
"description": "size\nhttps://my-doc",
"type": "string",
"minimum": 0,
"default": "normal"
},
"myInput": {
"title": "my input",
"description": "my input\nhttps://my-doc",
"type": "number",
"examples": [
1
]
},
"width": {
"title": "width",
"description": "width\nhttps://my-doc",
"type": "number",
"minimum": 0,
"default": 21
},
"files": {
"title": "files",
"description": "files\nhttps://my-doc",
"type": "array",
"uniqueItems": true,
"items": {
"description": "A file\nhttps://my-doc",
"type": "string"
},
"default": [
"test.blend",
"test.blend"
]
}
}
}