~snappy-dev/snapcraft/core

134.4.1 by Sergio Schvezov
Initial json schema support
1
$schema: http://json-schema.org/draft-04/schema#
2
167.2.1 by Sergio Schvezov
apparmor and seccomp
3
definitions:
4
  security:
5
    type: object
6
    required:
7
      - apparmor
8
      - seccomp
9
    properties:
10
      apparmor:
11
        type: string
12
        format: file-path
13
      seccomp:
14
        type: string
15
        format: file-path
16
134.4.1 by Sergio Schvezov
Initial json schema support
17
title: snapcraft schema
18
type: object
19
properties:
20
  name:
21
    type: string
22
    description: name of the snap package
23
    pattern: "^[a-z0-9][a-z0-9+-]*$"
24
  version:
25
    # python's defaul yaml loading code loads 1.0 as an int
26
    # type: string
27
    description: package version
134.4.6 by Sergio Schvezov
Testing the schema
28
    pattern: "^[a-zA-Z0-9.+~-]*$"
134.4.1 by Sergio Schvezov
Initial json schema support
29
  vendor:
30
    type: string
31
    format: email
134.5.10 by Sergio Schvezov
Initial icon support
32
  icon:
33
    type: string
34
    description: path to a 512x512 icon representing the package.
134.5.11 by Sergio Schvezov
Adding format checker for icon-path
35
    format: icon-path
134.4.1 by Sergio Schvezov
Initial json schema support
36
  summary:
37
    type: string
38
    description: one line summary for the package
134.4.6 by Sergio Schvezov
Testing the schema
39
    maxLength: 78
134.4.1 by Sergio Schvezov
Initial json schema support
40
  description:
41
    type: string
42
    description: long description of the package
43
  type:
44
    type: string
45
    description: the snap type, the implicit type is 'app'
46
    enum:
47
      - app
48
      - framework
49
  frameworks:
50
    type: array
134.4.5 by Sergio Schvezov
Add a couple more constraints to frameworks entries in the schema
51
    minItems: 1
52
    uniqueItems: true
134.4.1 by Sergio Schvezov
Initial json schema support
53
    items:
54
      - type: string
143.9.2 by Sergio Schvezov
spec update
55
  config:
56
    type: string
57
    description: path to a configure hook to expose configuration for the package
220.1.1 by Sergio Schvezov
Support framework policies
58
  framework-policy:
59
    type: string
60
    description: framework policies to add to the package
61
    format: file-path
134.4.1 by Sergio Schvezov
Initial json schema support
62
  services:
183.1.2 by Sergio Schvezov
Using a map instead of list for binaries and services as defined by the spec
63
    type: object
64
    additionalProperties: false
65
    patternProperties:
66
      "^[A-Za-z0-9:-]*$":
67
        type: object
167.2.1 by Sergio Schvezov
apparmor and seccomp
68
        required:
69
          - start
134.4.1 by Sergio Schvezov
Initial json schema support
70
        properties:
71
          start:
72
            type: string
73
            description: command executed to start the service
74
          stop:
75
            type: string
76
            description: command executed to stop the service
167.2.1 by Sergio Schvezov
apparmor and seccomp
77
          security-policy:
78
            $ref: "#definitions/security"
79
          security-override:
80
            $ref: "#definitions/security"
134.4.1 by Sergio Schvezov
Initial json schema support
81
  binaries:
183.1.2 by Sergio Schvezov
Using a map instead of list for binaries and services as defined by the spec
82
    type: object
83
    additionalProperties: false
84
    patternProperties:
85
      "^[A-Za-z0-9:-]*$":
86
        type: object
167.2.1 by Sergio Schvezov
apparmor and seccomp
87
        required:
183.1.2 by Sergio Schvezov
Using a map instead of list for binaries and services as defined by the spec
88
          - exec
134.4.1 by Sergio Schvezov
Initial json schema support
89
        properties:
90
          exec:
91
            type: string
183.1.2 by Sergio Schvezov
Using a map instead of list for binaries and services as defined by the spec
92
            description: command executed to run the binary
167.2.1 by Sergio Schvezov
apparmor and seccomp
93
          security-policy:
94
            $ref: "#definitions/security"
95
          security-override:
96
            $ref: "#definitions/security"
134.4.1 by Sergio Schvezov
Initial json schema support
97
  parts:
98
    type: object
134.4.6 by Sergio Schvezov
Testing the schema
99
    minProperties: 1
183.1.2 by Sergio Schvezov
Using a map instead of list for binaries and services as defined by the spec
100
    additionalProperties: false
134.4.1 by Sergio Schvezov
Initial json schema support
101
    patternProperties:
134.4.6 by Sergio Schvezov
Testing the schema
102
      ^[a-z0-9][a-z0-9+-]*$:
134.4.1 by Sergio Schvezov
Initial json schema support
103
        type: object
104
        properties:
105
          plugin:
106
            type: string
107
            description: plugin name
108
          source:
109
            type: string
110
            description: path to the sources
143.3.4 by Sergio Schvezov
First iteration of ubuntu plugin removal
111
          stage-packages:
112
            type: array
113
            description: Ubuntu packages used to support the part.
114
            minItems: 1
115
            uniqueItems: true
116
            items:
117
              type: string
134.4.1 by Sergio Schvezov
Initial json schema support
118
        # required:
143.3.4 by Sergio Schvezov
First iteration of ubuntu plugin removal
119
        # - plugin
120
        # - source
134.4.1 by Sergio Schvezov
Initial json schema support
121
required:
122
  - name
123
  - version
124
  - vendor
125
  - summary
126
  - description
134.5.10 by Sergio Schvezov
Initial icon support
127
  - icon
134.4.1 by Sergio Schvezov
Initial json schema support
128
  - parts