Module: VWO::Schema
- Defined in:
- lib/vwo/schemas/settings_file.rb
Overview
Schema for verifying the settings_file provided by the customer
Constant Summary collapse
- SETTINGS_FILE_SCHEMA =
{ type: 'object', properties: { version: { type: %w[number string] }, accountId: { type: %w[number string] }, isEventArchEnabled: { type: ['boolean'] }, collectionPrefix: { type: ['string'] }, campaigns: { if: { type: 'array' }, then: { minItems: 1, items: { '$ref' => '#/definitions/campaign_object_schema' } }, else: { type: 'object', maxProperties: 0 } } }, definitions: { campaign_variation_schema: { type: 'object', properties: { id: { type: %w[number string] }, name: { type: ['string'] }, weight: { type: %w[number string] }, variables: { type: 'array', items: { '$ref' => '#/definitions/variables_schema' } } }, required: %w[id name weight] }, campaign_object_schema: { type: 'object', properties: { id: { type: %w[number string] }, key: { type: ['string'] }, name: { type: ['string'] }, status: { type: ['string'] }, percentTraffic: { type: ['number'] }, variations: { type: 'array', items: { '$ref' => '#/definitions/campaign_variation_schema' } }, variables: { type: 'array', items: { '$ref' => '#/definitions/variables_schema' } }, isBucketingSeedEnabled: ['boolean'], isUserListEnabled: ['boolean'], isAlwaysCheckSegment: ['boolean'], minItems: 2 } }, variables_schema: { type: 'object', properties: { id: { type: %w[number string] }, key: { type: ['string'] }, type: { type: ['string'] }, value: { type: %w[number string boolean double object] } }, required: %w[id key type value] }, required: %w[ id key status percentTraffic variations ] }, required: %w[ version accountId campaigns ] }.freeze