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:
|
||||
name: {type: string}
|
||||
required: [name]
|
||||
additionalProperties: true
|
||||
bootstrapper:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -31,12 +32,14 @@ properties:
|
|||
workspace:
|
||||
$ref: '#/definitions/path'
|
||||
required: [workspace]
|
||||
additionalProperties: false
|
||||
image:
|
||||
type: object
|
||||
properties:
|
||||
name: {type: string}
|
||||
required: [name]
|
||||
system:
|
||||
type: object
|
||||
properties:
|
||||
architecture:
|
||||
enum: [i386, amd64]
|
||||
|
@ -61,7 +64,7 @@ properties:
|
|||
- timezone
|
||||
- locale
|
||||
- charmap
|
||||
type: object
|
||||
additionalProperties: false
|
||||
packages:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -128,6 +131,7 @@ properties:
|
|||
- $ref: '#/definitions/no_partitions'
|
||||
- $ref: '#/definitions/partition_table'
|
||||
required: [partitions]
|
||||
additionalProperties: false
|
||||
definitions:
|
||||
absolute_path:
|
||||
type: string
|
||||
|
@ -153,9 +157,9 @@ definitions:
|
|||
type: array
|
||||
size: {$ref: '#/definitions/bytes'}
|
||||
required: [size, filesystem]
|
||||
additionalProperties: false
|
||||
partition_table:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
boot: {$ref: '#/definitions/partition'}
|
||||
root: {$ref: '#/definitions/partition'}
|
||||
|
@ -166,6 +170,7 @@ definitions:
|
|||
required: [size]
|
||||
type: {enum: [msdos, gpt]}
|
||||
required: [root]
|
||||
additionalProperties: false
|
||||
path:
|
||||
type: string
|
||||
pattern: ^[^\0]+$
|
||||
|
|
|
@ -11,3 +11,4 @@ properties:
|
|||
properties:
|
||||
username: {type: string}
|
||||
required: [username]
|
||||
additionalProperties: false
|
||||
|
|
|
@ -21,8 +21,8 @@ properties:
|
|||
host: {type: string}
|
||||
minItems: 1
|
||||
playbook: {$ref: '#/definitions/absolute_path'}
|
||||
required:
|
||||
- playbook
|
||||
required: [playbook]
|
||||
additionalProperties: false
|
||||
definitions:
|
||||
absolute_path:
|
||||
pattern: ^/[^\0]+$
|
||||
|
|
|
@ -14,6 +14,5 @@ properties:
|
|||
port: {type: integer}
|
||||
persistent: {type: boolean}
|
||||
username: {type: string}
|
||||
required:
|
||||
- address
|
||||
- port
|
||||
required: [address, port]
|
||||
additionalProperties: false
|
||||
|
|
|
@ -11,8 +11,8 @@ properties:
|
|||
properties:
|
||||
assets:
|
||||
$ref: '#/definitions/absolute_path'
|
||||
required:
|
||||
- assets
|
||||
required: [assets]
|
||||
additionalProperties: false
|
||||
definitions:
|
||||
absolute_path:
|
||||
pattern: ^/[^\0]+$
|
||||
|
|
|
@ -28,3 +28,4 @@ properties:
|
|||
items: {type: string}
|
||||
uniqueItems: true
|
||||
required: [username]
|
||||
additionalProperties: false
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
---
|
||||
$schema: http://json-schema.org/draft-04/schema#
|
||||
title: Image commands plugin manifest
|
||||
type: object
|
||||
properties:
|
||||
plugins:
|
||||
type: object
|
||||
properties:
|
||||
commands:
|
||||
type: object
|
||||
properties:
|
||||
commands:
|
||||
items:
|
||||
|
@ -13,13 +17,6 @@ properties:
|
|||
type: array
|
||||
minItems: 1
|
||||
type: array
|
||||
required:
|
||||
- commands
|
||||
type: object
|
||||
required:
|
||||
- commands
|
||||
type: object
|
||||
required:
|
||||
- plugins
|
||||
title: Image commands plugin manifest
|
||||
type: object
|
||||
required: [commands]
|
||||
additionalProperties: false
|
||||
required: [commands]
|
||||
|
|
|
@ -3,17 +3,6 @@ $schema: http://json-schema.org/draft-04/schema#
|
|||
title: Install Docker plugin manifest
|
||||
type: object
|
||||
properties:
|
||||
plugins:
|
||||
type: object
|
||||
properties:
|
||||
docker_daemon:
|
||||
type: object
|
||||
properties:
|
||||
version:
|
||||
pattern: '^\d\.\d{1,2}\.\d$'
|
||||
type: string
|
||||
docker_opts:
|
||||
type: string
|
||||
system:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -26,3 +15,15 @@ properties:
|
|||
enum:
|
||||
- squeeze
|
||||
- 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:
|
||||
- files
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- file_copy
|
||||
type: object
|
||||
|
|
|
@ -10,6 +10,7 @@ properties:
|
|||
zerofree:
|
||||
type: boolean
|
||||
type: object
|
||||
additionalProperties: false
|
||||
type: object
|
||||
title: Minimize size plugin manifest
|
||||
type: object
|
||||
|
|
|
@ -13,3 +13,4 @@ properties:
|
|||
type: array
|
||||
items: {type: string}
|
||||
minItems: 1
|
||||
additionalProperties: false
|
||||
|
|
|
@ -15,3 +15,4 @@ properties:
|
|||
type: string
|
||||
minItems: 1
|
||||
uniqueItems: true
|
||||
additionalProperties: false
|
||||
|
|
|
@ -23,3 +23,4 @@ properties:
|
|||
properties:
|
||||
image: {type: string}
|
||||
snapshot: {type: string}
|
||||
additionalProperties: false
|
||||
|
|
|
@ -11,3 +11,4 @@ properties:
|
|||
properties:
|
||||
password: {type: string}
|
||||
required: [password]
|
||||
additionalProperties: false
|
||||
|
|
|
@ -22,3 +22,4 @@ properties:
|
|||
master: {type: string}
|
||||
version: {type: string}
|
||||
required: [install_source]
|
||||
additionalProperties: false
|
||||
|
|
|
@ -16,3 +16,4 @@ properties:
|
|||
- update_interval
|
||||
- download_interval
|
||||
- upgrade_interval
|
||||
additionalProperties: false
|
||||
|
|
|
@ -21,4 +21,6 @@ properties:
|
|||
plugins:
|
||||
type: object
|
||||
properties:
|
||||
vagrant: {type: object}
|
||||
vagrant:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
|
Loading…
Add table
Reference in a new issue