diff --git a/package.json b/package.json index 9b8a9b8259d8..3b478f31fb2d 100644 --- a/package.json +++ b/package.json @@ -1530,12 +1530,20 @@ { "fileMatch": ".condarc", "url": "./schemas/condarc.json" + }, + { + "fileMatch": "environment.yml", + "url": "./schemas/conda-environment.json" } ], "yamlValidation": [ { "fileMatch": ".condarc", "url": "./schemas/condarc.json" + }, + { + "fileMatch": "environment.yml", + "url": "./schemas/conda-environment.json" } ] }, diff --git a/schemas/conda-environment.json b/schemas/conda-environment.json new file mode 100644 index 000000000000..9208fc685924 --- /dev/null +++ b/schemas/conda-environment.json @@ -0,0 +1,37 @@ +{ + "title": "conda environment file", + "description": "Support for conda's enviroment.yml files (e.g. `conda env export > environment.yml`)", + "id": "https://raw.githubusercontent.com/Microsoft/vscode-python/master/schemas/conda-environment.json", + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "channel": { + "type": "string" + }, + "package": { + "type": "string" + }, + "path": { + "type": "string" + } + }, + "properties": { + "name": { + "type": "string" + }, + "channels": { + "type": "array", + "items": { + "$ref": "#/definitions/channel" + } + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/package" + } + }, + "prefix": { + "$ref": "#/definitions/path" + } + } +}