@@ -7,46 +7,46 @@ import (
7
7
)
8
8
9
9
type LimaYAML struct {
10
- MinimumLimaVersion * string `yaml:"minimumLimaVersion,omitempty" json:"minimumLimaVersion,omitempty"`
11
- VMType * VMType `yaml:"vmType,omitempty" json:"vmType,omitempty"`
10
+ MinimumLimaVersion * string `yaml:"minimumLimaVersion,omitempty" json:"minimumLimaVersion,omitempty" jsonschema:"nullable" `
11
+ VMType * VMType `yaml:"vmType,omitempty" json:"vmType,omitempty" jsonschema:"nullable" `
12
12
VMOpts VMOpts `yaml:"vmOpts,omitempty" json:"vmOpts,omitempty"`
13
- OS * OS `yaml:"os,omitempty" json:"os,omitempty"`
14
- Arch * Arch `yaml:"arch,omitempty" json:"arch,omitempty"`
13
+ OS * OS `yaml:"os,omitempty" json:"os,omitempty" jsonschema:"nullable" `
14
+ Arch * Arch `yaml:"arch,omitempty" json:"arch,omitempty" jsonschema:"nullable" `
15
15
Images []Image `yaml:"images" json:"images"` // REQUIRED
16
- CPUType CPUType `yaml:"cpuType,omitempty" json:"cpuType,omitempty"`
17
- CPUs * int `yaml:"cpus,omitempty" json:"cpus,omitempty"`
18
- Memory * string `yaml:"memory,omitempty" json:"memory,omitempty"` // go-units.RAMInBytes
19
- Disk * string `yaml:"disk,omitempty" json:"disk,omitempty"` // go-units.RAMInBytes
20
- AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty"`
16
+ CPUType CPUType `yaml:"cpuType,omitempty" json:"cpuType,omitempty" jsonschema:"nullable" `
17
+ CPUs * int `yaml:"cpus,omitempty" json:"cpus,omitempty" jsonschema:"nullable" `
18
+ Memory * string `yaml:"memory,omitempty" json:"memory,omitempty" jsonschema:"nullable" ` // go-units.RAMInBytes
19
+ Disk * string `yaml:"disk,omitempty" json:"disk,omitempty" jsonschema:"nullable" ` // go-units.RAMInBytes
20
+ AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty" jsonschema:"nullable" `
21
21
Mounts []Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"`
22
- MountTypesUnsupported []string `yaml:"mountTypesUnsupported,omitempty" json:"mountTypesUnsupported,omitempty"`
23
- MountType * MountType `yaml:"mountType,omitempty" json:"mountType,omitempty"`
24
- MountInotify * bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty"`
22
+ MountTypesUnsupported []string `yaml:"mountTypesUnsupported,omitempty" json:"mountTypesUnsupported,omitempty" jsonschema:"nullable" `
23
+ MountType * MountType `yaml:"mountType,omitempty" json:"mountType,omitempty" jsonschema:"nullable" `
24
+ MountInotify * bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty" jsonschema:"nullable" `
25
25
SSH SSH `yaml:"ssh,omitempty" json:"ssh,omitempty"` // REQUIRED (FIXME)
26
26
Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty"`
27
27
Audio Audio `yaml:"audio,omitempty" json:"audio,omitempty"`
28
28
Video Video `yaml:"video,omitempty" json:"video,omitempty"`
29
29
Provision []Provision `yaml:"provision,omitempty" json:"provision,omitempty"`
30
- UpgradePackages * bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty"`
30
+ UpgradePackages * bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty" jsonschema:"nullable" `
31
31
Containerd Containerd `yaml:"containerd,omitempty" json:"containerd,omitempty"`
32
- GuestInstallPrefix * string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty"`
32
+ GuestInstallPrefix * string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty" jsonschema:"nullable" `
33
33
Probes []Probe `yaml:"probes,omitempty" json:"probes,omitempty"`
34
34
PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
35
35
CopyToHost []CopyToHost `yaml:"copyToHost,omitempty" json:"copyToHost,omitempty"`
36
36
Message string `yaml:"message,omitempty" json:"message,omitempty"`
37
- Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty"`
37
+ Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty" jsonschema:"nullable" `
38
38
// `network` was deprecated in Lima v0.7.0, removed in Lima v0.14.0. Use `networks` instead.
39
39
Env map [string ]string `yaml:"env,omitempty" json:"env,omitempty"`
40
40
Param map [string ]string `yaml:"param,omitempty" json:"param,omitempty"`
41
41
DNS []net.IP `yaml:"dns,omitempty" json:"dns,omitempty"`
42
42
HostResolver HostResolver `yaml:"hostResolver,omitempty" json:"hostResolver,omitempty"`
43
43
// `useHostResolver` was deprecated in Lima v0.8.1, removed in Lima v0.14.0. Use `hostResolver.enabled` instead.
44
- PropagateProxyEnv * bool `yaml:"propagateProxyEnv,omitempty" json:"propagateProxyEnv,omitempty"`
44
+ PropagateProxyEnv * bool `yaml:"propagateProxyEnv,omitempty" json:"propagateProxyEnv,omitempty" jsonschema:"nullable" `
45
45
CACertificates CACertificates `yaml:"caCerts,omitempty" json:"caCerts,omitempty"`
46
46
Rosetta Rosetta `yaml:"rosetta,omitempty" json:"rosetta,omitempty"`
47
- Plain * bool `yaml:"plain,omitempty" json:"plain,omitempty"`
48
- TimeZone * string `yaml:"timezone,omitempty" json:"timezone,omitempty"`
49
- NestedVirtualization * bool `yaml:"nestedVirtualization,omitempty" json:"nestedVirtualization,omitempty"`
47
+ Plain * bool `yaml:"plain,omitempty" json:"plain,omitempty" jsonschema:"nullable" `
48
+ TimeZone * string `yaml:"timezone,omitempty" json:"timezone,omitempty" jsonschema:"nullable" `
49
+ NestedVirtualization * bool `yaml:"nestedVirtualization,omitempty" json:"nestedVirtualization,omitempty" jsonschema:"nullable" `
50
50
}
51
51
52
52
type (
@@ -81,12 +81,12 @@ type VMOpts struct {
81
81
}
82
82
83
83
type QEMUOpts struct {
84
- MinimumVersion * string `yaml:"minimumVersion,omitempty" json:"minimumVersion,omitempty"`
84
+ MinimumVersion * string `yaml:"minimumVersion,omitempty" json:"minimumVersion,omitempty" jsonschema:"nullable" `
85
85
}
86
86
87
87
type Rosetta struct {
88
- Enabled * bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
89
- BinFmt * bool `yaml:"binfmt,omitempty" json:"binfmt,omitempty"`
88
+ Enabled * bool `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"nullable" `
89
+ BinFmt * bool `yaml:"binfmt,omitempty" json:"binfmt,omitempty" jsonschema:"nullable" `
90
90
}
91
91
92
92
type File struct {
@@ -121,7 +121,7 @@ type Disk struct {
121
121
type Mount struct {
122
122
Location string `yaml:"location" json:"location"` // REQUIRED
123
123
MountPoint string `yaml:"mountPoint,omitempty" json:"mountPoint,omitempty"`
124
- Writable * bool `yaml:"writable,omitempty" json:"writable,omitempty"`
124
+ Writable * bool `yaml:"writable,omitempty" json:"writable,omitempty" jsonschema:"nullable" `
125
125
SSHFS SSHFS `yaml:"sshfs,omitempty" json:"sshfs,omitempty"`
126
126
NineP NineP `yaml:"9p,omitempty" json:"9p,omitempty"`
127
127
Virtiofs Virtiofs `yaml:"virtiofs,omitempty" json:"virtiofs,omitempty"`
@@ -135,36 +135,36 @@ const (
135
135
)
136
136
137
137
type SSHFS struct {
138
- Cache * bool `yaml:"cache,omitempty" json:"cache,omitempty"`
139
- FollowSymlinks * bool `yaml:"followSymlinks,omitempty" json:"followSymlinks,omitempty"`
140
- SFTPDriver * SFTPDriver `yaml:"sftpDriver,omitempty" json:"sftpDriver,omitempty"`
138
+ Cache * bool `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"nullable" `
139
+ FollowSymlinks * bool `yaml:"followSymlinks,omitempty" json:"followSymlinks,omitempty" jsonschema:"nullable" `
140
+ SFTPDriver * SFTPDriver `yaml:"sftpDriver,omitempty" json:"sftpDriver,omitempty" jsonschema:"nullable" `
141
141
}
142
142
143
143
type NineP struct {
144
- SecurityModel * string `yaml:"securityModel,omitempty" json:"securityModel,omitempty"`
145
- ProtocolVersion * string `yaml:"protocolVersion,omitempty" json:"protocolVersion,omitempty"`
146
- Msize * string `yaml:"msize,omitempty" json:"msize,omitempty"`
147
- Cache * string `yaml:"cache,omitempty" json:"cache,omitempty"`
144
+ SecurityModel * string `yaml:"securityModel,omitempty" json:"securityModel,omitempty" jsonschema:"nullable" `
145
+ ProtocolVersion * string `yaml:"protocolVersion,omitempty" json:"protocolVersion,omitempty" jsonschema:"nullable" `
146
+ Msize * string `yaml:"msize,omitempty" json:"msize,omitempty" jsonschema:"nullable" `
147
+ Cache * string `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"nullable" `
148
148
}
149
149
150
150
type Virtiofs struct {
151
151
QueueSize * int `yaml:"queueSize,omitempty" json:"queueSize,omitempty"`
152
152
}
153
153
154
154
type SSH struct {
155
- LocalPort * int `yaml:"localPort,omitempty" json:"localPort,omitempty"`
155
+ LocalPort * int `yaml:"localPort,omitempty" json:"localPort,omitempty" jsonschema:"nullable" `
156
156
157
157
// LoadDotSSHPubKeys loads ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
158
- LoadDotSSHPubKeys * bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty"` // default: false
159
- ForwardAgent * bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty"` // default: false
160
- ForwardX11 * bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty"` // default: false
161
- ForwardX11Trusted * bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty"` // default: false
158
+ LoadDotSSHPubKeys * bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty" jsonschema:"nullable" ` // default: false
159
+ ForwardAgent * bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty" jsonschema:"nullable" ` // default: false
160
+ ForwardX11 * bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty" jsonschema:"nullable" ` // default: false
161
+ ForwardX11Trusted * bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty" jsonschema:"nullable" ` // default: false
162
162
}
163
163
164
164
type Firmware struct {
165
165
// LegacyBIOS disables UEFI if set.
166
166
// LegacyBIOS is ignored for aarch64.
167
- LegacyBIOS * bool `yaml:"legacyBIOS,omitempty" json:"legacyBIOS,omitempty"`
167
+ LegacyBIOS * bool `yaml:"legacyBIOS,omitempty" json:"legacyBIOS,omitempty" jsonschema:"nullable" `
168
168
169
169
// Images specify UEFI images (edk2-aarch64-code.fd.gz).
170
170
// Defaults to built-in UEFI.
@@ -173,17 +173,17 @@ type Firmware struct {
173
173
174
174
type Audio struct {
175
175
// Device is a QEMU audiodev string
176
- Device * string `yaml:"device,omitempty" json:"device,omitempty"`
176
+ Device * string `yaml:"device,omitempty" json:"device,omitempty" jsonschema:"nullable" `
177
177
}
178
178
179
179
type VNCOptions struct {
180
- Display * string `yaml:"display,omitempty" json:"display,omitempty"`
180
+ Display * string `yaml:"display,omitempty" json:"display,omitempty" jsonschema:"nullable" `
181
181
}
182
182
183
183
type Video struct {
184
184
// Display is a QEMU display string
185
- Display * string `yaml:"display,omitempty" json:"display,omitempty"`
186
- VNC VNCOptions `yaml:"vnc" json:"vnc"`
185
+ Display * string `yaml:"display,omitempty" json:"display,omitempty" jsonschema:"nullable" `
186
+ VNC VNCOptions `yaml:"vnc,omitempty " json:"vnc,omitempty "`
187
187
}
188
188
189
189
type ProvisionMode = string
@@ -197,16 +197,16 @@ const (
197
197
)
198
198
199
199
type Provision struct {
200
- Mode ProvisionMode `yaml:"mode" json:"mode"` // default: " system"
200
+ Mode ProvisionMode `yaml:"mode,omitempty " json:"mode,omitempty" jsonschema:"default= system"`
201
201
SkipDefaultDependencyResolution * bool `yaml:"skipDefaultDependencyResolution,omitempty" json:"skipDefaultDependencyResolution,omitempty"`
202
202
Script string `yaml:"script" json:"script"`
203
203
Playbook string `yaml:"playbook,omitempty" json:"playbook,omitempty"`
204
204
}
205
205
206
206
type Containerd struct {
207
- System * bool `yaml:"system,omitempty" json:"system,omitempty"` // default: false
208
- User * bool `yaml:"user,omitempty" json:"user,omitempty"` // default: true
209
- Archives []File `yaml:"archives,omitempty" json:"archives,omitempty"` // default: see defaultContainerdArchives
207
+ System * bool `yaml:"system,omitempty" json:"system,omitempty" jsonschema:"nullable"` // default: false
208
+ User * bool `yaml:"user,omitempty" json:"user,omitempty" jsonschema:"nullable"` // default: true
209
+ Archives []File `yaml:"archives,omitempty" json:"archives,omitempty"` // default: see defaultContainerdArchives
210
210
}
211
211
212
212
type ProbeMode = string
@@ -216,10 +216,10 @@ const (
216
216
)
217
217
218
218
type Probe struct {
219
- Mode ProbeMode // default: " readiness"
220
- Description string
221
- Script string
222
- Hint string
219
+ Mode ProbeMode `yaml:"mode,omitempty" json:"mode,omitempty" jsonschema:"default= readiness"`
220
+ Description string `yaml:"description,omitempty" json:"description,omitempty"`
221
+ Script string `yaml:"script,omitempty" json:"script,omitempty"`
222
+ Hint string `yaml:"hint,omitempty" json:"hint,omitempty"`
223
223
}
224
224
225
225
type Proto = string
@@ -264,13 +264,13 @@ type Network struct {
264
264
}
265
265
266
266
type HostResolver struct {
267
- Enabled * bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
268
- IPv6 * bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty"`
269
- Hosts map [string ]string `yaml:"hosts,omitempty" json:"hosts,omitempty"`
267
+ Enabled * bool `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"nullable" `
268
+ IPv6 * bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty" jsonschema:"nullable" `
269
+ Hosts map [string ]string `yaml:"hosts,omitempty" json:"hosts,omitempty" jsonschema:"nullable" `
270
270
}
271
271
272
272
type CACertificates struct {
273
- RemoveDefaults * bool `yaml:"removeDefaults,omitempty" json:"removeDefaults,omitempty"` // default: false
274
- Files []string `yaml:"files,omitempty" json:"files,omitempty"`
275
- Certs []string `yaml:"certs,omitempty" json:"certs,omitempty"`
273
+ RemoveDefaults * bool `yaml:"removeDefaults,omitempty" json:"removeDefaults,omitempty" jsonschema:"nullable" ` // default: false
274
+ Files []string `yaml:"files,omitempty" json:"files,omitempty" jsonschema:"nullable" `
275
+ Certs []string `yaml:"certs,omitempty" json:"certs,omitempty" jsonschema:"nullable" `
276
276
}
0 commit comments