feat(client): support opaque payload schemas (#37773)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
fe9a936867
commit
bef6cfbffe
6 changed files with 255 additions and 32 deletions
|
|
@ -27,6 +27,18 @@ export const Api = HttpApi.make("fixture")
|
|||
params: { sessionID: Schema.String },
|
||||
success: HttpApiSchema.NoContent,
|
||||
}),
|
||||
)
|
||||
.add(
|
||||
HttpApiEndpoint.post("configure", "/session/:sessionID/configure", {
|
||||
params: { sessionID: Schema.String },
|
||||
query: { dryRun: Schema.optional(Schema.Boolean) },
|
||||
headers: { traceID: Schema.String },
|
||||
payload: Schema.Union([
|
||||
Schema.Struct({ type: Schema.Literal("local"), command: Schema.Array(Schema.String) }),
|
||||
Schema.Struct({ type: Schema.Literal("remote"), url: Schema.String }),
|
||||
]),
|
||||
success: Schema.String,
|
||||
}),
|
||||
),
|
||||
)
|
||||
.add(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue