mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-34877 - json schema: port highlighting tests from ReSharper
This commit is contained in:
@@ -36,7 +36,6 @@ import com.intellij.lang.StdLanguages;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||||
import com.intellij.lang.java.JavaLanguage;
|
||||
import com.intellij.openapi.application.Result;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
@@ -246,8 +245,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase {
|
||||
Collection<HighlightInfo> infos = doHighlighting();
|
||||
|
||||
String text = myEditor.getDocument().getText();
|
||||
data.checkLineMarkers(DaemonCodeAnalyzerImpl.getLineMarkers(getDocument(getFile()), getProject()), text);
|
||||
data.checkResult(infos, text);
|
||||
doCheckResult(data, infos, text);
|
||||
return infos;
|
||||
}
|
||||
finally {
|
||||
@@ -255,6 +253,13 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
protected void doCheckResult(@NotNull ExpectedHighlightingData data,
|
||||
Collection<HighlightInfo> infos,
|
||||
String text) {
|
||||
data.checkLineMarkers(DaemonCodeAnalyzerImpl.getLineMarkers(getDocument(getFile()), getProject()), text);
|
||||
data.checkResult(infos, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Editor createEditor(@NotNull VirtualFile file) {
|
||||
if (myVirtualFileFilter instanceof FileTreeAccessFilter) {
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.jsonSchema;
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.intellij.json.JsonLanguage;
|
||||
import com.intellij.openapi.fileTypes.LanguageFileType;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.ExpectedHighlightingData;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.util.containers.Predicate;
|
||||
import com.jetbrains.jsonSchema.impl.JsonSchemaComplianceInspection;
|
||||
import org.intellij.lang.annotations.Language;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
public class JsonSchemaReSharperHighlightingTest extends JsonSchemaHighlightingTestBase {
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonSchema/highlighting/resharper";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTestFileName() {
|
||||
return "config.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspectionProfile() {
|
||||
return new JsonSchemaComplianceInspection();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<VirtualFile> getAvailabilityPredicate() {
|
||||
return file -> file.getFileType() instanceof LanguageFileType && ((LanguageFileType)file.getFileType()).getLanguage().isKindOf(
|
||||
JsonLanguage.INSTANCE);
|
||||
}
|
||||
|
||||
private void doTestFiles(String file, String schema) throws Exception {
|
||||
@Language("JSON") String schemaText = FileUtil.loadFile(new File(getTestDataPath() + "/" + schema + ".json"));
|
||||
String inputText = FileUtil.loadFile(new File(getTestDataPath() + "/" + file + ".json"));
|
||||
doTest(schemaText, inputText);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doCheckResult(@NotNull ExpectedHighlightingData data, Collection<HighlightInfo> infos, String text) {
|
||||
data.checkResult(infos, text, getTestDataPath() + "/" + getName() + ".json");
|
||||
}
|
||||
|
||||
// generated code below
|
||||
public void test001() throws Exception {
|
||||
doTestFiles("test001", "schema001");
|
||||
}
|
||||
public void test002() throws Exception {
|
||||
doTestFiles("test002", "schema002");
|
||||
}
|
||||
public void test003() throws Exception {
|
||||
doTestFiles("test003", "schema003");
|
||||
}
|
||||
public void test004() throws Exception {
|
||||
doTestFiles("test004", "schema004");
|
||||
}
|
||||
public void test004_2() throws Exception {
|
||||
doTestFiles("test004_2", "schema004");
|
||||
}
|
||||
public void test005() throws Exception {
|
||||
doTestFiles("test005", "schema005");
|
||||
}
|
||||
public void test005_2() throws Exception {
|
||||
doTestFiles("test005_2", "schema005");
|
||||
}
|
||||
public void test006() throws Exception {
|
||||
doTestFiles("test006", "schema006");
|
||||
}
|
||||
public void test007() throws Exception {
|
||||
doTestFiles("test007", "schema007");
|
||||
}
|
||||
public void test008() throws Exception {
|
||||
doTestFiles("test008", "schema008");
|
||||
}
|
||||
public void test008_2() throws Exception {
|
||||
doTestFiles("test008_2", "schema008");
|
||||
}
|
||||
public void test008_3() throws Exception {
|
||||
doTestFiles("test008_3", "schema008");
|
||||
}
|
||||
public void test009() throws Exception {
|
||||
doTestFiles("test009", "schema009");
|
||||
}
|
||||
public void test010() throws Exception {
|
||||
doTestFiles("test010", "schema010");
|
||||
}
|
||||
public void test011() throws Exception {
|
||||
doTestFiles("test011", "schema011");
|
||||
}
|
||||
public void test012() throws Exception {
|
||||
doTestFiles("test012", "schema012");
|
||||
}
|
||||
public void _test012_2() throws Exception { // TODO bug
|
||||
doTestFiles("test012_2", "schema012");
|
||||
}
|
||||
public void test012_3() throws Exception {
|
||||
doTestFiles("test012_3", "schema012");
|
||||
}
|
||||
public void test013() throws Exception {
|
||||
doTestFiles("test013", "schema013");
|
||||
}
|
||||
public void test014() throws Exception {
|
||||
doTestFiles("test014", "schema014");
|
||||
}
|
||||
public void test015() throws Exception {
|
||||
doTestFiles("test015", "schema015");
|
||||
}
|
||||
public void test016() throws Exception {
|
||||
doTestFiles("test016", "schema016");
|
||||
}
|
||||
public void test016_2() throws Exception {
|
||||
doTestFiles("test016_2", "schema016");
|
||||
}
|
||||
public void test016_3() throws Exception {
|
||||
doTestFiles("test016_3", "schema016");
|
||||
}
|
||||
public void test016_4() throws Exception {
|
||||
doTestFiles("test016_4", "schema016");
|
||||
}
|
||||
public void test016_5() throws Exception {
|
||||
doTestFiles("test016_5", "schema016");
|
||||
}
|
||||
public void test017() throws Exception {
|
||||
doTestFiles("test017", "schema017");
|
||||
}
|
||||
public void test017_2() throws Exception {
|
||||
doTestFiles("test017_2", "schema017");
|
||||
}
|
||||
public void test017_3() throws Exception {
|
||||
doTestFiles("test017_3", "schema017");
|
||||
}
|
||||
public void test018() throws Exception {
|
||||
doTestFiles("test018", "schema018");
|
||||
}
|
||||
public void test019() throws Exception {
|
||||
doTestFiles("test019", "schema019");
|
||||
}
|
||||
public void test019_2() throws Exception {
|
||||
doTestFiles("test019_2", "schema019");
|
||||
}
|
||||
public void test020() throws Exception {
|
||||
doTestFiles("test020", "schema020");
|
||||
}
|
||||
public void test020_2() throws Exception {
|
||||
doTestFiles("test020_2", "schema020");
|
||||
}
|
||||
public void test021() throws Exception {
|
||||
doTestFiles("test021", "schema021");
|
||||
}
|
||||
public void test022() throws Exception {
|
||||
doTestFiles("test022", "schema022");
|
||||
}
|
||||
public void test023() throws Exception {
|
||||
doTestFiles("test023", "schema023");
|
||||
}
|
||||
public void test024() throws Exception {
|
||||
doTestFiles("test024", "schema024");
|
||||
}
|
||||
public void test025() throws Exception {
|
||||
doTestFiles("test025", "schema025");
|
||||
}
|
||||
public void test026() throws Exception {
|
||||
doTestFiles("test026", "schema026");
|
||||
}
|
||||
public void _test027() throws Exception { // TODO bug
|
||||
doTestFiles("test027", "schema027");
|
||||
}
|
||||
public void test028() throws Exception {
|
||||
doTestFiles("test028", "schema028");
|
||||
}
|
||||
public void _test029() throws Exception { // TODO bug
|
||||
doTestFiles("test029", "schema029");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
|
||||
"a": |true|(0)
|
||||
}
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
(0): ReSharper Underlined Error Highlighting: JSON validation failed: Should satisfy at least one of constraints:
|
||||
Expression must be of type 'string'
|
||||
Expression must be of type 'number'
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"aa": {
|
||||
"type": "string"
|
||||
},
|
||||
"bb": |5|(0),
|
||||
"ccbb": |7|(1)
|
||||
}
|
||||
|
||||
|
||||
---------------------------------------------------------
|
||||
(0): ReSharper Underlined Error Highlighting: JSON validation failed: Expression must be of type 'string'
|
||||
(1): ReSharper Underlined Error Highlighting: JSON validation failed: Expression must be of type 'string'
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"webJobName": "ProcessQueryJob",
|
||||
"startTime": |null|(0),
|
||||
"endTime": |null|(1),
|
||||
"jobRecurrenceFrequency": "Day",
|
||||
"runMode": "Continuous",
|
||||
"interval": 5
|
||||
}
|
||||
|
||||
---------------------------------------------------------
|
||||
(0): ReSharper Underlined Error Highlighting: JSON validation failed: Expression must be of type 'string'
|
||||
(1): ReSharper Underlined Error Highlighting: JSON validation failed: Expression must be of type 'string'
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"dependencies" : {
|
||||
"a": ["b", "c", "d"]
|
||||
}
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"dependencies" : {
|
||||
"a": {
|
||||
"properties": {
|
||||
"b": {
|
||||
"type": "string"
|
||||
},
|
||||
"c": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["c"]
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"x25": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "object",
|
||||
"not": {
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["b"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"title": "JSON schema for the TypeScript compiler's configuration file",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
||||
"definitions": {
|
||||
"filesDefinition": {
|
||||
"properties": {
|
||||
"files": {
|
||||
"type": "array",
|
||||
"description": "If no 'files' property is present in a tsconfig.json, the compiler defaults to including all files the containing directory and subdirectories. When a 'files' property is specified, only those files are included.",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
},
|
||||
"not": {
|
||||
"required": [ "exclude" ]
|
||||
}
|
||||
},
|
||||
"excludeDefinition": {
|
||||
"properties": {
|
||||
"exclude": {
|
||||
"type": "array",
|
||||
"description": "If no 'files' property is present in a tsconfig.json, but an 'exclude' property is present, the compiler will exclude the files and folders specified in the 'exclude' property.",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
},
|
||||
"not": {
|
||||
"required": [ "files" ]
|
||||
}
|
||||
},
|
||||
"compilerOptionsDefinition": {
|
||||
"properties": {
|
||||
"compilerOptions": {
|
||||
"type": "object",
|
||||
"description": "Instructs the TypeScript compiler how to compile .ts files",
|
||||
"properties": {
|
||||
"charset": {
|
||||
"description": "The character set of the input files.",
|
||||
"type": "string"
|
||||
},
|
||||
"declaration": {
|
||||
"description": "Generates corresponding d.ts files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"diagnostics": {
|
||||
"description": "Show diagnostic information.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"emitBOM": {
|
||||
"description": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"listFiles": {
|
||||
"description": "Print names of files part of the compilation.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"locale": {
|
||||
"description": "The locale to use to show error messages, e.g. en-us.",
|
||||
"type": "string"
|
||||
},
|
||||
"mapRoot": {
|
||||
"description": "Specifies the location where debugger should locate map files instead of generated locations",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"module": {
|
||||
"description": "Specify module code generation: 'CommonJS', 'Amd', 'System', 'UMD', 'es6', or 'es2015'.",
|
||||
"enum": [ "commonjs", "amd", "umd", "system", "es6", "es2015" ]
|
||||
},
|
||||
"newLine": {
|
||||
"description": "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).",
|
||||
"enum": [ "CRLF", "LF" ]
|
||||
},
|
||||
"noEmitHelpers": {
|
||||
"description": "Do not generate custom helper functions like __extends in compiled output.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noEmit": {
|
||||
"description": "Do not emit output.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noEmitOnError": {
|
||||
"description": "Do not emit outputs if any type checking errors were reported.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noImplicitAny": {
|
||||
"description": "Warn on expressions and declarations with an implied 'any' type.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noLib": {
|
||||
"description": "Do not include the default library file (lib.d.ts).",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noLibCheck": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"noResolve": {
|
||||
"description": " Do not add triple-slash references or module import targets to the list of compiled files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"outFile": {
|
||||
"description": "Concatenate and emit output to single file.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"outDir": {
|
||||
"description": "Redirect output structure to the directory.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"preserveConstEnums": {
|
||||
"description": "Do not erase const enum declarations in generated code.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"removeComments": {
|
||||
"description": "Do not emit comments to output.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"sourceMap": {
|
||||
"description": "Generates corresponding '.map' file.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"sourceRoot": {
|
||||
"description": "Specifies the location where debugger should locate TypeScript files instead of source locations.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"suppressImplicitAnyIndexErrors": {
|
||||
"description": "Suppress noImplicitAny errors for indexing objects lacking index signatures.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"suppressExcessPropertyErrors": {
|
||||
"description": "Suppress excess property checks for object literals.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"target": {
|
||||
"description": "Specify ECMAScript target version.",
|
||||
"enum": [ "es3", "es5", "es6", "es2015" ],
|
||||
"default": "es5"
|
||||
},
|
||||
"watch": {
|
||||
"description": "Watch input files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"inlineSourceMap": {
|
||||
"description": "Emit a single file with source maps instead of having a separate file.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"inlineSources": {
|
||||
"description": "Emit the source alongside the sourcemaps within a single file; requires --inlineSourceMap to be set.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"emitDecoratorMetadata": {
|
||||
"description": "Emit design-type metadata for decorated declarations in source.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"isolatedModules": {
|
||||
"description": "Unconditionally emit imports for unresolved files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimentalDecorators": {
|
||||
"description": "Enables experimental support for ES7 decorators.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimentalAsyncFunctions": {
|
||||
"description": "Enables experimental support for ES7 async functions.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"rootDir": {
|
||||
"description": "Specifies the root directory of input files. Use to control the output directory structure with --outDir.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"jsx": {
|
||||
"description": "Specify JSX code generation: 'preserve' or 'react'.",
|
||||
"enum": [ "preserve", "react" ]
|
||||
},
|
||||
"moduleResolution": {
|
||||
"description": "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) .",
|
||||
"enum": [ "classic", "node" ],
|
||||
"default": "classic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/compilerOptionsDefinition" },
|
||||
{
|
||||
"anyOf": [
|
||||
{ "$ref": "#/definitions/filesDefinition" },
|
||||
{ "$ref": "#/definitions/excludeDefinition" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"not": {
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"allOf": [
|
||||
{
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"allOf": [
|
||||
{
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"not": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"allOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"additionalItems": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"additionalItems": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "array",
|
||||
"not": {
|
||||
"items": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"additionalItems": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"minItems": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "array",
|
||||
"not": {
|
||||
"items": {"type": "string"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "array",
|
||||
"not": {
|
||||
"not": {
|
||||
"items": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"additionalItems": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"minItems": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "object",
|
||||
"not": {
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "number"
|
||||
},
|
||||
"b": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "object",
|
||||
"not": {
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"x": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "object",
|
||||
"not": {
|
||||
"not": {
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"x": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"a": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number",
|
||||
"enum": [ 2, 3, 4 ]
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"enum": [1, 2, 3]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"x": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
"properties": {
|
||||
"a": {
|
||||
"$ref": "#"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
"definitions": {
|
||||
"qq": {
|
||||
"$ref": "#"
|
||||
}
|
||||
},
|
||||
|
||||
"properties": {
|
||||
"a": {
|
||||
"$ref": "#/definitions/qq"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
"definitions": {
|
||||
"qq": {
|
||||
"$ref": "#/definitions/qq"
|
||||
}
|
||||
},
|
||||
|
||||
"properties": {
|
||||
"a": {
|
||||
"$ref": "#/definitions/qq"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
"definitions": {
|
||||
"qq": {
|
||||
"$ref": "#/definitions/ee"
|
||||
},
|
||||
"ee": {
|
||||
"$ref": "#/definitions/ff"
|
||||
},
|
||||
"ff": {
|
||||
"$ref": "#/definitions/qq"
|
||||
}
|
||||
},
|
||||
|
||||
"properties": {
|
||||
"a": {
|
||||
"$ref": "#/definitions/qq"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
"properties": {
|
||||
"a": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"aa": {
|
||||
"type": "object"
|
||||
},
|
||||
"bb": {
|
||||
"$ref": "test027.json#/aa"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"title": "JSON schema for the TypeScript compiler's configuration file",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
||||
"definitions": {
|
||||
"filesDefinition": {
|
||||
"properties": {
|
||||
"files": {
|
||||
"type": "array",
|
||||
"description": "If no 'files' property is present in a tsconfig.json, the compiler defaults to including all files the containing directory and subdirectories. When a 'files' property is specified, only those files are included.",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
},
|
||||
"not": {
|
||||
"required": [ "exclude" ]
|
||||
}
|
||||
},
|
||||
"excludeDefinition": {
|
||||
"properties": {
|
||||
"exclude": {
|
||||
"type": "array",
|
||||
"description": "If no 'files' property is present in a tsconfig.json, but an 'exclude' property is present, the compiler will exclude the files and folders specified in the 'exclude' property.",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
},
|
||||
"not": {
|
||||
"required": [ "files" ]
|
||||
}
|
||||
},
|
||||
"compilerOptionsDefinition": {
|
||||
"properties": {
|
||||
"compilerOptions": {
|
||||
"type": "object",
|
||||
"description": "Instructs the TypeScript compiler how to compile .ts files",
|
||||
"properties": {
|
||||
"charset": {
|
||||
"description": "The character set of the input files.",
|
||||
"type": "string"
|
||||
},
|
||||
"declaration": {
|
||||
"description": "Generates corresponding d.ts files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"diagnostics": {
|
||||
"description": "Show diagnostic information.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"emitBOM": {
|
||||
"description": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"listFiles": {
|
||||
"description": "Print names of files part of the compilation.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"locale": {
|
||||
"description": "The locale to use to show error messages, e.g. en-us.",
|
||||
"type": "string"
|
||||
},
|
||||
"mapRoot": {
|
||||
"description": "Specifies the location where debugger should locate map files instead of generated locations",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"module": {
|
||||
"description": "Specify module code generation: 'CommonJS', 'Amd', 'System', 'UMD', 'es6', or 'es2015'.",
|
||||
"enum": [ "commonjs", "amd", "umd", "system", "es6", "es2015" ]
|
||||
},
|
||||
"newLine": {
|
||||
"description": "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).",
|
||||
"enum": [ "CRLF", "LF" ]
|
||||
},
|
||||
"noEmitHelpers": {
|
||||
"description": "Do not generate custom helper functions like __extends in compiled output.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noEmit": {
|
||||
"description": "Do not emit output.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noEmitOnError": {
|
||||
"description": "Do not emit outputs if any type checking errors were reported.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noImplicitAny": {
|
||||
"description": "Warn on expressions and declarations with an implied 'any' type.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noLib": {
|
||||
"description": "Do not include the default library file (lib.d.ts).",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noLibCheck": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"noResolve": {
|
||||
"description": " Do not add triple-slash references or module import targets to the list of compiled files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"outFile": {
|
||||
"description": "Concatenate and emit output to single file.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"outDir": {
|
||||
"description": "Redirect output structure to the directory.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"preserveConstEnums": {
|
||||
"description": "Do not erase const enum declarations in generated code.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"removeComments": {
|
||||
"description": "Do not emit comments to output.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"sourceMap": {
|
||||
"description": "Generates corresponding '.map' file.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"sourceRoot": {
|
||||
"description": "Specifies the location where debugger should locate TypeScript files instead of source locations.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"suppressImplicitAnyIndexErrors": {
|
||||
"description": "Suppress noImplicitAny errors for indexing objects lacking index signatures.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"suppressExcessPropertyErrors": {
|
||||
"description": "Suppress excess property checks for object literals.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"target": {
|
||||
"description": "Specify ECMAScript target version.",
|
||||
"enum": [ "es3", "es5", "es6", "es2015" ],
|
||||
"default": "es5"
|
||||
},
|
||||
"watch": {
|
||||
"description": "Watch input files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"inlineSourceMap": {
|
||||
"description": "Emit a single file with source maps instead of having a separate file.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"inlineSources": {
|
||||
"description": "Emit the source alongside the sourcemaps within a single file; requires --inlineSourceMap to be set.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"emitDecoratorMetadata": {
|
||||
"description": "Emit design-type metadata for decorated declarations in source.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"isolatedModules": {
|
||||
"description": "Unconditionally emit imports for unresolved files.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimentalDecorators": {
|
||||
"description": "Enables experimental support for ES7 decorators.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"experimentalAsyncFunctions": {
|
||||
"description": "Enables experimental support for ES7 async functions.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"rootDir": {
|
||||
"description": "Specifies the root directory of input files. Use to control the output directory structure with --outDir.",
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"jsx": {
|
||||
"description": "Specify JSX code generation: 'preserve' or 'react'.",
|
||||
"enum": [ "preserve", "react" ]
|
||||
},
|
||||
"moduleResolution": {
|
||||
"description": "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) .",
|
||||
"enum": [ "classic", "node" ],
|
||||
"default": "classic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{ "$ref": "#/definitions/compilerOptionsDefinition" },
|
||||
{
|
||||
"anyOf": [
|
||||
{ "$ref": "#/definitions/filesDefinition" },
|
||||
{ "$ref": "#/definitions/excludeDefinition" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"title": "JSON schema for Azure Webjobs configuration files",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
||||
"type": "object",
|
||||
"required": [ "runMode" ],
|
||||
|
||||
"definitions": {
|
||||
"shared": {
|
||||
"properties": {
|
||||
"webJobName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Azure Webjob."
|
||||
},
|
||||
"startTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The start time of a scheduled job. Example. 2014-06-11T00:00:00-08:00"
|
||||
},
|
||||
"endTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The end time of a scheduled job. Example. 2014-06-12T00:00:00-08:00"
|
||||
},
|
||||
"jobRecurrenceFrequency": {
|
||||
"type": "string",
|
||||
"enum": [ "Second", "Minute", "Hour", "Day", "Week", "Month" ],
|
||||
"description": "The frequency metric used with the 'interval' property."
|
||||
},
|
||||
"interval": {
|
||||
"type": "integer",
|
||||
"description": "The interval of how often the Azure Webjob should run. Use it with the 'jobRecurrenceFrequency' property."
|
||||
}
|
||||
}
|
||||
},
|
||||
"scheduled": {
|
||||
"required": [ "webJobName", "startTime", "endTime", "jobRecurrenceFrequency", "interval" ],
|
||||
"allOf": [ { "$ref": "#/definitions/shared" } ],
|
||||
"properties": {
|
||||
"runMode": {
|
||||
"type": "string",
|
||||
"enum": [ "Scheduled" ],
|
||||
"description": "Determines the run mode of the Azure Webjob. \n\n Triggered: manually triggered \n Scheduled: runs on a specific schedule \n Continuous: runs all the time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notScheduled": {
|
||||
"required": [ "runMode" ],
|
||||
"allOf": [ { "$ref": "#/definitions/shared" } ],
|
||||
"properties": {
|
||||
"runMode": {
|
||||
"type": "string",
|
||||
"enum": [ "Continuous", "OnDemand" ],
|
||||
"description": "Determines the run mode of the Azure Webjob. \n\n Triggered: manually triggered \n Scheduled: runs on a specific schedule \n Continuous: runs all the time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"oneOf": [
|
||||
{ "$ref": "#/definitions/scheduled" },
|
||||
{ "$ref": "#/definitions/notScheduled" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"a": 6,
|
||||
"b": "a",
|
||||
"q": {"a": [], "b": "qq"},
|
||||
"s": [{}]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"a": <warning descr="Type is not allowed. Expected: string.">6</warning>,
|
||||
<warning descr="Property 'b' is not allowed">"b": "a"</warning>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"a": <warning descr="Type is not allowed. Expected: string.">5</warning>,
|
||||
"b": <warning descr="Type is not allowed. Expected: string.">7</warning>,
|
||||
"c": <warning descr="Type is not allowed. Expected: string.">9</warning>
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"a": "a",
|
||||
"b": <warning descr="Type is not allowed. Expected: string.">5</warning>,
|
||||
"x25": "q",
|
||||
"x255": <warning descr="Type is not allowed. Expected: string.">7</warning>,
|
||||
"0x256": <warning descr="Type is not allowed. Expected: string.">true</warning>,
|
||||
"x025": "fail"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
<warning descr="Property 'b' is not allowed">"b": 5</warning>,
|
||||
"x25": "q",
|
||||
"x255": <warning descr="Type is not allowed. Expected: string.">7</warning>,
|
||||
"0x256": <warning descr="Type is not allowed. Expected: string.">true</warning>,
|
||||
<warning descr="Property 'x025' is not allowed">"x025": "fail"</warning>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"a": 5,
|
||||
"b": 6,
|
||||
"c": 7
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
"a": "5",
|
||||
"b": 6,
|
||||
"c": 7
|
||||
}</warning>
|
||||
@@ -0,0 +1,17 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": false,
|
||||
"noEmitOnError": true,
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"target": "es5",
|
||||
"declaration": true,
|
||||
"module": "amd",
|
||||
"moduleResolution": "classic"
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"wwwroot"
|
||||
],
|
||||
"files": []
|
||||
}</warning>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">true</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">5</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">"s"</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Type is not allowed. Expected: boolean.">5</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">5</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">5</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Type is not allowed. Expected one of: boolean, string.">5</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": "a"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": ["", <warning descr="Type is not allowed. Expected: string.">true</warning>, <warning descr="Type is not allowed. Expected: string.">5</warning>]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": ["", 5, <warning descr="Additional items are not allowed">5</warning>]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": [<warning descr="Type is not allowed. Expected: string.">5</warning>, <warning descr="Type is not allowed. Expected: number.">"a"</warning>, <warning descr="Type is not allowed. Expected: boolean.">5</warning>, true, <warning descr="Type is not allowed. Expected: boolean.">"A"</warning>]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">["a", 5, true, false,true, false, true]</warning>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": ["a", 5, true, false,true, false]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": ["a", 5, true, 5, true, false, true]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": [5, 5, true, false, true, false, true]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": ["a", "a", true, false, true, false, true]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">["a"]</warning>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">[]</warning>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
|
||||
"a": ["a", 5]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Validates against 'not' schema">[5, 5, true, false, true, 5]</warning>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
|
||||
"a": 5,
|
||||
"b": 5
|
||||
}</warning>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
|
||||
"a": 5,
|
||||
"b": "a"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
|
||||
"a": 5,
|
||||
"b": 5,
|
||||
"c": 5
|
||||
}</warning>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
|
||||
"a": 5,
|
||||
"b": 5,
|
||||
"x": 5
|
||||
}</warning>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
|
||||
"a": "a",
|
||||
"x": "a",
|
||||
"c": "a",
|
||||
"cx": "a"
|
||||
}</warning>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
|
||||
"a": <warning descr="Value should be one of: 2, 3, 4, 1">5</warning>,
|
||||
"b": 5,
|
||||
"c": 5
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
|
||||
"a": {
|
||||
"a": {
|
||||
"a": <warning descr="Type is not allowed. Expected: object.">5</warning>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
|
||||
"a": {
|
||||
"a": {
|
||||
"a": <warning descr="Type is not allowed. Expected: object.">5</warning>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
|
||||
"a": {
|
||||
"a": {
|
||||
"a": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
|
||||
"a": {
|
||||
"a": {
|
||||
"a": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"aa": {
|
||||
"type": "string"
|
||||
},
|
||||
"bb": 5,
|
||||
"ccbb": 7
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<warning descr="Validates against 'not' schema">{
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": false,
|
||||
"noEmitOnError": true,
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"target": "es5",
|
||||
"declaration": 5,
|
||||
"module": "amd",
|
||||
"moduleResolution": "classic"
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"wwwroot"
|
||||
],
|
||||
"files": []
|
||||
}</warning>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"webJobName": "ProcessQueryJob",
|
||||
"startTime": null,
|
||||
"endTime": null,
|
||||
"jobRecurrenceFrequency": "Day",
|
||||
"runMode": "Continuous",
|
||||
"interval": 5
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"title": "JSON schema for Azure Webjobs configuration files",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
||||
"type": "object",
|
||||
"required": [ "runMode" ],
|
||||
|
||||
"definitions": {
|
||||
"shared": {
|
||||
"properties": {
|
||||
"webJobName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Azure Webjob."
|
||||
},
|
||||
"startTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The start time of a scheduled job. Example. 2014-06-11T00:00:00-08:00"
|
||||
},
|
||||
"endTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The end time of a scheduled job. Example. 2014-06-12T00:00:00-08:00"
|
||||
},
|
||||
"jobRecurrenceFrequency": {
|
||||
"type": "string",
|
||||
"enum": [ "Second", "Minute", "Hour", "Day", "Week", "Month" ],
|
||||
"description": "The frequency metric used with the 'interval' property."
|
||||
},
|
||||
"interval": {
|
||||
"type": "integer",
|
||||
"description": "The interval of how often the Azure Webjob should run. Use it with the 'jobRecurrenceFrequency' property."
|
||||
}
|
||||
}
|
||||
},
|
||||
"scheduled": {
|
||||
"required": [ "webJobName", "startTime", "endTime", "jobRecurrenceFrequency", "interval" ],
|
||||
"allOf": [ { "$ref": "#/definitions/shared" } ],
|
||||
"properties": {
|
||||
"runMode": {
|
||||
"type": "string",
|
||||
"enum": [ "Scheduled" ],
|
||||
"description": "Determines the run mode of the Azure Webjob. \n\n Triggered: manually triggered \n Scheduled: runs on a specific schedule \n Continuous: runs all the time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notScheduled": {
|
||||
"required": [ "runMode" ],
|
||||
"allOf": [ { "$ref": "#/definitions/shared" } ],
|
||||
"properties": {
|
||||
"runMode": {
|
||||
"type": "string",
|
||||
"enum": [ "Continuous", "OnDemand" ],
|
||||
"description": "Determines the run mode of the Azure Webjob. \n\n Triggered: manually triggered \n Scheduled: runs on a specific schedule \n Continuous: runs all the time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"oneOf": [
|
||||
{ "$ref": "#/definitions/scheduled" },
|
||||
{ "$ref": "#/definitions/notScheduled" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user