@@ -1082,15 +1082,18 @@ type EnvironmentSpecDevcontainer struct {
1082
1082
// ```
1083
1083
// this.matches('^$|^[^/].*')
1084
1084
// ```
1085
- DevcontainerFilePath string `json:"devcontainerFilePath"`
1086
- Session string `json:"session"`
1087
- JSON environmentSpecDevcontainerJSON `json:"-"`
1085
+ DevcontainerFilePath string `json:"devcontainerFilePath"`
1086
+ // Experimental: dotfiles is the dotfiles configuration of the devcontainer
1087
+ Dotfiles EnvironmentSpecDevcontainerDotfiles `json:"dotfiles"`
1088
+ Session string `json:"session"`
1089
+ JSON environmentSpecDevcontainerJSON `json:"-"`
1088
1090
}
1089
1091
1090
1092
// environmentSpecDevcontainerJSON contains the JSON metadata for the struct
1091
1093
// [EnvironmentSpecDevcontainer]
1092
1094
type environmentSpecDevcontainerJSON struct {
1093
1095
DevcontainerFilePath apijson.Field
1096
+ Dotfiles apijson.Field
1094
1097
Session apijson.Field
1095
1098
raw string
1096
1099
ExtraFields map [string ]apijson.Field
@@ -1104,6 +1107,39 @@ func (r environmentSpecDevcontainerJSON) RawJSON() string {
1104
1107
return r .raw
1105
1108
}
1106
1109
1110
+ // Experimental: dotfiles is the dotfiles configuration of the devcontainer
1111
+ type EnvironmentSpecDevcontainerDotfiles struct {
1112
+ // URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
1113
+ Repository string `json:"repository,required" format:"uri"`
1114
+ // install_command is the command to run after cloning the dotfiles repository.
1115
+ // Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`,
1116
+ // `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root
1117
+ // folder.
1118
+ InstallCommand string `json:"installCommand"`
1119
+ // target_path is the path to clone the dotfiles repository to. Defaults to
1120
+ // `~/dotfiles`.
1121
+ TargetPath string `json:"targetPath"`
1122
+ JSON environmentSpecDevcontainerDotfilesJSON `json:"-"`
1123
+ }
1124
+
1125
+ // environmentSpecDevcontainerDotfilesJSON contains the JSON metadata for the
1126
+ // struct [EnvironmentSpecDevcontainerDotfiles]
1127
+ type environmentSpecDevcontainerDotfilesJSON struct {
1128
+ Repository apijson.Field
1129
+ InstallCommand apijson.Field
1130
+ TargetPath apijson.Field
1131
+ raw string
1132
+ ExtraFields map [string ]apijson.Field
1133
+ }
1134
+
1135
+ func (r * EnvironmentSpecDevcontainerDotfiles ) UnmarshalJSON (data []byte ) (err error ) {
1136
+ return apijson .UnmarshalRoot (data , r )
1137
+ }
1138
+
1139
+ func (r environmentSpecDevcontainerDotfilesJSON ) RawJSON () string {
1140
+ return r .raw
1141
+ }
1142
+
1107
1143
// machine is the machine spec of the environment
1108
1144
type EnvironmentSpecMachine struct {
1109
1145
// Class denotes the class of the environment we ought to start
@@ -1378,13 +1414,33 @@ type EnvironmentSpecDevcontainerParam struct {
1378
1414
// this.matches('^$|^[^/].*')
1379
1415
// ```
1380
1416
DevcontainerFilePath param.Field [string ] `json:"devcontainerFilePath"`
1381
- Session param.Field [string ] `json:"session"`
1417
+ // Experimental: dotfiles is the dotfiles configuration of the devcontainer
1418
+ Dotfiles param.Field [EnvironmentSpecDevcontainerDotfilesParam ] `json:"dotfiles"`
1419
+ Session param.Field [string ] `json:"session"`
1382
1420
}
1383
1421
1384
1422
func (r EnvironmentSpecDevcontainerParam ) MarshalJSON () (data []byte , err error ) {
1385
1423
return apijson .MarshalRoot (r )
1386
1424
}
1387
1425
1426
+ // Experimental: dotfiles is the dotfiles configuration of the devcontainer
1427
+ type EnvironmentSpecDevcontainerDotfilesParam struct {
1428
+ // URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)
1429
+ Repository param.Field [string ] `json:"repository,required" format:"uri"`
1430
+ // install_command is the command to run after cloning the dotfiles repository.
1431
+ // Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`,
1432
+ // `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root
1433
+ // folder.
1434
+ InstallCommand param.Field [string ] `json:"installCommand"`
1435
+ // target_path is the path to clone the dotfiles repository to. Defaults to
1436
+ // `~/dotfiles`.
1437
+ TargetPath param.Field [string ] `json:"targetPath"`
1438
+ }
1439
+
1440
+ func (r EnvironmentSpecDevcontainerDotfilesParam ) MarshalJSON () (data []byte , err error ) {
1441
+ return apijson .MarshalRoot (r )
1442
+ }
1443
+
1388
1444
// machine is the machine spec of the environment
1389
1445
type EnvironmentSpecMachineParam struct {
1390
1446
// Class denotes the class of the environment we ought to start
@@ -2215,7 +2271,7 @@ func (r EnvironmentStatusSSHPublicKeysPhase) IsKnown() bool {
2215
2271
2216
2272
type EnvironmentNewResponse struct {
2217
2273
// +resource get environment
2218
- Environment Environment `json:"environment"`
2274
+ Environment Environment `json:"environment,required "`
2219
2275
JSON environmentNewResponseJSON `json:"-"`
2220
2276
}
2221
2277
@@ -2237,7 +2293,7 @@ func (r environmentNewResponseJSON) RawJSON() string {
2237
2293
2238
2294
type EnvironmentGetResponse struct {
2239
2295
// +resource get environment
2240
- Environment Environment `json:"environment"`
2296
+ Environment Environment `json:"environment,required "`
2241
2297
JSON environmentGetResponseJSON `json:"-"`
2242
2298
}
2243
2299
@@ -2263,7 +2319,7 @@ type EnvironmentDeleteResponse = interface{}
2263
2319
2264
2320
type EnvironmentNewFromProjectResponse struct {
2265
2321
// +resource get environment
2266
- Environment Environment `json:"environment"`
2322
+ Environment Environment `json:"environment,required "`
2267
2323
JSON environmentNewFromProjectResponseJSON `json:"-"`
2268
2324
}
2269
2325
@@ -2285,7 +2341,7 @@ func (r environmentNewFromProjectResponseJSON) RawJSON() string {
2285
2341
2286
2342
type EnvironmentNewLogsTokenResponse struct {
2287
2343
// access_token is the token that can be used to access the logs of the environment
2288
- AccessToken string `json:"accessToken"`
2344
+ AccessToken string `json:"accessToken,required "`
2289
2345
JSON environmentNewLogsTokenResponseJSON `json:"-"`
2290
2346
}
2291
2347
0 commit comments