mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Litter the manifest schemas with additionalProperties:false
This pretty much eliminates the possiblity of undiscovered typos in the manifest
This commit is contained in:
parent
fa8da6171d
commit
a7f2327e42
17 changed files with 45 additions and 31 deletions
|
@ -9,6 +9,7 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
name: {type: string}
|
name: {type: string}
|
||||||
required: [name]
|
required: [name]
|
||||||
|
additionalProperties: true
|
||||||
bootstrapper:
|
bootstrapper:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -31,12 +32,14 @@ properties:
|
||||||
workspace:
|
workspace:
|
||||||
$ref: '#/definitions/path'
|
$ref: '#/definitions/path'
|
||||||
required: [workspace]
|
required: [workspace]
|
||||||
|
additionalProperties: false
|
||||||
image:
|
image:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
name: {type: string}
|
name: {type: string}
|
||||||
required: [name]
|
required: [name]
|
||||||
system:
|
system:
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
architecture:
|
architecture:
|
||||||
enum: [i386, amd64]
|
enum: [i386, amd64]
|
||||||
|
@ -61,7 +64,7 @@ properties:
|
||||||
- timezone
|
- timezone
|
||||||
- locale
|
- locale
|
||||||
- charmap
|
- charmap
|
||||||
type: object
|
additionalProperties: false
|
||||||
packages:
|
packages:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -128,6 +131,7 @@ properties:
|
||||||
- $ref: '#/definitions/no_partitions'
|
- $ref: '#/definitions/no_partitions'
|
||||||
- $ref: '#/definitions/partition_table'
|
- $ref: '#/definitions/partition_table'
|
||||||
required: [partitions]
|
required: [partitions]
|
||||||
|
additionalProperties: false
|
||||||
definitions:
|
definitions:
|
||||||
absolute_path:
|
absolute_path:
|
||||||
type: string
|
type: string
|
||||||
|
@ -153,9 +157,9 @@ definitions:
|
||||||
type: array
|
type: array
|
||||||
size: {$ref: '#/definitions/bytes'}
|
size: {$ref: '#/definitions/bytes'}
|
||||||
required: [size, filesystem]
|
required: [size, filesystem]
|
||||||
|
additionalProperties: false
|
||||||
partition_table:
|
partition_table:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
properties:
|
||||||
boot: {$ref: '#/definitions/partition'}
|
boot: {$ref: '#/definitions/partition'}
|
||||||
root: {$ref: '#/definitions/partition'}
|
root: {$ref: '#/definitions/partition'}
|
||||||
|
@ -166,6 +170,7 @@ definitions:
|
||||||
required: [size]
|
required: [size]
|
||||||
type: {enum: [msdos, gpt]}
|
type: {enum: [msdos, gpt]}
|
||||||
required: [root]
|
required: [root]
|
||||||
|
additionalProperties: false
|
||||||
path:
|
path:
|
||||||
type: string
|
type: string
|
||||||
pattern: ^[^\0]+$
|
pattern: ^[^\0]+$
|
||||||
|
|
|
@ -11,3 +11,4 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
username: {type: string}
|
username: {type: string}
|
||||||
required: [username]
|
required: [username]
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -21,8 +21,8 @@ properties:
|
||||||
host: {type: string}
|
host: {type: string}
|
||||||
minItems: 1
|
minItems: 1
|
||||||
playbook: {$ref: '#/definitions/absolute_path'}
|
playbook: {$ref: '#/definitions/absolute_path'}
|
||||||
required:
|
required: [playbook]
|
||||||
- playbook
|
additionalProperties: false
|
||||||
definitions:
|
definitions:
|
||||||
absolute_path:
|
absolute_path:
|
||||||
pattern: ^/[^\0]+$
|
pattern: ^/[^\0]+$
|
||||||
|
|
|
@ -14,6 +14,5 @@ properties:
|
||||||
port: {type: integer}
|
port: {type: integer}
|
||||||
persistent: {type: boolean}
|
persistent: {type: boolean}
|
||||||
username: {type: string}
|
username: {type: string}
|
||||||
required:
|
required: [address, port]
|
||||||
- address
|
additionalProperties: false
|
||||||
- port
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
assets:
|
assets:
|
||||||
$ref: '#/definitions/absolute_path'
|
$ref: '#/definitions/absolute_path'
|
||||||
required:
|
required: [assets]
|
||||||
- assets
|
additionalProperties: false
|
||||||
definitions:
|
definitions:
|
||||||
absolute_path:
|
absolute_path:
|
||||||
pattern: ^/[^\0]+$
|
pattern: ^/[^\0]+$
|
||||||
|
|
|
@ -28,3 +28,4 @@ properties:
|
||||||
items: {type: string}
|
items: {type: string}
|
||||||
uniqueItems: true
|
uniqueItems: true
|
||||||
required: [username]
|
required: [username]
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
---
|
---
|
||||||
$schema: http://json-schema.org/draft-04/schema#
|
$schema: http://json-schema.org/draft-04/schema#
|
||||||
|
title: Image commands plugin manifest
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
plugins:
|
plugins:
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
commands:
|
commands:
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
commands:
|
commands:
|
||||||
items:
|
items:
|
||||||
|
@ -13,13 +17,6 @@ properties:
|
||||||
type: array
|
type: array
|
||||||
minItems: 1
|
minItems: 1
|
||||||
type: array
|
type: array
|
||||||
required:
|
required: [commands]
|
||||||
- commands
|
additionalProperties: false
|
||||||
type: object
|
required: [commands]
|
||||||
required:
|
|
||||||
- commands
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- plugins
|
|
||||||
title: Image commands plugin manifest
|
|
||||||
type: object
|
|
||||||
|
|
|
@ -3,17 +3,6 @@ $schema: http://json-schema.org/draft-04/schema#
|
||||||
title: Install Docker plugin manifest
|
title: Install Docker plugin manifest
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
plugins:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
docker_daemon:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
version:
|
|
||||||
pattern: '^\d\.\d{1,2}\.\d$'
|
|
||||||
type: string
|
|
||||||
docker_opts:
|
|
||||||
type: string
|
|
||||||
system:
|
system:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -26,3 +15,15 @@ properties:
|
||||||
enum:
|
enum:
|
||||||
- squeeze
|
- squeeze
|
||||||
- oldstable
|
- oldstable
|
||||||
|
plugins:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
docker_daemon:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
version:
|
||||||
|
pattern: '^\d\.\d{1,2}\.\d$'
|
||||||
|
type: string
|
||||||
|
docker_opts:
|
||||||
|
type: string
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -35,6 +35,7 @@ properties:
|
||||||
required:
|
required:
|
||||||
- files
|
- files
|
||||||
type: object
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- file_copy
|
- file_copy
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -10,6 +10,7 @@ properties:
|
||||||
zerofree:
|
zerofree:
|
||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
type: object
|
type: object
|
||||||
title: Minimize size plugin manifest
|
title: Minimize size plugin manifest
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -13,3 +13,4 @@ properties:
|
||||||
type: array
|
type: array
|
||||||
items: {type: string}
|
items: {type: string}
|
||||||
minItems: 1
|
minItems: 1
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -15,3 +15,4 @@ properties:
|
||||||
type: string
|
type: string
|
||||||
minItems: 1
|
minItems: 1
|
||||||
uniqueItems: true
|
uniqueItems: true
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -23,3 +23,4 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
image: {type: string}
|
image: {type: string}
|
||||||
snapshot: {type: string}
|
snapshot: {type: string}
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -11,3 +11,4 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
password: {type: string}
|
password: {type: string}
|
||||||
required: [password]
|
required: [password]
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -22,3 +22,4 @@ properties:
|
||||||
master: {type: string}
|
master: {type: string}
|
||||||
version: {type: string}
|
version: {type: string}
|
||||||
required: [install_source]
|
required: [install_source]
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -16,3 +16,4 @@ properties:
|
||||||
- update_interval
|
- update_interval
|
||||||
- download_interval
|
- download_interval
|
||||||
- upgrade_interval
|
- upgrade_interval
|
||||||
|
additionalProperties: false
|
||||||
|
|
|
@ -21,4 +21,6 @@ properties:
|
||||||
plugins:
|
plugins:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
vagrant: {type: object}
|
vagrant:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
|
Loading…
Add table
Reference in a new issue