@@ -7,41 +7,41 @@ import (
7
7
)
8
8
9
9
type LimaYAML struct {
10
- VMType * VMType `yaml:"vmType,omitempty" json:"vmType,omitempty"`
11
- OS * OS `yaml:"os,omitempty" json:"os,omitempty"`
12
- Arch * Arch `yaml:"arch,omitempty" json:"arch,omitempty"`
10
+ VMType * VMType `yaml:"vmType,omitempty" json:"vmType,omitempty" jsonschema:"nullable" `
11
+ OS * OS `yaml:"os,omitempty" json:"os,omitempty" jsonschema:"nullable" `
12
+ Arch * Arch `yaml:"arch,omitempty" json:"arch,omitempty" jsonschema:"nullable" `
13
13
Images []Image `yaml:"images" json:"images"` // REQUIRED
14
14
CPUType map [Arch ]string `yaml:"cpuType,omitempty" json:"cpuType,omitempty"`
15
- CPUs * int `yaml:"cpus,omitempty" json:"cpus,omitempty"`
16
- Memory * string `yaml:"memory,omitempty" json:"memory,omitempty"` // go-units.RAMInBytes
17
- Disk * string `yaml:"disk,omitempty" json:"disk,omitempty"` // go-units.RAMInBytes
18
- AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty"`
15
+ CPUs * int `yaml:"cpus,omitempty" json:"cpus,omitempty" jsonschema:"nullable" `
16
+ Memory * string `yaml:"memory,omitempty" json:"memory,omitempty" jsonschema:"nullable" ` // go-units.RAMInBytes
17
+ Disk * string `yaml:"disk,omitempty" json:"disk,omitempty" jsonschema:"nullable" ` // go-units.RAMInBytes
18
+ AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty" jsonschema:"nullable"` // commented out
19
19
Mounts []Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"`
20
- MountType * MountType `yaml:"mountType,omitempty" json:"mountType,omitempty"`
21
- MountInotify * bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty"`
20
+ MountType * MountType `yaml:"mountType,omitempty" json:"mountType,omitempty" jsonschema:"nullable" `
21
+ MountInotify * bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty" jsonschema:"nullable" `
22
22
SSH SSH `yaml:"ssh,omitempty" json:"ssh,omitempty"` // REQUIRED (FIXME)
23
23
Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty"`
24
24
Audio Audio `yaml:"audio,omitempty" json:"audio,omitempty"`
25
25
Video Video `yaml:"video,omitempty" json:"video,omitempty"`
26
26
Provision []Provision `yaml:"provision,omitempty" json:"provision,omitempty"`
27
- UpgradePackages * bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty"`
27
+ UpgradePackages * bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty" jsonschema:"nullable" `
28
28
Containerd Containerd `yaml:"containerd,omitempty" json:"containerd,omitempty"`
29
- GuestInstallPrefix * string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty"`
29
+ GuestInstallPrefix * string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty" jsonschema:"nullable" `
30
30
Probes []Probe `yaml:"probes,omitempty" json:"probes,omitempty"`
31
31
PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
32
32
CopyToHost []CopyToHost `yaml:"copyToHost,omitempty" json:"copyToHost,omitempty"`
33
33
Message string `yaml:"message,omitempty" json:"message,omitempty"`
34
- Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty"`
34
+ Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty" jsonschema:"nullable"` // commented out
35
35
// `network` was deprecated in Lima v0.7.0, removed in Lima v0.14.0. Use `networks` instead.
36
36
Env map [string ]string `yaml:"env,omitempty" json:"env,omitempty"`
37
37
DNS []net.IP `yaml:"dns,omitempty" json:"dns,omitempty"`
38
38
HostResolver HostResolver `yaml:"hostResolver,omitempty" json:"hostResolver,omitempty"`
39
39
// `useHostResolver` was deprecated in Lima v0.8.1, removed in Lima v0.14.0. Use `hostResolver.enabled` instead.
40
- PropagateProxyEnv * bool `yaml:"propagateProxyEnv,omitempty" json:"propagateProxyEnv,omitempty"`
40
+ PropagateProxyEnv * bool `yaml:"propagateProxyEnv,omitempty" json:"propagateProxyEnv,omitempty" jsonschema:"nullable" `
41
41
CACertificates CACertificates `yaml:"caCerts,omitempty" json:"caCerts,omitempty"`
42
42
Rosetta Rosetta `yaml:"rosetta,omitempty" json:"rosetta,omitempty"`
43
- Plain * bool `yaml:"plain,omitempty" json:"plain,omitempty"`
44
- TimeZone * string `yaml:"timezone,omitempty" json:"timezone,omitempty"`
43
+ Plain * bool `yaml:"plain,omitempty" json:"plain,omitempty" jsonschema:"nullable" `
44
+ TimeZone * string `yaml:"timezone,omitempty" json:"timezone,omitempty" jsonschema:"nullable" `
45
45
}
46
46
47
47
type (
@@ -70,8 +70,8 @@ const (
70
70
)
71
71
72
72
type Rosetta struct {
73
- Enabled * bool `yaml:"enabled" json:"enabled"`
74
- BinFmt * bool `yaml:"binfmt" json:"binfmt"`
73
+ Enabled * bool `yaml:"enabled" json:"enabled" jsonschema:"nullable" `
74
+ BinFmt * bool `yaml:"binfmt" json:"binfmt" jsonschema:"nullable" `
75
75
}
76
76
77
77
type File struct {
@@ -106,7 +106,7 @@ type Disk struct {
106
106
type Mount struct {
107
107
Location string `yaml:"location" json:"location"` // REQUIRED
108
108
MountPoint string `yaml:"mountPoint,omitempty" json:"mountPoint,omitempty"`
109
- Writable * bool `yaml:"writable,omitempty" json:"writable,omitempty"`
109
+ Writable * bool `yaml:"writable,omitempty" json:"writable,omitempty" jsonschema:"nullable" `
110
110
SSHFS SSHFS `yaml:"sshfs,omitempty" json:"sshfs,omitempty"`
111
111
NineP NineP `yaml:"9p,omitempty" json:"9p,omitempty"`
112
112
Virtiofs Virtiofs `yaml:"virtiofs,omitempty" json:"virtiofs,omitempty"`
@@ -120,16 +120,16 @@ const (
120
120
)
121
121
122
122
type SSHFS struct {
123
- Cache * bool `yaml:"cache,omitempty" json:"cache,omitempty"`
124
- FollowSymlinks * bool `yaml:"followSymlinks,omitempty" json:"followSymlinks,omitempty"`
125
- SFTPDriver * SFTPDriver `yaml:"sftpDriver,omitempty" json:"sftpDriver,omitempty"`
123
+ Cache * bool `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"nullable" `
124
+ FollowSymlinks * bool `yaml:"followSymlinks,omitempty" json:"followSymlinks,omitempty" jsonschema:"nullable" `
125
+ SFTPDriver * SFTPDriver `yaml:"sftpDriver,omitempty" json:"sftpDriver,omitempty" jsonschema:"nullable" `
126
126
}
127
127
128
128
type NineP struct {
129
- SecurityModel * string `yaml:"securityModel,omitempty" json:"securityModel,omitempty"`
130
- ProtocolVersion * string `yaml:"protocolVersion,omitempty" json:"protocolVersion,omitempty"`
131
- Msize * string `yaml:"msize,omitempty" json:"msize,omitempty"`
132
- Cache * string `yaml:"cache,omitempty" json:"cache,omitempty"`
129
+ SecurityModel * string `yaml:"securityModel,omitempty" json:"securityModel,omitempty" jsonschema:"nullable" `
130
+ ProtocolVersion * string `yaml:"protocolVersion,omitempty" json:"protocolVersion,omitempty" jsonschema:"nullable" `
131
+ Msize * string `yaml:"msize,omitempty" json:"msize,omitempty" jsonschema:"nullable" `
132
+ Cache * string `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"nullable" `
133
133
}
134
134
135
135
type Virtiofs struct {
@@ -140,16 +140,16 @@ type SSH struct {
140
140
LocalPort * int `yaml:"localPort,omitempty" json:"localPort,omitempty"`
141
141
142
142
// LoadDotSSHPubKeys loads ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
143
- LoadDotSSHPubKeys * bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty"` // default: true
144
- ForwardAgent * bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty"` // default: false
145
- ForwardX11 * bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty"` // default: false
146
- ForwardX11Trusted * bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty"` // default: false
143
+ LoadDotSSHPubKeys * bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty" jsonschema:"nullable" ` // default: true
144
+ ForwardAgent * bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty" jsonschema:"nullable" ` // default: false
145
+ ForwardX11 * bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty" jsonschema:"nullable" ` // default: false
146
+ ForwardX11Trusted * bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty" jsonschema:"nullable" ` // default: false
147
147
}
148
148
149
149
type Firmware struct {
150
150
// LegacyBIOS disables UEFI if set.
151
151
// LegacyBIOS is ignored for aarch64.
152
- LegacyBIOS * bool `yaml:"legacyBIOS,omitempty" json:"legacyBIOS,omitempty"`
152
+ LegacyBIOS * bool `yaml:"legacyBIOS,omitempty" json:"legacyBIOS,omitempty" jsonschema:"nullable" `
153
153
154
154
// Images specify UEFI images (edk2-aarch64-code.fd.gz).
155
155
// Defaults to built-in UEFI.
@@ -158,17 +158,17 @@ type Firmware struct {
158
158
159
159
type Audio struct {
160
160
// Device is a QEMU audiodev string
161
- Device * string `yaml:"device,omitempty" json:"device,omitempty"`
161
+ Device * string `yaml:"device,omitempty" json:"device,omitempty" jsonschema:"nullable" `
162
162
}
163
163
164
164
type VNCOptions struct {
165
- Display * string `yaml:"display,omitempty" json:"display,omitempty"`
165
+ Display * string `yaml:"display,omitempty" json:"display,omitempty" jsonschema:"nullable" `
166
166
}
167
167
168
168
type Video struct {
169
169
// Display is a QEMU display string
170
- Display * string `yaml:"display,omitempty" json:"display,omitempty"`
171
- VNC VNCOptions `yaml:"vnc" json:"vnc"`
170
+ Display * string `yaml:"display,omitempty" json:"display,omitempty" jsonschema:"nullable" `
171
+ VNC VNCOptions `yaml:"vnc,omitempty " json:"vnc,omitempty "`
172
172
}
173
173
174
174
type ProvisionMode = string
@@ -181,14 +181,14 @@ const (
181
181
)
182
182
183
183
type Provision struct {
184
- Mode ProvisionMode `yaml:"mode" json:"mode"` // default: " system"
184
+ Mode ProvisionMode `yaml:"mode,omitempty " json:"mode,omitempty" jsonschema:"default= system"`
185
185
SkipDefaultDependencyResolution * bool `yaml:"skipDefaultDependencyResolution,omitempty" json:"skipDefaultDependencyResolution,omitempty"`
186
186
Script string `yaml:"script" json:"script"`
187
187
}
188
188
189
189
type Containerd struct {
190
- System * bool `yaml:"system,omitempty" json:"system,omitempty"` // default: false
191
- User * bool `yaml:"user,omitempty" json:"user,omitempty"` // default: true
190
+ System * bool `yaml:"system,omitempty" json:"system,omitempty" jsonschema:"nullable" ` // default: false
191
+ User * bool `yaml:"user,omitempty" json:"user,omitempty" jsonschema:"nullable" ` // default: true
192
192
Archives []File `yaml:"archives,omitempty" json:"archives,omitempty"` // default: see defaultContainerdArchives
193
193
}
194
194
@@ -199,10 +199,10 @@ const (
199
199
)
200
200
201
201
type Probe struct {
202
- Mode ProbeMode // default: " readiness"
203
- Description string
204
- Script string
205
- Hint string
202
+ Mode ProbeMode `yaml:"mode,omitempty" json:"mode,omitempty" jsonschema:"default= readiness"`
203
+ Description string `yaml:"description,omitempty" json:"description,omitempty"`
204
+ Script string `yaml:"script,omitempty" json:"script,omitempty"`
205
+ Hint string `yaml:"hint,omitempty" json:"hint,omitempty"`
206
206
}
207
207
208
208
type Proto = string
@@ -250,15 +250,15 @@ type Network struct {
250
250
}
251
251
252
252
type HostResolver struct {
253
- Enabled * bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
254
- IPv6 * bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty"`
255
- Hosts map [string ]string `yaml:"hosts,omitempty" json:"hosts,omitempty"`
253
+ Enabled * bool `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"nullable" `
254
+ IPv6 * bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty" jsonschema:"nullable" `
255
+ Hosts map [string ]string `yaml:"hosts,omitempty" json:"hosts,omitempty" jsonschema:"nullable" `
256
256
}
257
257
258
258
type CACertificates struct {
259
- RemoveDefaults * bool `yaml:"removeDefaults,omitempty" json:"removeDefaults,omitempty"` // default: false
260
- Files []string `yaml:"files,omitempty" json:"files,omitempty"`
261
- Certs []string `yaml:"certs,omitempty" json:"certs,omitempty"`
259
+ RemoveDefaults * bool `yaml:"removeDefaults,omitempty" json:"removeDefaults,omitempty" jsonschema:"nullable" ` // default: false
260
+ Files []string `yaml:"files,omitempty" json:"files,omitempty" jsonschema:"nullable" `
261
+ Certs []string `yaml:"certs,omitempty" json:"certs,omitempty" jsonschema:"nullable" `
262
262
}
263
263
264
264
// DEPRECATED types below
0 commit comments