Skip to content

Commit 1fdf3fd

Browse files
committed
Add additionalProperties false for all models
1 parent 85e4193 commit 1fdf3fd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

fetchModuleSchemas.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fs.mkdirSync(modulesDir)
1414

1515
for (const module of modules) {
1616
if (module.tsp === "") continue
17+
1718
let url = undefined
1819
if (module.tsp.includes("blue-build/modules")) {
1920
url = module.tsp.replace("/main/", "/refs/heads/oneof-fix/")

src-tsp/main.tsp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ enum Platform {
103103
}
104104

105105
@jsonSchema("stage-list-v1.json")
106+
@extension("additionalProperties", false)
106107
model StageList {
107108
/**
108109
* A list of [stages](https://blue-build.org/reference/stages/) that are executed before the build of the final image.
@@ -139,6 +140,7 @@ model Stage {
139140
}
140141

141142
@jsonSchema("module-list-v1.json")
143+
@extension("additionalProperties", false)
142144
model ModuleList {
143145
/**
144146
* A list of [modules](https://blue-build.org/reference/module/) that is executed in order. Multiple of the same module can be included.
@@ -182,6 +184,7 @@ union Secret {
182184
SecretSsh,
183185
}
184186

187+
@extension("additionalProperties", false)
185188
model SecretEnv {
186189
/** A secret pulled from an environment variable. */
187190
type: "env";
@@ -193,6 +196,7 @@ model SecretEnv {
193196
mount: SecretMount;
194197
}
195198

199+
@extension("additionalProperties", false)
196200
model SecretFile {
197201
/** A secret pulled from a file. */
198202
type: "file";
@@ -207,6 +211,7 @@ model SecretFile {
207211
mount: SecretMount;
208212
}
209213

214+
@extension("additionalProperties", false)
210215
model SecretExec {
211216
/** A secret pulled from the stdout of a command. */
212217
type: "exec";
@@ -221,6 +226,7 @@ model SecretExec {
221226
mount: SecretMount;
222227
}
223228

229+
@extension("additionalProperties", false)
224230
model SecretSsh {
225231
/** Mount the SSH socket to use the hosts SSH socket. */
226232
type: "ssh";
@@ -231,6 +237,7 @@ union SecretMount {
231237
SecretMountFile,
232238
}
233239

240+
@extension("additionalProperties", false)
234241
model SecretMountEnv {
235242
/** A secret pulled from a file on the host system. */
236243
type: "env";
@@ -239,6 +246,7 @@ model SecretMountEnv {
239246
name: string;
240247
}
241248

249+
@extension("additionalProperties", false)
242250
model SecretMountFile {
243251
/** A secret pulled from a file on the host system. */
244252
type: "file";

0 commit comments

Comments
 (0)