{
    "copyright": "Licensed Materials - Property of IBM. IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.",
    "$id": "dataSourcesSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "dataSources",
    "description": "The data source of the dashboard specification, representing ...",
    "type": "object",
    "properties": {
        "version": {
            "type": "string"
        },
        "sources": {
            "description": "The sources of ...",
            "type": "array",
            "minItems": 0,
            "items": {
                "properties" : {
                    "id": {
                        "$ref": "schemaDefs.json#/definitions/modelId"
                    },
                    "assetId": {
                        "$ref": "schemaDefs.json#/definitions/assetId"
                    },
                    "type": {
                        "type": "string",
                        "enum": ["uploadedFile", "data_asset"]
                    },
                    "name": {
                        "$ref": "schemaDefs.json#/definitions/name"
                    },
                    "shaping": {
                        "type": "object",
                        "properties": {
                            "shapingId": {
                                "type": "string",
                                "enum": ["__initialShapingID__"]
                            },
                            "moserJSON": {
                                "type": "object",
                                "properties": {
                                    "version": { "type": "string" },
                                    "container": { "type": "string" },
                                    "use": {
                                        "type": "array",
                                        "items": {}
                                    },
                                    "useSpec": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "identifier": { "type": "string" },
                                                "type": {
                                                    "type": "string",
                                                    "enum": ["wa_data_asset"]
                                                },
                                                "storeID": { "$ref": "schemaDefs.json#/definitions/assetId" },
                                                "imports": { "type": "string" }

                                            }
                                        }
                                    },

                                }
                            },
                            "embeddedModuleUpToDate": { "type": "boolean" }
                        }
                    }
                }
            },
            "uniqueItems": true
        }
    },
    "required": ["version", "sources"]
}
