mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Saved Objects export API stable type order (#42310)
* Sorting export's valid types * Updating the saved object api integration export test * Fixing OSS also
This commit is contained in:
parent
305e4a2ad1
commit
f2f941fee3
3 changed files with 4 additions and 4 deletions
|
@ -58,13 +58,13 @@ export const createExportRoute = (
|
|||
payload: Joi.object()
|
||||
.keys({
|
||||
type: Joi.array()
|
||||
.items(Joi.string().valid(supportedTypes))
|
||||
.items(Joi.string().valid(supportedTypes.sort()))
|
||||
.single()
|
||||
.optional(),
|
||||
objects: Joi.array()
|
||||
.items({
|
||||
type: Joi.string()
|
||||
.valid(supportedTypes)
|
||||
.valid(supportedTypes.sort())
|
||||
.required(),
|
||||
id: Joi.string().required(),
|
||||
})
|
||||
|
|
|
@ -139,7 +139,7 @@ export default function ({ getService }) {
|
|||
statusCode: 400,
|
||||
error: 'Bad Request',
|
||||
message: 'child "type" fails because ["type" at position 0 fails because ' +
|
||||
'["0" must be one of [config, index-pattern, visualization, search, dashboard, url]]]',
|
||||
'["0" must be one of [config, dashboard, index-pattern, search, url, visualization]]]',
|
||||
validation: {
|
||||
source: 'payload',
|
||||
keys: ['type.0'],
|
||||
|
|
|
@ -60,7 +60,7 @@ export function exportTestSuiteFactory(esArchiver: any, supertest: SuperTest<any
|
|||
expect(resp.body).to.eql({
|
||||
statusCode: 400,
|
||||
error: 'Bad Request',
|
||||
message: `child \"objects\" fails because [\"objects\" at position 0 fails because [child \"type\" fails because [\"type\" must be one of [config, globaltype, map, canvas-workpad, canvas-element, index-pattern, visualization, search, dashboard, url]]]]`,
|
||||
message: `child \"objects\" fails because [\"objects\" at position 0 fails because [child \"type\" fails because [\"type\" must be one of [canvas-element, canvas-workpad, config, dashboard, globaltype, index-pattern, map, search, url, visualization]]]]`,
|
||||
validation: {
|
||||
source: 'payload',
|
||||
keys: ['objects.0.type'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue