Skip to content

Commit

Permalink
update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Mar 12, 2020
1 parent 54b5d15 commit e87cf91
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x-pack/plugins/painless_lab/server/routes/api/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ import { isEsError } from '../../lib';
const bodySchema = schema.object({
script: schema.object({
source: schema.string(),
params: schema.maybe(schema.recordOf(schema.string(), schema.any())),
}),
context: schema.maybe(schema.string()),
context_setup: schema.maybe(
schema.object({
params: schema.maybe(schema.any()),
document: schema.recordOf(schema.string(), schema.any()),
index: schema.string(),
})
),
});

export function registerExecuteRoute({ router, license }: RouteDependencies) {
Expand Down

0 comments on commit e87cf91

Please sign in to comment.