From f1b22763a188ec3378e5faac1f7ac09e7351fe35 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 17 Oct 2023 17:43:23 +0000 Subject: [PATCH] docs: fix jsonschema Signed-off-by: Carlos Alexandro Becker --- nfpm.go | 2 +- www/docs/static/schema.json | 72 +++++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/nfpm.go b/nfpm.go index cf4d8e99..ca374461 100644 --- a/nfpm.go +++ b/nfpm.go @@ -323,7 +323,7 @@ type Overridables struct { Suggests []string `yaml:"suggests,omitempty" json:"suggests,omitempty" jsonschema:"title=suggests directive,example=nfpm"` Conflicts []string `yaml:"conflicts,omitempty" json:"conflicts,omitempty" jsonschema:"title=conflicts directive,example=nfpm"` Contents files.Contents `yaml:"contents,omitempty" json:"contents,omitempty" jsonschema:"title=files to add to the package"` - Umask os.FileMode `yaml:"umask,omitempty" json:"umask,omitempty" jsonschema:"title=umask for file contents,example=002"` + Umask os.FileMode `yaml:"umask,omitempty" json:"umask,omitempty" jsonschema:"title=umask for file contents,example=112"` Scripts Scripts `yaml:"scripts,omitempty" json:"scripts,omitempty" jsonschema:"title=scripts to execute"` RPM RPM `yaml:"rpm,omitempty" json:"rpm,omitempty" jsonschema:"title=rpm-specific settings"` Deb Deb `yaml:"deb,omitempty" json:"deb,omitempty" jsonschema:"title=deb-specific settings"` diff --git a/www/docs/static/schema.json b/www/docs/static/schema.json index e2f37713..fdd0df2b 100644 --- a/www/docs/static/schema.json +++ b/www/docs/static/schema.json @@ -103,42 +103,60 @@ "properties": { "replaces": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "replaces directive" }, "provides": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "provides directive" }, "depends": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "depends directive" }, "recommends": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "recommends directive" }, "suggests": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "suggests directive" }, "conflicts": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "conflicts directive" @@ -151,7 +169,7 @@ "type": "integer", "title": "umask for file contents", "examples": [ - 2 + 112 ] }, "scripts": { @@ -339,6 +357,9 @@ }, "file_info": { "$ref": "#/$defs/ContentFileInfo" + }, + "expand": { + "type": "boolean" } }, "additionalProperties": false, @@ -416,7 +437,10 @@ }, "predepends": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "predepends directive" @@ -538,42 +562,60 @@ "properties": { "replaces": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "replaces directive" }, "provides": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "provides directive" }, "depends": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "depends directive" }, "recommends": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "recommends directive" }, "suggests": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "suggests directive" }, "conflicts": { "items": { - "type": "string" + "type": "string", + "examples": [ + "nfpm" + ] }, "type": "array", "title": "conflicts directive" @@ -586,7 +628,7 @@ "type": "integer", "title": "umask for file contents", "examples": [ - 2 + 112 ] }, "scripts": {