From 352381c6c6a26cb568ee0c254664947a513ff442 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Wed, 18 Feb 2026 12:45:33 -0300 Subject: [PATCH] update to latest tauri feat/cef (schemars v1) --- Cargo.lock | 473 +++++++++++++++--- Cargo.toml | 7 +- .../autostart/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../biometric/permissions/schemas/schema.json | 112 ++--- plugins/cli/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../deep-link/permissions/schemas/schema.json | 112 ++--- .../dialog/permissions/schemas/schema.json | 112 ++--- plugins/fs/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../haptics/permissions/schemas/schema.json | 112 ++--- plugins/http/permissions/schemas/schema.json | 112 ++--- plugins/log/permissions/schemas/schema.json | 112 ++--- plugins/nfc/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../opener/permissions/schemas/schema.json | 112 ++--- plugins/os/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../process/permissions/schemas/schema.json | 112 ++--- plugins/shell/permissions/schemas/schema.json | 112 ++--- plugins/sql/permissions/schemas/schema.json | 112 ++--- plugins/store/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- .../updater/permissions/schemas/schema.json | 112 ++--- .../upload/permissions/schemas/schema.json | 112 ++--- .../websocket/permissions/schemas/schema.json | 112 ++--- .../permissions/schemas/schema.json | 112 ++--- 29 files changed, 1637 insertions(+), 1867 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 291c2a3c..9088a3c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,7 +213,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-barcode-scanner", "tauri-plugin-biometric", "tauri-plugin-cli", @@ -246,7 +246,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-updater", "time", "tiny_http", @@ -259,7 +259,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-updater", "tiny_http", ] @@ -271,7 +271,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-store", ] @@ -817,6 +817,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bzip2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" +dependencies = [ + "libbz2-rs-sys", +] + [[package]] name = "cairo-rs" version = "0.18.5" @@ -886,15 +895,40 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.19" +version = "1.2.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", ] +[[package]] +name = "cef" +version = "144.1.0+144.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd219b8919445d9a848015e0c3d50fd6b89f5521e711e956aa13f7f6f52992eb" +dependencies = [ + "cef-dll-sys", + "libloading 0.9.0", + "objc2 0.6.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "cef-dll-sys" +version = "144.1.0+144.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb6189602922e778b99ffc8a8635e696b1417457be3270fd53831eb30bb4843" +dependencies = [ + "anyhow", + "cmake", + "download-cef", + "serde_json", +] + [[package]] name = "cesu8" version = "1.1.0" @@ -968,7 +1002,7 @@ dependencies = [ "iana-time-zone", "num-traits", "serde", - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -995,6 +1029,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04" dependencies = [ "clap_builder", + "clap_derive", ] [[package]] @@ -1009,6 +1044,18 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_derive" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "clap_lex" version = "0.7.4" @@ -1024,6 +1071,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + [[package]] name = "color-backtrace" version = "0.7.0" @@ -1069,6 +1125,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.61.2", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -1142,6 +1211,24 @@ dependencies = [ "url", ] +[[package]] +name = "cookie_store" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc4bff745c9b4c7fb1e97b25d13153da2bc7796260141df62378998d070207f" +dependencies = [ + "cookie", + "document-features", + "idna", + "indexmap 2.9.0", + "log", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1421,7 +1508,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-deep-link", "tauri-plugin-log", "tauri-plugin-single-instance", @@ -1484,6 +1571,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "dioxus-debug-cell" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea539174bb236e0e7dc9c12b19b88eae3cb574dedbd0252a2d43ea7e6de13e2" + [[package]] name = "dirs" version = "4.0.0" @@ -1581,7 +1674,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading", + "libloading 0.7.4", ] [[package]] @@ -1637,6 +1730,25 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "download-cef" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6002a6b95f9f3bbe5693ac02a03221a8e3af6c9f5f4539f5734a8d6cde1a3616" +dependencies = [ + "bzip2", + "clap", + "indicatif", + "regex", + "semver", + "serde", + "serde_json", + "sha1_smol", + "tar", + "thiserror 2.0.12", + "ureq 3.2.0", +] + [[package]] name = "dpi" version = "0.1.1" @@ -1759,6 +1871,12 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -1941,6 +2059,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "fixedbitset" version = "0.4.2" @@ -2751,7 +2875,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots", + "webpki-roots 0.26.8", ] [[package]] @@ -3008,6 +3132,19 @@ dependencies = [ "serde", ] +[[package]] +name = "indicatif" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" +dependencies = [ + "console", + "portable-atomic", + "unicode-width", + "unit-prefix", + "web-time", +] + [[package]] name = "infer" version = "0.19.0" @@ -3330,10 +3467,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", - "libloading", + "libloading 0.7.4", "once_cell", ] +[[package]] +name = "libbz2-rs-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" + [[package]] name = "libc" version = "0.2.180" @@ -3374,6 +3517,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + [[package]] name = "libm" version = "0.2.11" @@ -3403,7 +3556,7 @@ dependencies = [ "minisign-verify", "pkg-config", "tar", - "ureq", + "ureq 2.12.1", "vcpkg", "zip 2.6.1", ] @@ -4622,6 +4775,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + [[package]] name = "powerfmt" version = "0.2.0" @@ -5004,6 +5163,26 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "regex" version = "1.11.1" @@ -5052,7 +5231,7 @@ dependencies = [ "base64 0.22.1", "bytes", "cookie", - "cookie_store", + "cookie_store 0.21.1", "encoding_rs", "futures-channel", "futures-core", @@ -5096,7 +5275,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", + "webpki-roots 0.26.8", "windows-registry 0.4.0", ] @@ -5351,6 +5530,7 @@ version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -5486,7 +5666,20 @@ checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "dyn-clone", "indexmap 1.9.3", - "schemars_derive", + "schemars_derive 0.8.22", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "schemars_derive 1.2.1", "serde", "serde_json", "url", @@ -5505,6 +5698,18 @@ dependencies = [ "syn 2.0.100", ] +[[package]] +name = "schemars_derive" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.100", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -5669,6 +5874,7 @@ version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ + "indexmap 2.9.0", "itoa", "memchr", "ryu", @@ -5789,6 +5995,12 @@ dependencies = [ "digest", ] +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + [[package]] name = "sha2" version = "0.10.8" @@ -5860,7 +6072,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-cli", "tauri-plugin-single-instance", ] @@ -5905,6 +6117,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socks" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" +dependencies = [ + "byteorder", + "libc", + "winapi", +] + [[package]] name = "softbuffer" version = "0.4.6" @@ -6043,7 +6266,7 @@ dependencies = [ "tracing", "url", "uuid", - "webpki-roots", + "webpki-roots 0.26.8", ] [[package]] @@ -6484,9 +6707,8 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19299a5f2ccb6bcb2a38b1eb7999e8bbdbd5bdd3cf74a4f8ab412726cbd65e7" +version = "2.10.2" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" dependencies = [ "anyhow", "bytes", @@ -6521,9 +6743,10 @@ dependencies = [ "serialize-to-javascript", "specta", "swift-rs", - "tauri-build", + "tauri-build 2.5.5", "tauri-macros", "tauri-runtime", + "tauri-runtime-cef", "tauri-runtime-wry", "tauri-utils", "thiserror 2.0.12", @@ -6550,11 +6773,32 @@ dependencies = [ "heck 0.5.0", "json-patch", "quote", - "schemars", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-codegen 2.5.3", + "tauri-utils", + "tauri-winres", + "toml 0.9.5", + "walkdir", +] + +[[package]] +name = "tauri-build" +version = "2.5.5" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs 6.0.0", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 1.2.1", "semver", "serde", "serde_json", - "tauri-codegen", "tauri-utils", "tauri-winres", "toml 0.9.5", @@ -6587,30 +6831,53 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tauri-codegen" +version = "2.5.4" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" +dependencies = [ + "base64 0.22.1", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.100", + "tauri-utils", + "thiserror 2.0.12", + "time", + "url", + "uuid", + "walkdir", +] + [[package]] name = "tauri-macros" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1119f651b0187c686c0fc72c66bba311e560e1b5f61869086ce788d43be6cf41" +version = "2.5.4" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.100", - "tauri-codegen", + "tauri-codegen 2.5.4", "tauri-utils", ] [[package]] name = "tauri-plugin" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692a77abd8b8773e107a42ec0e05b767b8d2b7ece76ab36c6c3947e34df9f53f" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" dependencies = [ "anyhow", "glob", "plist", - "schemars", + "schemars 1.2.1", "serde", "serde_json", "tauri-utils", @@ -6726,7 +6993,7 @@ dependencies = [ "notify", "notify-debouncer-full", "percent-encoding", - "schemars", + "schemars 1.2.1", "serde", "serde_json", "serde_repr", @@ -6782,12 +7049,12 @@ name = "tauri-plugin-http" version = "2.5.7" dependencies = [ "bytes", - "cookie_store", + "cookie_store 0.21.1", "data-url", "http", "regex", "reqwest 0.12.15", - "schemars", + "schemars 1.2.1", "serde", "serde_json", "tauri", @@ -6878,7 +7145,7 @@ dependencies = [ "objc2-app-kit", "objc2-foundation 0.3.0", "open", - "schemars", + "schemars 1.2.1", "serde", "serde_json", "tauri", @@ -6949,7 +7216,7 @@ dependencies = [ "open", "os_pipe", "regex", - "schemars", + "schemars 1.2.1", "serde", "serde_json", "shared_child", @@ -7110,8 +7377,7 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b885ffeac82b00f1f6fd292b6e5aabfa7435d537cef57d11e38a489956535651" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" dependencies = [ "cookie", "dpi", @@ -7120,23 +7386,47 @@ dependencies = [ "jni", "objc2 0.6.3", "objc2-ui-kit", - "objc2-web-kit", "raw-window-handle", "serde", "serde_json", "tauri-utils", "thiserror 2.0.12", "url", - "webkit2gtk", - "webview2-com", "windows 0.61.1", ] +[[package]] +name = "tauri-runtime-cef" +version = "0.1.0" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" +dependencies = [ + "base64 0.22.1", + "cef", + "cef-dll-sys", + "dioxus-debug-cell", + "dirs 6.0.0", + "gtk", + "html5ever", + "http", + "kuchikiki", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-foundation 0.3.0", + "raw-window-handle", + "serde", + "serde_json", + "sha2", + "tauri-runtime", + "tauri-utils", + "url", + "windows 0.61.1", + "x11-dl", +] + [[package]] name = "tauri-runtime-wry" version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5204682391625e867d16584fedc83fc292fb998814c9f7918605c789cd876314" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" dependencies = [ "gtk", "http", @@ -7145,6 +7435,7 @@ dependencies = [ "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.0", + "objc2-web-kit", "once_cell", "percent-encoding", "raw-window-handle", @@ -7162,8 +7453,7 @@ dependencies = [ [[package]] name = "tauri-utils" version = "2.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcd169fccdff05eff2c1033210b9b94acd07a47e6fa9a3431cf09cfd4f01c87e" +source = "git+https://github.com/tauri-apps/tauri.git?branch=feat/cef#8f71640250102f0456de3fb13329cb7584d83c63" dependencies = [ "aes-gcm", "anyhow", @@ -7183,7 +7473,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "schemars", + "schemars 1.2.1", "semver", "serde", "serde-untagged", @@ -7473,7 +7763,7 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tungstenite", - "webpki-roots", + "webpki-roots 0.26.8", ] [[package]] @@ -7831,6 +8121,18 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" + [[package]] name = "universal-hash" version = "0.5.1" @@ -7854,7 +8156,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-updater", "time", "tiny_http", @@ -7872,6 +8174,39 @@ dependencies = [ "url", ] +[[package]] +name = "ureq" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc97a28575b85cfedf2a7e7d3cc64b3e11bd8ac766666318003abbacc7a21fc" +dependencies = [ + "base64 0.22.1", + "cookie_store 0.22.0", + "flate2", + "log", + "percent-encoding", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "socks", + "ureq-proto", + "utf-8", + "webpki-roots 1.0.6", +] + +[[package]] +name = "ureq-proto" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" +dependencies = [ + "base64 0.22.1", + "http", + "httparse", + "log", +] + [[package]] name = "url" version = "2.5.4" @@ -8282,6 +8617,15 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webpki-roots" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "websocket-example" version = "0.1.0" @@ -8290,7 +8634,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.5.4", "tauri-plugin-websocket", "tokio", "tokio-tungstenite", @@ -8426,7 +8770,7 @@ dependencies = [ "windows-collections", "windows-core", "windows-future", - "windows-link", + "windows-link 0.1.1", "windows-numerics", ] @@ -8447,7 +8791,7 @@ checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.1", "windows-result", "windows-strings 0.4.0", ] @@ -8459,7 +8803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32" dependencies = [ "windows-core", - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -8490,6 +8834,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-numerics" version = "0.2.0" @@ -8497,7 +8847,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ "windows-core", - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -8517,7 +8867,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1da3e436dc7653dfdf3da67332e22bff09bb0e28b0239e1624499c7830842e" dependencies = [ - "windows-link", + "windows-link 0.1.1", "windows-result", "windows-strings 0.4.0", ] @@ -8528,7 +8878,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -8537,7 +8887,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -8546,7 +8896,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -8594,6 +8944,15 @@ dependencies = [ "windows-targets 0.53.2", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -8662,7 +9021,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04a5c6627e310a23ad2358483286c7df260c964eb2d003d8efd6d0f4e79265c" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 87fc448c..8e722e6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ tauri-utils = "2.8" serde_json = "1" thiserror = "2" url = "2" -schemars = "0.8" +schemars = "1" dunce = "1" specta = "^2.0.0-rc.16" glob = "0.3" @@ -39,3 +39,8 @@ codegen-units = 1 lto = true incremental = false opt-level = "s" + +[patch.crates-io] +tauri = { git = "https://github.com/tauri-apps/tauri.git", branch = "feat/cef" } +tauri-utils = { git = "https://github.com/tauri-apps/tauri.git", branch = "feat/cef" } +tauri-plugin = { git = "https://github.com/tauri-apps/tauri.git", branch = "feat/cef" } diff --git a/plugins/autostart/permissions/schemas/schema.json b/plugins/autostart/permissions/schemas/schema.json index af681221..594e4218 100644 --- a/plugins/autostart/permissions/schemas/schema.json +++ b/plugins/autostart/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/barcode-scanner/permissions/schemas/schema.json b/plugins/barcode-scanner/permissions/schemas/schema.json index 69fb0d5d..c95ce2a7 100644 --- a/plugins/barcode-scanner/permissions/schemas/schema.json +++ b/plugins/barcode-scanner/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/biometric/permissions/schemas/schema.json b/plugins/biometric/permissions/schemas/schema.json index 416759b5..993744ad 100644 --- a/plugins/biometric/permissions/schemas/schema.json +++ b/plugins/biometric/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/cli/permissions/schemas/schema.json b/plugins/cli/permissions/schemas/schema.json index 45941514..72189483 100644 --- a/plugins/cli/permissions/schemas/schema.json +++ b/plugins/cli/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/clipboard-manager/permissions/schemas/schema.json b/plugins/clipboard-manager/permissions/schemas/schema.json index 891c6f0d..65c02f50 100644 --- a/plugins/clipboard-manager/permissions/schemas/schema.json +++ b/plugins/clipboard-manager/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/deep-link/permissions/schemas/schema.json b/plugins/deep-link/permissions/schemas/schema.json index c9fc2ceb..2dcd454b 100644 --- a/plugins/deep-link/permissions/schemas/schema.json +++ b/plugins/deep-link/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/dialog/permissions/schemas/schema.json b/plugins/dialog/permissions/schemas/schema.json index b47417ec..6407c3dd 100644 --- a/plugins/dialog/permissions/schemas/schema.json +++ b/plugins/dialog/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/fs/permissions/schemas/schema.json b/plugins/fs/permissions/schemas/schema.json index e1c051f7..f2b042f4 100644 --- a/plugins/fs/permissions/schemas/schema.json +++ b/plugins/fs/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/geolocation/permissions/schemas/schema.json b/plugins/geolocation/permissions/schemas/schema.json index 237b445d..6ac8e2cc 100644 --- a/plugins/geolocation/permissions/schemas/schema.json +++ b/plugins/geolocation/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/global-shortcut/permissions/schemas/schema.json b/plugins/global-shortcut/permissions/schemas/schema.json index 1224869c..e2dd045f 100644 --- a/plugins/global-shortcut/permissions/schemas/schema.json +++ b/plugins/global-shortcut/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/haptics/permissions/schemas/schema.json b/plugins/haptics/permissions/schemas/schema.json index ed217dc4..dbff5c23 100644 --- a/plugins/haptics/permissions/schemas/schema.json +++ b/plugins/haptics/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/http/permissions/schemas/schema.json b/plugins/http/permissions/schemas/schema.json index a6b457b7..9458c3ce 100644 --- a/plugins/http/permissions/schemas/schema.json +++ b/plugins/http/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/log/permissions/schemas/schema.json b/plugins/log/permissions/schemas/schema.json index cfee7e75..06f998e0 100644 --- a/plugins/log/permissions/schemas/schema.json +++ b/plugins/log/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/nfc/permissions/schemas/schema.json b/plugins/nfc/permissions/schemas/schema.json index 8a018e26..bd18de3e 100644 --- a/plugins/nfc/permissions/schemas/schema.json +++ b/plugins/nfc/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/notification/permissions/schemas/schema.json b/plugins/notification/permissions/schemas/schema.json index 26703a8a..7d1cf05b 100644 --- a/plugins/notification/permissions/schemas/schema.json +++ b/plugins/notification/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/opener/permissions/schemas/schema.json b/plugins/opener/permissions/schemas/schema.json index 78c80ba3..69f3d9d9 100644 --- a/plugins/opener/permissions/schemas/schema.json +++ b/plugins/opener/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/os/permissions/schemas/schema.json b/plugins/os/permissions/schemas/schema.json index 36680b44..1fcbb875 100644 --- a/plugins/os/permissions/schemas/schema.json +++ b/plugins/os/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/positioner/permissions/schemas/schema.json b/plugins/positioner/permissions/schemas/schema.json index b0fc760a..82476734 100644 --- a/plugins/positioner/permissions/schemas/schema.json +++ b/plugins/positioner/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/process/permissions/schemas/schema.json b/plugins/process/permissions/schemas/schema.json index 9d68fc63..5ad07640 100644 --- a/plugins/process/permissions/schemas/schema.json +++ b/plugins/process/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/shell/permissions/schemas/schema.json b/plugins/shell/permissions/schemas/schema.json index 9a198981..bad58705 100644 --- a/plugins/shell/permissions/schemas/schema.json +++ b/plugins/shell/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/sql/permissions/schemas/schema.json b/plugins/sql/permissions/schemas/schema.json index 488a953c..58a48732 100644 --- a/plugins/sql/permissions/schemas/schema.json +++ b/plugins/sql/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/store/permissions/schemas/schema.json b/plugins/store/permissions/schemas/schema.json index af475189..5806c074 100644 --- a/plugins/store/permissions/schemas/schema.json +++ b/plugins/store/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/stronghold/permissions/schemas/schema.json b/plugins/stronghold/permissions/schemas/schema.json index 6af87c6a..4ca2c61a 100644 --- a/plugins/stronghold/permissions/schemas/schema.json +++ b/plugins/stronghold/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/updater/permissions/schemas/schema.json b/plugins/updater/permissions/schemas/schema.json index 7f295916..a065aff6 100644 --- a/plugins/updater/permissions/schemas/schema.json +++ b/plugins/updater/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/upload/permissions/schemas/schema.json b/plugins/upload/permissions/schemas/schema.json index 8b524649..8ebd136b 100644 --- a/plugins/upload/permissions/schemas/schema.json +++ b/plugins/upload/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/websocket/permissions/schemas/schema.json b/plugins/websocket/permissions/schemas/schema.json index e0c9a4af..f89e81d1 100644 --- a/plugins/websocket/permissions/schemas/schema.json +++ b/plugins/websocket/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] }, diff --git a/plugins/window-state/permissions/schemas/schema.json b/plugins/window-state/permissions/schemas/schema.json index d9cbe0f0..dc83b348 100644 --- a/plugins/window-state/permissions/schemas/schema.json +++ b/plugins/window-state/permissions/schemas/schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "PermissionFile", "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.", "type": "object", @@ -8,7 +8,7 @@ "description": "The default permission set for the plugin", "anyOf": [ { - "$ref": "#/definitions/DefaultPermission" + "$ref": "#/$defs/DefaultPermission" }, { "type": "null" @@ -19,25 +19,22 @@ "description": "A list of permissions sets defined", "type": "array", "items": { - "$ref": "#/definitions/PermissionSet" + "$ref": "#/$defs/PermissionSet" } }, "permission": { "description": "A list of inlined permissions", - "default": [], "type": "array", "items": { - "$ref": "#/definitions/Permission" - } + "$ref": "#/$defs/Permission" + }, + "default": [] } }, - "definitions": { + "$defs": { "DefaultPermission": { "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "type": "object", - "required": [ - "permissions" - ], "properties": { "version": { "description": "The version of the permission.", @@ -46,10 +43,10 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -62,16 +59,14 @@ "type": "string" } } - } + }, + "required": [ + "permissions" + ] }, "PermissionSet": { "description": "A set of direct permissions grouped together under a new name.", "type": "object", - "required": [ - "description", - "identifier", - "permissions" - ], "properties": { "identifier": { "description": "A unique identifier for the permission.", @@ -85,17 +80,19 @@ "description": "All permissions this set contains.", "type": "array", "items": { - "$ref": "#/definitions/PermissionKind" + "$ref": "#/$defs/PermissionKind" } } - } + }, + "required": [ + "identifier", + "description", + "permissions" + ] }, "Permission": { "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "type": "object", - "required": [ - "identifier" - ], "properties": { "version": { "description": "The version of the permission.", @@ -104,14 +101,14 @@ "null" ], "format": "uint64", - "minimum": 1.0 + "minimum": 1 }, "identifier": { "description": "A unique identifier for the permission.", "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `

` headings in markdown content\nfor Tauri documentation generation purposes.", "type": [ "string", "null" @@ -119,23 +116,15 @@ }, "commands": { "description": "Allowed or denied commands when using this permission.", + "$ref": "#/$defs/Commands", "default": { "allow": [], "deny": [] - }, - "allOf": [ - { - "$ref": "#/definitions/Commands" - } - ] + } }, "scope": { "description": "Allowed or denied scoped when using this permission.", - "allOf": [ - { - "$ref": "#/definitions/Scopes" - } - ] + "$ref": "#/$defs/Scopes" }, "platforms": { "description": "Target platforms this permission applies. By default all platforms are affected by this permission.", @@ -144,10 +133,13 @@ "null" ], "items": { - "$ref": "#/definitions/Target" + "$ref": "#/$defs/Target" } } - } + }, + "required": [ + "identifier" + ] }, "Commands": { "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", @@ -155,24 +147,24 @@ "properties": { "allow": { "description": "Allowed command.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] }, "deny": { "description": "Denied command, which takes priority.", - "default": [], "type": "array", "items": { "type": "string" - } + }, + "default": [] } } }, "Scopes": { - "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", + "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```", "type": "object", "properties": { "allow": { @@ -182,7 +174,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, "deny": { @@ -192,7 +184,7 @@ "null" ], "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } } @@ -210,11 +202,7 @@ }, { "description": "Represents a valid ACL [`Number`].", - "allOf": [ - { - "$ref": "#/definitions/Number" - } - ] + "$ref": "#/$defs/Number" }, { "description": "Represents a [`String`].", @@ -224,14 +212,14 @@ "description": "Represents a list of other [`Value`]s.", "type": "array", "items": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } }, { "description": "Represents a map of [`String`] keys to [`Value`]s.", "type": "object", "additionalProperties": { - "$ref": "#/definitions/Value" + "$ref": "#/$defs/Value" } } ] @@ -257,37 +245,27 @@ { "description": "MacOS.", "type": "string", - "enum": [ - "macOS" - ] + "const": "macOS" }, { "description": "Windows.", "type": "string", - "enum": [ - "windows" - ] + "const": "windows" }, { "description": "Linux.", "type": "string", - "enum": [ - "linux" - ] + "const": "linux" }, { "description": "Android.", "type": "string", - "enum": [ - "android" - ] + "const": "android" }, { "description": "iOS.", "type": "string", - "enum": [ - "iOS" - ] + "const": "iOS" } ] },