{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "DTO": { "properties": { "trackEvents": { "type": "boolean" }, "disable": { "type": "boolean" }, "version": { "type": "string" }, "converter": { "type": "string" }, "variations": { "additionalProperties": true, "type": "object", "title": "variations", "description": "All the variations available for this flag. You need at least 2 variations and it is a key value pair. All the variations should have the same type." }, "targeting": { "items": { "$ref": "#/$defs/Rule" }, "type": "array", "title": "targeting", "description": "List of rule to target a subset of the users based on the evaluation context." }, "bucketingKey": { "type": "string" }, "defaultRule": { "$ref": "#/$defs/Rule", "title": "defaultRule", "description": "How do we evaluate the flag if the user is not part of any of the targeting rule." }, "scheduledRollout": { "items": { "$ref": "#/$defs/ScheduledStep" }, "type": "array", "title": "scheduledRollout", "description": "Configure an update on some fields of your flag over time." }, "experimentation": { "$ref": "#/$defs/ExperimentationDto", "title": "experimentation", "description": "Configure an experimentation. It will allow you to configure a start date and an end date for your flag." }, "metadata": { "type": "object", "title": "metadata", "description": "A field containing information about your flag such as an issue tracker link a description etc..." } }, "additionalProperties": false, "type": "object", "required": [ "variations", "defaultRule" ] }, "ExperimentationDto": { "properties": { "start": { "type": "string", "format": "date-time", "title": "start", "description": "Time of the start of the experimentation." }, "end": { "type": "string", "format": "date-time", "title": "start", "description": "Time of the end of the experimentation." } }, "additionalProperties": false, "type": "object", "required": [ "start", "end" ] }, "ExperimentationRollout": { "properties": { "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } }, "additionalProperties": false, "type": "object" }, "ProgressiveRollout": { "properties": { "initial": { "$ref": "#/$defs/ProgressiveRolloutStep", "title": "initial", "description": "A description of the initial state of the rollout." }, "end": { "$ref": "#/$defs/ProgressiveRolloutStep", "title": "initial", "description": "A description of the end state of the rollout." } }, "additionalProperties": false, "type": "object" }, "ProgressiveRolloutStep": { "properties": { "variation": { "type": "string", "title": "variation", "description": "Name of the variation to apply." }, "percentage": { "type": "number", "title": "percentage", "description": "The percentage (initial or end) for the progressive rollout." }, "date": { "type": "string", "format": "date-time", "title": "date", "description": "Date is the time it starts or ends." } }, "additionalProperties": false, "type": "object", "required": [ "variation", "percentage", "date" ] }, "Rule": { "properties": { "name": { "type": "string", "title": "name", "description": "Name is the name of the rule. This field is mandatory if you want to update the rule during scheduled rollout." }, "query": { "type": "string", "title": "query", "description": "The query that allow to check in the evaluation context match. Note: in the defaultRule field query is ignored." }, "variation": { "type": "string", "title": "variation", "description": "The variation name to use if the rule apply for the user. In case we have a percentage field in the config this field is ignored" }, "percentage": { "additionalProperties": { "type": "number" }, "type": "object", "title": "percentage", "description": "Represents the percentage we should give to each variation." }, "progressiveRollout": { "$ref": "#/$defs/ProgressiveRollout", "title": "progressiveRollout", "description": "Configure a progressive rollout deployment of your flag." }, "disable": { "type": "boolean", "title": "disable", "description": "Indicates that this rule is disabled." } }, "additionalProperties": false, "type": "object" }, "ScheduledStep": { "properties": { "variations": { "additionalProperties": true, "type": "object" }, "targeting": { "items": { "$ref": "#/$defs/Rule" }, "type": "array" }, "bucketingKey": { "type": "string" }, "defaultRule": { "$ref": "#/$defs/Rule" }, "experimentation": { "$ref": "#/$defs/ExperimentationRollout" }, "scheduledRollout": { "items": { "$ref": "#/$defs/ScheduledStep" }, "type": "array" }, "trackEvents": { "type": "boolean" }, "disable": { "type": "boolean" }, "version": { "type": "string" }, "metadata": { "type": "object" }, "date": { "type": "string", "format": "date-time" } }, "additionalProperties": false, "type": "object" } }, "additionalProperties": { "$ref": "#/$defs/DTO" }, "type": "object" }