diff --git a/packages/context/api.d.ts b/packages/context/api.d.ts index d441375fa..d7ac21965 100644 --- a/packages/context/api.d.ts +++ b/packages/context/api.d.ts @@ -1,5 +1,6 @@ export { getContext, + isContext, getCDNBaseUrl, initializeManifestData, initializeUI5YamlData, diff --git a/packages/context/package.json b/packages/context/package.json index baf2c8228..ce513734f 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -20,13 +20,11 @@ "@sap-ux/edmx-parser": "0.5.13", "@sap-ux/project-access": "1.1.1", "@ui5-language-assistant/logic-utils": "4.0.5", + "@ui5-language-assistant/settings": "4.0.5", "fs-extra": "10.1.0", "globby": "11.1.0", - "https-proxy-agent": "5.0.1", "js-yaml": "4.1.0", "lodash": "4.17.21", - "node-fetch": "3.2.10", - "proxy-from-env": "1.1.0", "semver": "7.3.7", "vscode-languageserver": "8.0.2", "vscode-uri": "2.1.2" @@ -41,7 +39,8 @@ "@ui5-language-assistant/test-framework": "4.0.5", "@ui5-language-assistant/test-utils": "4.0.5", "rimraf": "3.0.2", - "tmp-promise": "3.0.2" + "tmp-promise": "3.0.2", + "proxyquire": "2.1.3" }, "scripts": { "ci": "npm-run-all clean compile lint coverage", diff --git a/packages/context/src/api.ts b/packages/context/src/api.ts index 4dcb19e24..5ab1526c5 100644 --- a/packages/context/src/api.ts +++ b/packages/context/src/api.ts @@ -34,17 +34,33 @@ export { export async function getContext( documentPath: string, modelCachePath?: string -): Promise { - const manifestDetails = await getManifestDetails(documentPath); - const yamlDetails = await getYamlDetails(documentPath); - const ui5Model = await getSemanticModel( - modelCachePath, - yamlDetails.framework, - manifestDetails.minUI5Version - ); - const services = await getServices(documentPath); - const customViewId = await getCustomViewId(documentPath); - return { manifestDetails, yamlDetails, ui5Model, services, customViewId }; +): Promise { + try { + const manifestDetails = await getManifestDetails(documentPath); + const yamlDetails = await getYamlDetails(documentPath); + const ui5Model = await getSemanticModel( + modelCachePath, + yamlDetails.framework, + manifestDetails.minUI5Version + ); + const services = await getServices(documentPath); + const customViewId = await getCustomViewId(documentPath); + return { manifestDetails, yamlDetails, ui5Model, services, customViewId }; + } catch (error) { + return error as Error; + } } +/** + * Checks if data is context or an error + */ +export const isContext = ( + data: Context | (Error & { code?: string }) +): data is Context => { + if ((data as Context).ui5Model) { + return true; + } + return false; +}; + export const DEFAULT_I18N_NAMESPACE = "translation"; diff --git a/packages/context/src/types.ts b/packages/context/src/types.ts index f88d24a78..bdcea7268 100644 --- a/packages/context/src/types.ts +++ b/packages/context/src/types.ts @@ -4,6 +4,7 @@ import type { } from "@ui5-language-assistant/semantic-model-types"; import { ConvertedMetadata } from "@sap-ux/vocabularies-types"; import type { Manifest } from "@sap-ux/project-access"; +import { FetchResponse } from "@ui5-language-assistant/logic-utils"; export const DEFAULT_UI5_FRAMEWORK = "SAPUI5"; export const DEFAULT_UI5_VERSION = "1.71.49"; @@ -111,9 +112,4 @@ export type CAPProjectKind = "Java" | "NodeJS"; export type ProjectKind = CAPProjectKind | "UI5"; export type Project = UI5Project | CAPProject; export type ProjectType = typeof UI5_PROJECT_TYPE | typeof CAP_PROJECT_TYPE; -export type FetchResponse = { - ok: boolean; - status: number; - json: () => Promise; -}; export type Fetcher = (url: string) => Promise; diff --git a/packages/context/src/ui5-model.ts b/packages/context/src/ui5-model.ts index ea8115b9c..d385782fd 100644 --- a/packages/context/src/ui5-model.ts +++ b/packages/context/src/ui5-model.ts @@ -13,7 +13,7 @@ import { TypeNameFix, } from "@ui5-language-assistant/semantic-model"; import { Fetcher } from "./types"; -import fetch from "./fetch"; +import { fetch } from "@ui5-language-assistant/logic-utils"; import { getLibraryAPIJsonUrl, getLogger, @@ -124,7 +124,11 @@ async function createSemanticModelWithFetcher( // If the file doesn't exist in the cache (or we couldn't read it), fetch it from the network if (apiJson === undefined) { getLogger().info("No cache found for UI5 lib", { libName }); - const url = getLibraryAPIJsonUrl(framework, version as string, libName); + const url = await getLibraryAPIJsonUrl( + framework, + version as string, + libName + ); const response = await fetcher(url); if (response.ok) { apiJson = await response.json(); @@ -256,7 +260,7 @@ async function getVersionInfo( } let versionInfo = await readFromCache(cacheFilePath); if (versionInfo === undefined) { - const url = getVersionInfoUrl(framework, version); + const url = await getVersionInfoUrl(framework, version); const response = await fetcher(url); if (response.ok) { versionInfo = await response.json(); diff --git a/packages/context/src/utils/ui5.ts b/packages/context/src/utils/ui5.ts index 756a47734..d2e67fa78 100644 --- a/packages/context/src/utils/ui5.ts +++ b/packages/context/src/utils/ui5.ts @@ -1,10 +1,31 @@ import { UI5Framework } from "@ui5-language-assistant/semantic-model-types"; import { UI5_FRAMEWORK_CDN_BASE_URL } from "../types"; +import { getLogger } from "../utils"; +import { tryFetch, getLocalUrl } from "@ui5-language-assistant/logic-utils"; -export function getCDNBaseUrl( +/** + * Get CDN URL for UI5 framework. If a URL for `SAPUI5 Web Server` is maintained in settings, it appends UI5 version if available and tries to check if this URL is responding and return it, + * if it fails, it appends UI5 version if available to a public URL and return it + * + * @param framework UI5 framework e.g OpenUI5" | "SAPUI5" + * @param version min ui5 version specified in manifest.json file + */ +export async function getCDNBaseUrl( framework: UI5Framework, version: string | undefined -): string { +): Promise { + const localUrl = getLocalUrl(version); + if (localUrl) { + const response = await tryFetch(localUrl); + if (response) { + return localUrl; + } + + getLogger().info("Failed to load. Will try over internet.", { + localUrl, + }); + } + let url = UI5_FRAMEWORK_CDN_BASE_URL[framework]; if (version) { url += `${version}/`; @@ -16,20 +37,20 @@ export function getVersionJsonUrl(framework: UI5Framework): string { return `${UI5_FRAMEWORK_CDN_BASE_URL[framework]}version.json`; } -export function getVersionInfoUrl( +export async function getVersionInfoUrl( framework: UI5Framework, version: string -): string { - const cdnBaseUrl = getCDNBaseUrl(framework, version); +): Promise { + const cdnBaseUrl = await getCDNBaseUrl(framework, version); return `${cdnBaseUrl}resources/sap-ui-version.json`; } -export function getLibraryAPIJsonUrl( +export async function getLibraryAPIJsonUrl( framework: UI5Framework, version: string, libName: string -): string { - const cdnBaseUrl = getCDNBaseUrl(framework, version); +): Promise { + const cdnBaseUrl = await getCDNBaseUrl(framework, version); const baseUrl = `${cdnBaseUrl}test-resources/`; const suffix = "/designtime/api.json"; return baseUrl + libName.replace(/\./g, "/") + suffix; diff --git a/packages/context/test/api-spec.ts b/packages/context/test/api-spec.ts index e298ff940..454dc2eeb 100644 --- a/packages/context/test/api-spec.ts +++ b/packages/context/test/api-spec.ts @@ -5,7 +5,8 @@ import * as ui5Yaml from "../src/ui5-yaml"; import * as ui5Model from "../src/ui5-model"; import * as services from "../src/services"; import { UI5SemanticModel } from "@ui5-language-assistant/semantic-model-types"; -import { getContext } from "../src/api"; +import { getContext, isContext } from "../src/api"; +import type { Context } from "../src/types"; describe("context", () => { afterEach(() => { @@ -47,5 +48,40 @@ describe("context", () => { "ui5Model" ); }); + it("throw connection error", async () => { + const getManifestDetailsStub = stub( + manifest, + "getManifestDetails" + ).resolves({ + mainServicePath: "/", + customViews: {}, + flexEnabled: false, + minUI5Version: undefined, + }); + const getYamlDetailsStub = stub(ui5Yaml, "getYamlDetails").resolves({ + framework: "OpenUI5", + version: undefined, + }); + const getSemanticModelStub = stub(ui5Model, "getSemanticModel").throws({ + code: "ENOTFOUND", + }); + const result = await getContext("path/to/xml/file"); + expect(getManifestDetailsStub).to.have.been.called; + expect(getYamlDetailsStub).to.have.been.called; + expect(getSemanticModelStub).to.have.been.called; + expect(result).to.have.keys("code"); + }); + }); + context("isContext", () => { + it("check true", () => { + const result = isContext({ ui5Model: {} } as Context); + expect(result).to.be.true; + }); + it("check false", () => { + const result = isContext({ code: "ENOTFOUND" } as Error & { + code?: string; + }); + expect(result).to.be.false; + }); }); }); diff --git a/packages/context/test/utils/ui5-spec.ts b/packages/context/test/utils/ui5-spec.ts new file mode 100644 index 000000000..f9d511c2f --- /dev/null +++ b/packages/context/test/utils/ui5-spec.ts @@ -0,0 +1,57 @@ +import { restore, fake } from "sinon"; +import { join } from "path"; +import proxyquire from "proxyquire"; +import { expect } from "chai"; +import { getCDNBaseUrl } from "../../src/utils/ui5"; + +describe("ui5", () => { + afterEach(() => { + restore(); + }); + context("getCDNBaseUrl", () => { + it("get CDN without local url [with version]", async () => { + const result = await getCDNBaseUrl("SAPUI5", "1.111.0"); + expect(result).to.be.equal("https://ui5.sap.com/1.111.0/"); + }); + it("get CDN without local url [without version]", async () => { + const result = await getCDNBaseUrl("SAPUI5", undefined); + expect(result).to.be.equal("https://ui5.sap.com/"); + }); + it("get CDN with local url", async () => { + const filePath = join(__dirname, "..", "..", "src", "utils", "ui5"); + const fakeGetLocalUrl = fake.returns("http://localhost:3000/1.111.0/"); + const fakeTryFetch = fake.resolves({ ok: true }); + const ui5Module = proxyquire + .noPreserveCache() + .noCallThru() + .load(filePath, { + "@ui5-language-assistant/logic-utils": { + getLocalUrl: fakeGetLocalUrl, + tryFetch: fakeTryFetch, + }, + }); + const result = await ui5Module.getCDNBaseUrl("SAPUI5", "1.111.0"); + expect(fakeGetLocalUrl).to.have.been.called; + expect(fakeTryFetch).to.have.been.called; + expect(result).to.be.equal("http://localhost:3000/1.111.0/"); + }); + it("get CDN with local url [fetch not responding => fall back to public]", async () => { + const filePath = join(__dirname, "..", "..", "src", "utils", "ui5"); + const fakeGetLocalUrl = fake.returns("http://localhost:3000/1.111.0/"); + const fakeTryFetch = fake.resolves(undefined); + const ui5Module = proxyquire + .noPreserveCache() + .noCallThru() + .load(filePath, { + "@ui5-language-assistant/logic-utils": { + getLocalUrl: fakeGetLocalUrl, + tryFetch: fakeTryFetch, + }, + }); + const result = await ui5Module.getCDNBaseUrl("SAPUI5", "1.111.0"); + expect(fakeGetLocalUrl).to.have.been.called; + expect(fakeTryFetch).to.have.been.called; + expect(result).to.be.equal("https://ui5.sap.com/1.111.0/"); + }); + }); +}); diff --git a/packages/fe/test/services/utils.ts b/packages/fe/test/services/utils.ts index 34bf3aa04..a52fa8f1d 100644 --- a/packages/fe/test/services/utils.ts +++ b/packages/fe/test/services/utils.ts @@ -1,7 +1,8 @@ import { AnnotationIssue, getCompletionItems } from "../../src/api"; import { CompletionItem } from "vscode-languageserver-types"; import { TestFramework } from "@ui5-language-assistant/test-framework"; -import { getContext, Context } from "@ui5-language-assistant/context"; +import { getContext } from "@ui5-language-assistant/context"; +import type { Context } from "@ui5-language-assistant/context"; import { validateXMLView } from "@ui5-language-assistant/xml-views-validation"; import { CURSOR_ANCHOR } from "@ui5-language-assistant/test-framework"; @@ -52,7 +53,7 @@ export const getViewCompletionProvider = ( content, offset ); - const context = await getContext(documentPath); + const context = (await getContext(documentPath)) as Context; result = getCompletionItems({ ast, @@ -102,7 +103,7 @@ export const getViewValidator = ( insertAfter: "", }); const { ast } = await framework.readFile(viewFilePathSegments); - const context = await getContext(documentPath); + const context = (await getContext(documentPath)) as Context; result = validateXMLView({ validators: { attribute: [validator], diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts index d127e95fd..00ee87016 100644 --- a/packages/language-server/src/server.ts +++ b/packages/language-server/src/server.ts @@ -22,6 +22,8 @@ import { setSettingsForDocument, hasSettingsForDocument, getSettingsForDocument, + setConfigurationSettings, + Settings, } from "@ui5-language-assistant/settings"; import { commands } from "@ui5-language-assistant/user-facing-text"; import { ServerInitializationOptions } from "../api"; @@ -38,6 +40,7 @@ import { reactOnCdsFileChange, reactOnXmlFileChange, reactOnPackageJson, + isContext, } from "@ui5-language-assistant/context"; import { diagnosticToCodeActionFix } from "./quick-fix"; import { executeCommand } from "./commands"; @@ -107,6 +110,11 @@ connection.onInitialized(async () => { connection.client.register(DidChangeConfigurationNotification.type, { section: "UI5LanguageAssistant", }); + // set config settings + const result = (await connection.workspace.getConfiguration({ + section: "UI5LanguageAssistant", + })) as Settings; + setConfigurationSettings(result); } }); @@ -126,12 +134,20 @@ connection.onCompletion( documentPath, initializationOptions?.modelCachePath ); + if (!isContext(context)) { + connection.sendNotification( + "UI5LanguageAssistant/context-error", + context + ); + return []; + } const version = context.ui5Model.version; const framework = context.yamlDetails.framework; const isFallback = context.ui5Model.isFallback; const isIncorrectVersion = context.ui5Model.isIncorrectVersion; + const url = await getCDNBaseUrl(framework, version); connection.sendNotification("UI5LanguageAssistant/ui5Model", { - url: getCDNBaseUrl(framework, version), + url, framework, version, isFallback, @@ -175,12 +191,20 @@ connection.onHover( documentPath, initializationOptions?.modelCachePath ); + if (!isContext(context)) { + connection.sendNotification( + "UI5LanguageAssistant/context-error", + context + ); + return; + } const version = context.ui5Model.version; const framework = context.yamlDetails.framework; const isFallback = context.ui5Model.isFallback; const isIncorrectVersion = context.ui5Model.isIncorrectVersion; + const url = await getCDNBaseUrl(framework, version); connection.sendNotification("UI5LanguageAssistant/ui5Model", { - url: getCDNBaseUrl(framework, version), + url, framework, version, isFallback, @@ -225,6 +249,13 @@ const validateOpenDocuments = async (changes: FileEvent[]): Promise => { documentPath, initializationOptions?.modelCachePath ); + if (!isContext(context)) { + connection.sendNotification( + "UI5LanguageAssistant/context-error", + context + ); + return; + } const diagnostics = getXMLViewDiagnostics({ document, context, @@ -259,44 +290,57 @@ connection.onDidChangeWatchedFiles(async (changeEvent) => { await validateOpenDocuments(changeEvent.changes); }); -documents.onDidChangeContent(async (changeEvent) => { - getLogger().trace("`onDidChangeContent` event", { changeEvent }); - if ( - manifestStateInitialized === undefined || - ui5yamlStateInitialized === undefined || - !isXMLView(changeEvent.document.uri) - ) { - return; - } +documents.onDidChangeContent( + async (changeEvent): Promise => { + getLogger().trace("`onDidChangeContent` event", { changeEvent }); + if ( + manifestStateInitialized === undefined || + ui5yamlStateInitialized === undefined || + !isXMLView(changeEvent.document.uri) + ) { + return; + } - await Promise.all([manifestStateInitialized, ui5yamlStateInitialized]); - const documentUri = changeEvent.document.uri; - const document = documents.get(documentUri); - if (document !== undefined) { - const documentPath = URI.parse(documentUri).fsPath; - const context = await getContext( - documentPath, - initializationOptions?.modelCachePath - ); - const version = context.ui5Model.version; - const framework = context.yamlDetails.framework; - const isFallback = context.ui5Model.isFallback; - const isIncorrectVersion = context.ui5Model.isIncorrectVersion; - connection.sendNotification("UI5LanguageAssistant/ui5Model", { - url: getCDNBaseUrl(framework, version), - framework, - version, - isFallback, - isIncorrectVersion, - }); - const diagnostics = getXMLViewDiagnostics({ - document, - context, - }); - getLogger().trace("computed diagnostics", { diagnostics }); - connection.sendDiagnostics({ uri: changeEvent.document.uri, diagnostics }); + await Promise.all([manifestStateInitialized, ui5yamlStateInitialized]); + const documentUri = changeEvent.document.uri; + const document = documents.get(documentUri); + if (document !== undefined) { + const documentPath = URI.parse(documentUri).fsPath; + const context = await getContext( + documentPath, + initializationOptions?.modelCachePath + ); + if (!isContext(context)) { + connection.sendNotification( + "UI5LanguageAssistant/context-error", + context + ); + return; + } + const version = context.ui5Model.version; + const framework = context.yamlDetails.framework; + const isFallback = context.ui5Model.isFallback; + const isIncorrectVersion = context.ui5Model.isIncorrectVersion; + const url = await getCDNBaseUrl(framework, version); + connection.sendNotification("UI5LanguageAssistant/ui5Model", { + url, + framework, + version, + isFallback, + isIncorrectVersion, + }); + const diagnostics = getXMLViewDiagnostics({ + document, + context, + }); + getLogger().trace("computed diagnostics", { diagnostics }); + connection.sendDiagnostics({ + uri: changeEvent.document.uri, + diagnostics, + }); + } } -}); +); connection.onCodeAction(async (params) => { getLogger().debug("`onCodeAction` event", { params }); @@ -304,7 +348,7 @@ connection.onCodeAction(async (params) => { const docUri = params.textDocument.uri; const textDocument = documents.get(docUri); if (textDocument === undefined) { - return undefined; + return; } const documentPath = URI.parse(docUri).fsPath; @@ -312,12 +356,17 @@ connection.onCodeAction(async (params) => { documentPath, initializationOptions?.modelCachePath ); + if (!isContext(context)) { + connection.sendNotification("UI5LanguageAssistant/context-error", context); + return; + } const version = context.ui5Model.version; const framework = context.yamlDetails.framework; const isFallback = context.ui5Model.isFallback; const isIncorrectVersion = context.ui5Model.isIncorrectVersion; + const url = await getCDNBaseUrl(framework, version); connection.sendNotification("UI5LanguageAssistant/ui5Model", { - url: getCDNBaseUrl(framework, version), + url, framework, version, isFallback, @@ -376,6 +425,13 @@ connection.onDidChangeConfiguration((change) => { setGlobalSettings(ui5LangAssistSettings); } } + if (change.settings.UI5LanguageAssistant !== undefined) { + const ui5LangAssistSettings = change.settings.UI5LanguageAssistant; + getLogger().trace("Set configuration settings", { + ui5LangAssistSettings, + }); + setConfigurationSettings(ui5LangAssistSettings); + } // In the future we might want to // re-validate the files related to the `cached document settings`. diff --git a/packages/logic-utils/api.d.ts b/packages/logic-utils/api.d.ts index 53731d089..606755208 100644 --- a/packages/logic-utils/api.d.ts +++ b/packages/logic-utils/api.d.ts @@ -269,4 +269,9 @@ export { getLogger, setLogLevel, LogLevel, + fetch, + tryFetch, + getLocalUrl, } from "./src/api"; + +export { FetchResponse } from "./src/utils/types"; diff --git a/packages/logic-utils/package.json b/packages/logic-utils/package.json index 7675386f4..3f9ea1e50 100644 --- a/packages/logic-utils/package.json +++ b/packages/logic-utils/package.json @@ -20,7 +20,10 @@ "@ui5-language-assistant/settings": "4.0.5", "@vscode-logging/logger": "1.2.2", "@xml-tools/ast": "5.0.0", - "lodash": "4.17.21" + "lodash": "4.17.21", + "node-fetch": "3.2.10", + "https-proxy-agent": "5.0.1", + "proxy-from-env": "1.1.0" }, "devDependencies": { "@ui5-language-assistant/semantic-model": "4.0.5", diff --git a/packages/logic-utils/src/api.ts b/packages/logic-utils/src/api.ts index 6d3fec76f..818eaf81e 100644 --- a/packages/logic-utils/src/api.ts +++ b/packages/logic-utils/src/api.ts @@ -43,3 +43,6 @@ export { setLogLevel, LogLevel, } from "./utils/logger"; + +export { fetch } from "./utils/fetch"; +export { tryFetch, getLocalUrl } from "./utils/fetch-helper"; diff --git a/packages/logic-utils/src/utils/fetch-helper.ts b/packages/logic-utils/src/utils/fetch-helper.ts new file mode 100644 index 000000000..77aca650a --- /dev/null +++ b/packages/logic-utils/src/utils/fetch-helper.ts @@ -0,0 +1,34 @@ +import { getConfigurationSettings } from "@ui5-language-assistant/settings"; +import { Response } from "node-fetch"; +import { fetch } from "./fetch"; + +export const getLocalUrl = ( + version?: string, + config = getConfigurationSettings() +): string | undefined => { + const webServer = config.SAPUI5WebServer; + if (webServer) { + let localUrl = webServer.endsWith("/") ? webServer : `${webServer}/`; + + if (version) { + localUrl += `${version}/`; + } + return localUrl; + } + return undefined; +}; + +/** + * Try to fetch for a given URI. On fail, it returns undefined + */ +export const tryFetch = async (uri: string): Promise => { + try { + const response = await fetch(uri); + if (response.ok) { + return response; + } + } catch (error) { + return undefined; + } + return undefined; +}; diff --git a/packages/context/src/fetch.ts b/packages/logic-utils/src/utils/fetch.ts similarity index 94% rename from packages/context/src/fetch.ts rename to packages/logic-utils/src/utils/fetch.ts index b29a7b5e3..d6518f2d1 100644 --- a/packages/context/src/fetch.ts +++ b/packages/logic-utils/src/utils/fetch.ts @@ -31,7 +31,7 @@ const nodeFetchCached = new Promise((done, reject) => { return nodeFetch; })() .then((result) => done(result)) - .catch((error) => reject(error)); + .catch(/* istanbul ignore next */ (error) => reject(error)); }); /** @@ -40,7 +40,7 @@ const nodeFetchCached = new Promise((done, reject) => { * @param init the init opts * @returns a Promise returning the response object */ -export default async function fetch( +export async function fetch( url: RequestInfo, init?: RequestInit ): Promise { diff --git a/packages/logic-utils/src/utils/types.ts b/packages/logic-utils/src/utils/types.ts new file mode 100644 index 000000000..ba5996fa1 --- /dev/null +++ b/packages/logic-utils/src/utils/types.ts @@ -0,0 +1,5 @@ +export type FetchResponse = { + ok: boolean; + status: number; + json: () => Promise; +}; diff --git a/packages/logic-utils/test/utils/fetch-helper-spec.ts b/packages/logic-utils/test/utils/fetch-helper-spec.ts new file mode 100644 index 000000000..665de4dc3 --- /dev/null +++ b/packages/logic-utils/test/utils/fetch-helper-spec.ts @@ -0,0 +1,55 @@ +import { Settings } from "@ui5-language-assistant/settings"; +import { expect } from "chai"; +import { restore, stub } from "sinon"; +import * as fetchUtils from "../../src/utils/fetch"; +import { tryFetch, getLocalUrl } from "../../src/utils/fetch-helper"; + +describe("fetch-helper", () => { + afterEach(() => { + restore(); + }); + context("localUrl", () => { + it("check undefined", () => { + const result = getLocalUrl(); + expect(result).to.be.undefined; + }); + it("get local url without version [it adds forward slash]", () => { + const result = getLocalUrl(undefined, { + SAPUI5WebServer: "my.test.web.server", + } as Settings); + expect(result).to.be.equal("my.test.web.server/"); + }); + it("get local url without version", () => { + const result = getLocalUrl(undefined, { + SAPUI5WebServer: "my.test.web.server/", + } as Settings); + expect(result).to.be.equal("my.test.web.server/"); + }); + it("get local url with version", () => { + const result = getLocalUrl("1.110.1", { + SAPUI5WebServer: "my.test.web.server/", + } as Settings); + expect(result).to.be.equal("my.test.web.server/1.110.1/"); + }); + }); + context("tryFetch", () => { + it("check response", async () => { + const fetchStub = stub(fetchUtils, "fetch").resolves({ ok: true } as any); + const result = await tryFetch("/abc"); + expect(fetchStub).to.be.called; + expect(result).to.be.deep.equal({ ok: true }); + }); + it("check undefined [response ok = false]", async () => { + const fetchStub = stub(fetchUtils, "fetch").resolves({ + ok: false, + } as any); + const result = await tryFetch("/abc"); + expect(fetchStub).to.be.called; + expect(result).to.be.undefined; + }); + it("check undefined [throw exception]", async () => { + const result = await tryFetch("/dummy/uri"); + expect(result).to.be.undefined; + }); + }); +}); diff --git a/packages/logic-utils/test/utils/fetch-spec.ts b/packages/logic-utils/test/utils/fetch-spec.ts new file mode 100644 index 000000000..74fce74c9 --- /dev/null +++ b/packages/logic-utils/test/utils/fetch-spec.ts @@ -0,0 +1,56 @@ +import proxyquire from "proxyquire"; +import { join } from "path"; +import { expect } from "chai"; +import { fake } from "sinon"; +describe("fetch", () => { + it("fetch without getProxyForUrl", async () => { + const filePath = join(__dirname, "..", "..", "src", "utils", "fetch"); + const fakeGetProxyForUrl = fake.returns(undefined); + const fakeFetch = fake.resolves("ok"); + const fetchModule = proxyquire + .noPreserveCache() + .noCallThru() + .load(filePath, { + "proxy-from-env": { + getProxyForUrl: fakeGetProxyForUrl, + }, + "node-fetch": fakeFetch, + }); + const result = await fetchModule.fetch("test/url"); + expect(fakeGetProxyForUrl).to.have.been.called; + expect(fakeFetch).to.have.been.called; + expect(fakeFetch).to.have.been.calledWith("test/url", undefined); + expect(result).to.be.equal("ok"); + }); + it("fetch with getProxyForUrl", async () => { + const filePath = join(__dirname, "..", "..", "src", "utils", "fetch"); + const fakeGetProxyForUrl = fake.returns("proxy-value"); + const fakeFetch = fake.resolves("ok"); + const fakeHttpsProxyAgent = fake.returns({ + pathname: "proxy-value", + path: "proxy-value", + href: "proxy-value", + }); + const fetchModule = proxyquire + .noPreserveCache() + .noCallThru() + .load(filePath, { + "proxy-from-env": { + getProxyForUrl: fakeGetProxyForUrl, + }, + "node-fetch": fakeFetch, + "https-proxy-agent": fakeHttpsProxyAgent, + }); + const result = await fetchModule.fetch("test/url"); + expect(fakeGetProxyForUrl).to.have.been.called; + expect(fakeFetch).to.have.been.called; + expect(fakeFetch).to.have.been.calledWith("test/url", { + agent: { + pathname: "proxy-value", + path: "proxy-value", + href: "proxy-value", + }, + }); + expect(result).to.be.equal("ok"); + }); +}); diff --git a/packages/settings/api.d.ts b/packages/settings/api.d.ts index a5b06bdac..130c53dab 100644 --- a/packages/settings/api.d.ts +++ b/packages/settings/api.d.ts @@ -1,5 +1,22 @@ -import Thenable from "vscode-languageserver"; -export type Settings = CodeAssistSettings & TraceSettings & LoggingSettings; +export { + getSettingsForDocument, + hasSettingsForDocument, + clearSettings, + clearDocumentSettings, + setGlobalSettings, + getDefaultSettings, + setSettingsForDocument, + setConfigurationSettings, + getConfigurationSettings, +} from "./src/api"; +export type Settings = CodeAssistSettings & + TraceSettings & + LoggingSettings & + WebServerSettings; + +export interface WebServerSettings { + SAPUI5WebServer?: string; +} export interface CodeAssistSettings { codeAssist: { @@ -39,20 +56,3 @@ export interface IValidLoggingLevelValues { } export const validLoggingLevelValues: IValidLoggingLevelValues; - -export function getSettingsForDocument(resource: string): Thenable; - -export function hasSettingsForDocument(resource: string): boolean; - -export function setSettingsForDocument( - resource: string, - settings: Thenable -): void; - -export function clearSettings(): void; - -export function clearDocumentSettings(resource: string): void; - -export function setGlobalSettings(settings: Settings): void; - -export function getDefaultSettings(): Settings; diff --git a/packages/settings/src/api.ts b/packages/settings/src/api.ts index 738697e90..9e6d49fba 100644 --- a/packages/settings/src/api.ts +++ b/packages/settings/src/api.ts @@ -6,6 +6,8 @@ export { clearSettings, clearDocumentSettings, getDefaultSettings, + setConfigurationSettings, + getConfigurationSettings, } from "./settings"; export const validTraceServerValues = { diff --git a/packages/settings/src/settings.ts b/packages/settings/src/settings.ts index 0df5b54fc..15be93786 100644 --- a/packages/settings/src/settings.ts +++ b/packages/settings/src/settings.ts @@ -7,6 +7,7 @@ const defaultSettings: Settings = { codeAssist: { deprecated: false, experimental: false }, trace: { server: "off" }, logging: { level: "error" }, + SAPUI5WebServer: "", }; deepFreezeStrict(defaultSettings); @@ -14,6 +15,10 @@ deepFreezeStrict(defaultSettings); // Please note that this is not the case when using this server with VSCode or Theia // but could happen with other clients. let globalSettings: Settings = defaultSettings; +/** + * Configuration settings + */ +let configSettings: Settings = defaultSettings; // Cache the settings of all open documents const documentSettings: Map> = new Map(); @@ -58,3 +63,11 @@ export function setGlobalSettings(settings: Settings): void { globalSettings = cloneDeep(settings); deepFreezeStrict(globalSettings); } + +export function setConfigurationSettings(settings: Settings): void { + configSettings = cloneDeep(settings); + deepFreezeStrict(configSettings); +} +export function getConfigurationSettings(): Settings { + return deepFreezeStrict(configSettings); +} diff --git a/packages/settings/test/settings-spec.ts b/packages/settings/test/settings-spec.ts index cc238a1b5..202c09b75 100644 --- a/packages/settings/test/settings-spec.ts +++ b/packages/settings/test/settings-spec.ts @@ -6,6 +6,8 @@ import { hasSettingsForDocument, clearDocumentSettings, clearSettings, + setConfigurationSettings, + getConfigurationSettings, } from "../src/api"; import { resetSettings } from "../src/settings"; import { expect } from "chai"; @@ -210,4 +212,16 @@ context("settings utilities", () => { ); }); }); + describe("configuration settings", () => { + it("setConfigurationSettings", async () => { + const configSettings = { + SAPUI5WebServer: "http://localhost:3000/", + codeAssist: { deprecated: true, experimental: true }, + trace: { server: "off" as const }, + logging: { level: "off" as const }, + }; + setConfigurationSettings(configSettings); + expect(getConfigurationSettings()).to.deep.equal(configSettings); + }); + }); }); diff --git a/packages/vscode-ui5-language-assistant/CONTRIBUTING.md b/packages/vscode-ui5-language-assistant/CONTRIBUTING.md index d9dca4bf9..a89672b95 100644 --- a/packages/vscode-ui5-language-assistant/CONTRIBUTING.md +++ b/packages/vscode-ui5-language-assistant/CONTRIBUTING.md @@ -22,3 +22,7 @@ Running the extension is done by launching the `Launch Client` configuration in The VS Code extension starts the LSP process from the `language-server` package. See the [`language-server` contribution guide](../language-server/CONTRIBUTING.md) for development flows relevant for the LSP server. To see the messages passed between the VS Code extension and the LSP server, in the opened instance of VS Code that has the extension, open `File > Preferences > Settings`, navigate to `Extensions > UI5 Editor Tools` and set the `Trace: server` configuration to `messages` or `verbose`. The messages are written to the output channel `UI5 Editor Tools`. + +## LSP for `manifest.json` file incase of offline mode + +To get complete LSP support for `manifest.json` file incase of offline mode, content of [schema](https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json) _MUST_ be downloaded and saved in `manifest>schema.json` file. Furthermore, its content _MUST_ be scan to identify any `http(s)` references. In case any reference is found, its content _MUST_ be downloaded and saved in `manifest>.json` and its reference _MUST_ be replaced by `"/manifest/.json"` in `manifest>schema.json`. Currently there is only one such case e.g `"https://adaptivecards.io/schemas/adaptive-card.json#/definitions/AdaptiveCard"` for which `adaptive-card.json` file is created and its content is downloaded and paste in that file. Moreover its reference in `manifest>schema.json` is replaced by `"/manifest/adaptive-card.json"` diff --git a/packages/vscode-ui5-language-assistant/package.json b/packages/vscode-ui5-language-assistant/package.json index 49488f92f..b8b362e4e 100644 --- a/packages/vscode-ui5-language-assistant/package.json +++ b/packages/vscode-ui5-language-assistant/package.json @@ -17,6 +17,7 @@ "license": "Apache-2.0", "main": "./lib/src/extension", "activationEvents": [ + "onFileSystem:manifest-schema", "*" ], "contributes": { @@ -27,13 +28,19 @@ "src/manifest.json", "src/main/webapp/manifest.json" ], - "url": "https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json" + "url": "manifest-schema://local" } ], "configuration": { "type": "object", "title": "UI5 Language Assistant", "properties": { + "UI5LanguageAssistant.SAPUI5WebServer": { + "type": "string", + "scope": "window", + "default": "", + "markdownDescription": "Use an alternative (local) web server to serve [SAP UI5 SDK](https://tools.hana.ondemand.com/#sapui5) for enabling offline work." + }, "UI5LanguageAssistant.logging.level": { "type": "string", "enum": [ @@ -100,6 +107,7 @@ "@types/lodash": "4.14.168", "@types/vscode": "1.47.0", "@ui5-language-assistant/settings": "4.0.5", + "@ui5-language-assistant/logic-utils": "4.0.5", "@ui5-language-assistant/user-facing-text": "4.0.5", "lodash": "4.17.21", "proxyquire": "2.1.3", diff --git a/packages/vscode-ui5-language-assistant/src/constants.ts b/packages/vscode-ui5-language-assistant/src/constants.ts index 799dfcb08..b61665034 100644 --- a/packages/vscode-ui5-language-assistant/src/constants.ts +++ b/packages/vscode-ui5-language-assistant/src/constants.ts @@ -1,2 +1,5 @@ export const COMMAND_OPEN_DEMOKIT = "UI5LanguageAssistant.command.openDemokit"; export const LOGGING_LEVEL_CONFIG_PROP = "UI5LanguageAssistant.logging.level"; +export const MANIFEST_SCHEMA = "manifest-schema"; +export const SCHEMA_URI = + "https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json"; diff --git a/packages/vscode-ui5-language-assistant/src/extension.ts b/packages/vscode-ui5-language-assistant/src/extension.ts index 70a1626b9..a9d67b419 100644 --- a/packages/vscode-ui5-language-assistant/src/extension.ts +++ b/packages/vscode-ui5-language-assistant/src/extension.ts @@ -22,7 +22,13 @@ import { SERVER_PATH, ServerInitializationOptions, } from "@ui5-language-assistant/language-server"; -import { COMMAND_OPEN_DEMOKIT, LOGGING_LEVEL_CONFIG_PROP } from "./constants"; +import { + COMMAND_OPEN_DEMOKIT, + LOGGING_LEVEL_CONFIG_PROP, + MANIFEST_SCHEMA, +} from "./constants"; +import { getManifestSchemaProvider } from "./manifest-schema-provider"; +import { getLocalUrl, tryFetch } from "@ui5-language-assistant/logic-utils"; type UI5Model = { url: string; @@ -45,15 +51,25 @@ export async function activate(context: ExtensionContext): Promise { // show/hide and update the status bar client.start().then(() => { - client.onNotification("UI5LanguageAssistant/ui5Model", (model: UI5Model) => - updateCurrentModel(model) + client.onNotification( + "UI5LanguageAssistant/ui5Model", + async (model: UI5Model) => await updateCurrentModel(model) + ); + client.onNotification( + "UI5LanguageAssistant/context-error", + async (error: Error) => await handleContextError(error) ); }); - window.onDidChangeActiveTextEditor(() => { - updateCurrentModel(undefined); + window.onDidChangeActiveTextEditor(async () => { + await updateCurrentModel(undefined); }); client.start(); + + const provider = await getManifestSchemaProvider(context); + context.subscriptions.push( + workspace.registerTextDocumentContentProvider(MANIFEST_SCHEMA, provider) + ); } function createLanguageClient(context: ExtensionContext): LanguageClient { @@ -119,7 +135,7 @@ function createStatusBarItem(context: ExtensionContext): StatusBarItem { return statusBarItem; } -function updateCurrentModel(model: UI5Model | undefined) { +async function updateCurrentModel(model: UI5Model | undefined): Promise { currentModel = model; if (statusBarItem) { if (currentModel) { @@ -134,7 +150,18 @@ function updateCurrentModel(model: UI5Model | undefined) { tooltipText += ` minUI5 version found in manifest.json is out of maintenance or not supported by UI5 Language Assistant. Using fallback to UI5 ${currentModel.version}.`; version = `Fallback: ${currentModel.version}`; } - + const localUrl = getLocalUrl( + version, + workspace.getConfiguration().get("UI5LanguageAssistant") + ); + if (localUrl) { + const response = await tryFetch(localUrl); + if (response) { + version = `${version} (local)`; + tooltipText = + "Alternative (local) SAP UI5 web server is defined in user or workspace settings. Using SAP UI5 version fetched from the local server"; + } + } statusBarItem.tooltip = tooltipText; statusBarItem.text = `$(notebook-mimetype) ${version}${ currentModel.framework === "OpenUI5" ? "'" : "" @@ -146,10 +173,27 @@ function updateCurrentModel(model: UI5Model | undefined) { } } -export function deactivate(): Thenable | undefined { +let showedOnce = false; +function handleContextError(error: Error & { code?: string }) { + if (showedOnce) { + return; + } + showedOnce = true; + if (error.code) { + window.showErrorMessage( + "[SAP UI5 SDK](https://tools.hana.ondemand.com/#sapui5) is not accessible. Connect to the internet or setup local web server for offline work." + ); + } else { + window.showErrorMessage( + "An error has occurred building context. Please open an [issue](https://github.com/SAP/ui5-language-assistant/issues)" + ); + } +} + +export async function deactivate(): Promise> { if (!client) { return undefined; } - updateCurrentModel(undefined); + await updateCurrentModel(undefined); return client.stop(); } diff --git a/packages/vscode-ui5-language-assistant/src/logger.ts b/packages/vscode-ui5-language-assistant/src/logger.ts new file mode 100644 index 000000000..8688eed6e --- /dev/null +++ b/packages/vscode-ui5-language-assistant/src/logger.ts @@ -0,0 +1,15 @@ +import { + getLogger as logger, + ILogger, +} from "@ui5-language-assistant/logic-utils"; + +const getPackageName = (): string => { + // eslint-disable-next-line @typescript-eslint/no-var-requires -- Using `require` for .json file as this gets bundled with webpack correctly. + const meta = require("../../package.json"); + return meta.name; +}; + +const name = getPackageName(); +export const getLogger = (): ILogger => { + return logger(name); +}; diff --git a/packages/vscode-ui5-language-assistant/src/manifest-schema-provider.ts b/packages/vscode-ui5-language-assistant/src/manifest-schema-provider.ts new file mode 100644 index 000000000..91715c0a8 --- /dev/null +++ b/packages/vscode-ui5-language-assistant/src/manifest-schema-provider.ts @@ -0,0 +1,48 @@ +import { + Uri, + TextDocumentContentProvider, + EventEmitter, + ExtensionContext, +} from "vscode"; +import { tryFetch } from "@ui5-language-assistant/logic-utils"; +import { SCHEMA_URI, MANIFEST_SCHEMA } from "./constants"; +import { getSchemaContent } from "./utils"; + +class ManifestSchemaProvider implements TextDocumentContentProvider { + private _schemaContent = ""; + set schemaContent(content: string) { + this._schemaContent = content; + } + get schemaContent(): string { + return this._schemaContent; + } + onDidChange() { + return new EventEmitter(); + } + provideTextDocumentContent(uri: Uri): string { + if (MANIFEST_SCHEMA === uri.scheme) { + return this.schemaContent; + } + return ""; + } +} + +const schemaProvider = new ManifestSchemaProvider(); + +/** + * Get manifest schema provider. It first tries to load "schema.json" over internet. If it fails, it tries + * to read it from local resource + */ +export const getManifestSchemaProvider = async ( + context: ExtensionContext +): Promise => { + let content = ""; + const response = await tryFetch(SCHEMA_URI); + if (response) { + content = await response.text(); + } else { + content = await getSchemaContent(context); + } + schemaProvider.schemaContent = content; + return schemaProvider; +}; diff --git a/packages/vscode-ui5-language-assistant/src/manifest/adaptive-card.json b/packages/vscode-ui5-language-assistant/src/manifest/adaptive-card.json new file mode 100644 index 000000000..95bcbaddf --- /dev/null +++ b/packages/vscode-ui5-language-assistant/src/manifest/adaptive-card.json @@ -0,0 +1,2921 @@ +{ + "$schema": "http://json-schema.org/draft-06/schema#", + "id": "http://adaptivecards.io/schemas/adaptive-card.json", + "definitions": { + "Action.Execute": { + "description": "Gathers input fields, merges with optional data field, and sends an event to the client. Clients process the event by sending an Invoke activity of type adaptiveCard/action to the target Bot. The inputs that are gathered are those on the current card, and in the case of a show card those on any parent cards. See [Universal Action Model](https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model) documentation for more details.", + "version": "1.4", + "properties": { + "type": { + "enum": ["Action.Execute"], + "description": "Must be `Action.Execute`" + }, + "verb": { + "type": "string", + "description": "The card author-defined verb associated with this action." + }, + "data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ], + "description": "Initial data that input fields will be combined with. These are essentially ‘hidden’ properties." + }, + "associatedInputs": { + "$ref": "#/definitions/AssociatedInputs", + "description": "Controls which inputs are associated with the action.", + "default": "auto" + }, + "title": {}, + "iconUrl": {}, + "id": {}, + "style": {}, + "fallback": {}, + "tooltip": {}, + "isEnabled": {}, + "mode": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Action" + } + ] + }, + "Action.OpenUrl": { + "description": "When invoked, show the given url either by launching it in an external web browser or showing within an embedded web browser.", + "properties": { + "type": { + "enum": ["Action.OpenUrl"], + "description": "Must be `Action.OpenUrl`" + }, + "url": { + "type": "string", + "format": "uri-reference", + "description": "The URL to open." + }, + "title": {}, + "iconUrl": {}, + "id": {}, + "style": {}, + "fallback": {}, + "tooltip": {}, + "isEnabled": {}, + "mode": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["url"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Action" + } + ] + }, + "Action.ShowCard": { + "description": "Defines an AdaptiveCard which is shown to the user when the button or link is clicked.", + "properties": { + "type": { + "enum": ["Action.ShowCard"], + "description": "Must be `Action.ShowCard`" + }, + "card": { + "$ref": "#/definitions/AdaptiveCard", + "description": "The Adaptive Card to show. Inputs in ShowCards will not be submitted if the submit button is located on a parent card. See https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/input-validation for more details." + }, + "title": {}, + "iconUrl": {}, + "id": {}, + "style": {}, + "fallback": {}, + "tooltip": {}, + "isEnabled": {}, + "mode": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Action" + } + ] + }, + "Action.Submit": { + "description": "Gathers input fields, merges with optional data field, and sends an event to the client. It is up to the client to determine how this data is processed. For example: With BotFramework bots, the client would send an activity through the messaging medium to the bot. The inputs that are gathered are those on the current card, and in the case of a show card those on any parent cards. See https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/input-validation for more details.", + "properties": { + "type": { + "enum": ["Action.Submit"], + "description": "Must be `Action.Submit`" + }, + "data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ], + "description": "Initial data that input fields will be combined with. These are essentially ‘hidden’ properties." + }, + "associatedInputs": { + "$ref": "#/definitions/AssociatedInputs", + "description": "Controls which inputs are associated with the submit action.", + "default": "auto", + "version": "1.3" + }, + "title": {}, + "iconUrl": {}, + "id": {}, + "style": {}, + "fallback": {}, + "tooltip": {}, + "isEnabled": {}, + "mode": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Action" + } + ] + }, + "Action.ToggleVisibility": { + "description": "An action that toggles the visibility of associated card elements.", + "version": "1.2", + "properties": { + "type": { + "enum": ["Action.ToggleVisibility"], + "description": "Must be `Action.ToggleVisibility`" + }, + "targetElements": { + "type": "array", + "items": { + "$ref": "#/definitions/TargetElement" + }, + "description": "The array of TargetElements. It is not recommended to include Input elements with validation under Action.Toggle due to confusion that can arise from invalid inputs that are not currently visible. See https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/input-validation for more information." + }, + "title": {}, + "iconUrl": {}, + "id": {}, + "style": {}, + "fallback": {}, + "tooltip": {}, + "isEnabled": {}, + "mode": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["targetElements"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Action" + } + ] + }, + "TargetElement": { + "description": "Represents an entry for Action.ToggleVisibility's targetElements property", + "anyOf": [ + { + "type": "string", + "description": "Element ID of element to toggle" + }, + { + "type": "object", + "properties": { + "type": { + "enum": ["TargetElement"], + "description": "Must be `TargetElement`" + }, + "elementId": { + "type": "string", + "description": "Element ID of element to toggle" + }, + "isVisible": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "If `true`, always show target element. If `false`, always hide target element. If not supplied, toggle target element's visibility. " + } + }, + "required": ["elementId"], + "additionalProperties": false + } + ] + }, + "AdaptiveCard": { + "description": "An Adaptive Card, containing a free-form body of card elements, and an optional set of actions.", + "properties": { + "type": { + "enum": ["AdaptiveCard"], + "description": "Must be `AdaptiveCard`" + }, + "version": { + "type": "string", + "description": "Schema version that this card requires. If a client is **lower** than this version, the `fallbackText` will be rendered. NOTE: Version is not required for cards within an `Action.ShowCard`. However, it *is* required for the top-level card.", + "examples": ["1.0", "1.1", "1.2"] + }, + "refresh": { + "$ref": "#/definitions/Refresh", + "description": "Defines how the card can be refreshed by making a request to the target Bot.", + "version": "1.4" + }, + "authentication": { + "$ref": "#/definitions/Authentication", + "description": "Defines authentication information to enable on-behalf-of single sign on or just-in-time OAuth.", + "version": "1.4" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + "description": "The card elements to show in the primary card region." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Action" + }, + "description": "The Actions to show in the card's action bar." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "An Action that will be invoked when the card is tapped or selected. `Action.ShowCard` is not supported.", + "version": "1.1" + }, + "fallbackText": { + "type": "string", + "description": "Text shown when the client doesn't support the version specified (may contain markdown)." + }, + "backgroundImage": { + "anyOf": [ + { + "$ref": "#/definitions/BackgroundImage" + }, + { + "type": "string", + "format": "uri-reference", + "description": "The URL (or data url) to use as the background image. Supports data URI in version 1.2+", + "version": "1.0" + } + ], + "description": "Specifies the background image of the card.", + "version": "1.2" + }, + "minHeight": { + "type": "string", + "description": "Specifies the minimum height of the card.", + "examples": ["50px"], + "version": "1.2", + "features": [2293] + }, + "rtl": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "When `true` content in this Adaptive Card should be presented right to left. When 'false' content in this Adaptive Card should be presented left to right. If unset, the default platform behavior will apply.", + "version": "1.5" + }, + "speak": { + "type": "string", + "description": "Specifies what should be spoken for this entire card. This is simple text or SSML fragment." + }, + "lang": { + "type": "string", + "description": "The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions.", + "examples": ["en", "fr", "es"] + }, + "verticalContentAlignment": { + "$ref": "#/definitions/VerticalContentAlignment", + "description": "Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a `minHeight` specified.", + "version": "1.1" + }, + "$schema": { + "type": "string", + "format": "uri", + "description": "The Adaptive Card schema." + } + }, + "type": "object", + "additionalProperties": false + }, + "ActionSet": { + "description": "Displays a set of actions.", + "properties": { + "type": { + "enum": ["ActionSet"], + "description": "Must be `ActionSet`" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Action" + }, + "description": "The array of `Action` elements to show." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "version": "1.2", + "type": "object", + "additionalProperties": false, + "required": ["actions"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "Column": { + "description": "Defines a container that is part of a ColumnSet.", + "properties": { + "type": { + "enum": ["Column"], + "description": "Must be `Column`" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + "description": "The card elements to render inside the `Column`." + }, + "backgroundImage": { + "anyOf": [ + { + "$ref": "#/definitions/BackgroundImage" + }, + { + "type": "string", + "format": "uri-reference", + "description": "The URL (or data url) to use as the background image. Supports data URI." + } + ], + "description": "Specifies the background image. Acceptable formats are PNG, JPEG, and GIF", + "version": "1.2" + }, + "bleed": { + "type": "boolean", + "description": "Determines whether the column should bleed through its parent's padding.", + "version": "1.2", + "features": [2109] + }, + "fallback": { + "anyOf": [ + { + "$ref": "#/definitions/Column" + }, + { + "$ref": "#/definitions/FallbackOption" + } + ], + "description": "Describes what to do when an unknown item is encountered or the requires of this or any children can't be met.", + "version": "1.2" + }, + "minHeight": { + "type": "string", + "description": "Specifies the minimum height of the column in pixels, like `\"80px\"`.", + "examples": ["50px"], + "version": "1.2", + "features": [2293] + }, + "rtl": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "When `true` content in this column should be presented right to left. When 'false' content in this column should be presented left to right. When unset layout direction will inherit from parent container or column. If unset in all ancestors, the default platform behavior will apply.", + "version": "1.5" + }, + "separator": { + "type": "boolean", + "description": "When `true`, draw a separating line between this column and the previous column." + }, + "spacing": { + "$ref": "#/definitions/Spacing", + "description": "Controls the amount of spacing between this column and the preceding column." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "An Action that will be invoked when the `Column` is tapped or selected. `Action.ShowCard` is not supported.", + "version": "1.1" + }, + "style": { + "anyOf": [ + { + "$ref": "#/definitions/ContainerStyle" + }, + { + "type": "null" + } + ], + "description": "Style hint for `Column`." + }, + "verticalContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/VerticalContentAlignment" + }, + { + "type": "null" + } + ], + "description": "Defines how the content should be aligned vertically within the column. When not specified, the value of verticalContentAlignment is inherited from the parent container. If no parent container has verticalContentAlignment set, it defaults to Top.", + "version": "1.1" + }, + "width": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "`\"auto\"`, `\"stretch\"`, a number representing relative width of the column in the column group, or in version 1.1 and higher, a specific pixel width, like `\"50px\"`." + }, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.ToggleableItem" + } + ] + }, + "ColumnSet": { + "description": "ColumnSet divides a region into Columns, allowing elements to sit side-by-side.", + "properties": { + "type": { + "enum": ["ColumnSet"], + "description": "Must be `ColumnSet`" + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/definitions/Column" + }, + "description": "The array of `Columns` to divide the region into." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "An Action that will be invoked when the `ColumnSet` is tapped or selected. `Action.ShowCard` is not supported.", + "version": "1.1" + }, + "style": { + "anyOf": [ + { + "$ref": "#/definitions/ContainerStyle" + }, + { + "type": "null" + } + ], + "description": "Style hint for `ColumnSet`.", + "version": "1.2" + }, + "bleed": { + "type": "boolean", + "description": "Determines whether the element should bleed through its parent's padding.", + "version": "1.2", + "features": [2109] + }, + "minHeight": { + "type": "string", + "description": "Specifies the minimum height of the column set in pixels, like `\"80px\"`.", + "examples": ["50px"], + "version": "1.2", + "features": [2293] + }, + "horizontalAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls the horizontal alignment of the ColumnSet. When not specified, the value of horizontalAlignment is inherited from the parent container. If no parent container has horizontalAlignment set, it defaults to Left." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "Container": { + "description": "Containers group items together.", + "properties": { + "type": { + "enum": ["Container"], + "description": "Must be `Container`" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + "description": "The card elements to render inside the `Container`." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "An Action that will be invoked when the `Container` is tapped or selected. `Action.ShowCard` is not supported.", + "version": "1.1" + }, + "style": { + "anyOf": [ + { + "$ref": "#/definitions/ContainerStyle" + }, + { + "type": "null" + } + ], + "description": "Style hint for `Container`." + }, + "verticalContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/VerticalContentAlignment" + }, + { + "type": "null" + } + ], + "description": "Defines how the content should be aligned vertically within the container. When not specified, the value of verticalContentAlignment is inherited from the parent container. If no parent container has verticalContentAlignment set, it defaults to Top.", + "version": "1.1" + }, + "bleed": { + "type": "boolean", + "description": "Determines whether the element should bleed through its parent's padding.", + "version": "1.2", + "features": [2109] + }, + "backgroundImage": { + "anyOf": [ + { + "$ref": "#/definitions/BackgroundImage" + }, + { + "type": "string", + "format": "uri-reference", + "description": "The URL (or data url) to use as the background image. Supports data URI." + } + ], + "description": "Specifies the background image. Acceptable formats are PNG, JPEG, and GIF", + "version": "1.2" + }, + "minHeight": { + "type": "string", + "description": "Specifies the minimum height of the container in pixels, like `\"80px\"`.", + "examples": ["50px"], + "version": "1.2", + "features": [2293] + }, + "rtl?": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "When `true` content in this container should be presented right to left. When 'false' content in this container should be presented left to right. When unset layout direction will inherit from parent container or column. If unset in all ancestors, the default platform behavior will apply.", + "version": "1.5" + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["items"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "Fact": { + "description": "Describes a Fact in a FactSet as a key/value pair.", + "properties": { + "type": { + "enum": ["Fact"], + "description": "Must be `Fact`" + }, + "title": { + "type": "string", + "description": "The title of the fact." + }, + "value": { + "type": "string", + "description": "The value of the fact." + } + }, + "type": "object", + "additionalProperties": false, + "required": ["title", "value"] + }, + "FactSet": { + "description": "The FactSet element displays a series of facts (i.e. name/value pairs) in a tabular form.", + "properties": { + "type": { + "enum": ["FactSet"], + "description": "Must be `FactSet`" + }, + "facts": { + "type": "array", + "items": { + "$ref": "#/definitions/Fact" + }, + "description": "The array of `Fact`'s." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["facts"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "Image": { + "description": "Displays an image. Acceptable formats are PNG, JPEG, and GIF", + "properties": { + "type": { + "enum": ["Image"], + "description": "Must be `Image`" + }, + "url": { + "type": "string", + "format": "uri-reference", + "description": "The URL to the image. Supports data URI in version 1.2+" + }, + "altText": { + "type": "string", + "description": "Alternate text describing the image." + }, + "backgroundColor": { + "type": "string", + "description": "Applies a background to a transparent image. This property will respect the image style.", + "example": "#DDDDDD", + "version": "1.1" + }, + "height": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BlockElementHeight" + } + ], + "description": "The desired height of the image. If specified as a pixel value, ending in 'px', E.g., 50px, the image will distort to fit that exact height. This overrides the `size` property.", + "examples": ["50px"], + "default": "auto", + "version": "1.1" + }, + "horizontalAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how this element is horizontally positioned within its parent. When not specified, the value of horizontalAlignment is inherited from the parent container. If no parent container has horizontalAlignment set, it defaults to Left." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "An Action that will be invoked when the `Image` is tapped or selected. `Action.ShowCard` is not supported.", + "version": "1.1" + }, + "size": { + "$ref": "#/definitions/ImageSize", + "description": "Controls the approximate size of the image. The physical dimensions will vary per host." + }, + "style": { + "$ref": "#/definitions/ImageStyle", + "description": "Controls how this `Image` is displayed." + }, + "width": { + "type": "string", + "description": "The desired on-screen width of the image, ending in 'px'. E.g., 50px. This overrides the `size` property.", + "examples": ["50px"], + "version": "1.1" + }, + "fallback": { + "anyOf": [ + { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + { + "$ref": "#/definitions/FallbackOption" + } + ], + "description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.", + "version": "1.2" + }, + "separator": { + "type": "boolean", + "description": "When `true`, draw a separating line at the top of the element." + }, + "spacing": { + "$ref": "#/definitions/Spacing", + "description": "Controls the amount of spacing between this element and the preceding element." + }, + "id": { + "type": "string", + "description": "A unique identifier associated with the item." + }, + "isVisible": { + "type": "boolean", + "description": "If `false`, this item will be removed from the visual tree.", + "default": true, + "version": "1.2" + }, + "requires": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered.", + "version": "1.2" + } + }, + "type": "object", + "additionalProperties": false, + "required": ["url"] + }, + "ImageSet": { + "description": "The ImageSet displays a collection of Images similar to a gallery. Acceptable formats are PNG, JPEG, and GIF", + "properties": { + "type": { + "enum": ["ImageSet"], + "description": "Must be `ImageSet`" + }, + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/Image" + }, + "description": "The array of `Image` elements to show." + }, + "imageSize": { + "$ref": "#/definitions/ImageSize", + "default": "medium", + "description": "Controls the approximate size of each image. The physical dimensions will vary per host. Auto and stretch are not supported for ImageSet. The size will default to medium if those values are set." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["images"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "TextRun": { + "description": "Defines a single run of formatted text. A TextRun with no properties set can be represented in the json as string containing the text as a shorthand for the json object. These two representations are equivalent.", + "version": "1.2", + "anyOf": [ + { + "type": "string", + "description": "Text to display. Markdown is not supported." + }, + { + "type": "object", + "properties": { + "type": { + "enum": ["TextRun"], + "description": "Must be `TextRun`" + }, + "text": { + "type": "string", + "description": "Text to display. Markdown is not supported." + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Colors" + }, + { + "type": "null" + } + ], + "description": "Controls the color of the text." + }, + "fontType": { + "anyOf": [ + { + "$ref": "#/definitions/FontType" + }, + { + "type": "null" + } + ], + "description": "The type of font to use" + }, + "highlight": { + "type": "boolean", + "description": "If `true`, displays the text highlighted." + }, + "isSubtle": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "If `true`, displays text slightly toned down to appear less prominent.", + "default": false + }, + "italic": { + "type": "boolean", + "description": "If `true`, displays the text using italic font." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "Action to invoke when this text run is clicked. Visually changes the text run into a hyperlink. `Action.ShowCard` is not supported." + }, + "size": { + "anyOf": [ + { + "$ref": "#/definitions/FontSize" + }, + { + "type": "null" + } + ], + "description": "Controls size of text." + }, + "strikethrough": { + "type": "boolean", + "description": "If `true`, displays the text with strikethrough." + }, + "underline": { + "type": "boolean", + "description": "If `true`, displays the text with an underline.", + "version": "1.3" + }, + "weight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "type": "null" + } + ], + "description": "Controls the weight of the text." + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "Input.Choice": { + "description": "Describes a choice for use in a ChoiceSet.", + "properties": { + "type": { + "enum": ["Input.Choice"], + "description": "Must be `Input.Choice`" + }, + "title": { + "type": "string", + "description": "Text to display." + }, + "value": { + "type": "string", + "description": "The raw value for the choice. **NOTE:** do not use a `,` in the value, since a `ChoiceSet` with `isMultiSelect` set to `true` returns a comma-delimited string of choice values." + } + }, + "type": "object", + "additionalProperties": false, + "required": ["title", "value"] + }, + "Input.ChoiceSet": { + "description": "Allows a user to input a Choice.", + "properties": { + "type": { + "enum": ["Input.ChoiceSet"], + "description": "Must be `Input.ChoiceSet`" + }, + "choices": { + "type": "array", + "items": { + "$ref": "#/definitions/Input.Choice" + }, + "description": "`Choice` options." + }, + "isMultiSelect": { + "type": "boolean", + "description": "Allow multiple choices to be selected.", + "default": false + }, + "style": { + "$ref": "#/definitions/ChoiceInputStyle" + }, + "value": { + "type": "string", + "description": "The initial choice (or set of choices) that should be selected. For multi-select, specify a comma-separated string of values." + }, + "placeholder": { + "type": "string", + "description": "Description of the input desired. Only visible when no selection has been made, the `style` is `compact` and `isMultiSelect` is `false`" + }, + "wrap": { + "type": "boolean", + "description": "If `true`, allow text to wrap. Otherwise, text is clipped.", + "version": "1.2" + }, + "id": {}, + "errorMessage": {}, + "isRequired": {}, + "label": {}, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Input" + } + ] + }, + "Input.Date": { + "description": "Lets a user choose a date.", + "properties": { + "type": { + "enum": ["Input.Date"], + "description": "Must be `Input.Date`" + }, + "max": { + "type": "string", + "description": "Hint of maximum value expressed in YYYY-MM-DD(may be ignored by some clients)." + }, + "min": { + "type": "string", + "description": "Hint of minimum value expressed in YYYY-MM-DD(may be ignored by some clients)." + }, + "placeholder": { + "type": "string", + "description": "Description of the input desired. Displayed when no selection has been made." + }, + "value": { + "type": "string", + "description": "The initial value for this field expressed in YYYY-MM-DD." + }, + "id": {}, + "errorMessage": {}, + "isRequired": {}, + "label": {}, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Input" + } + ] + }, + "Input.Number": { + "description": "Allows a user to enter a number.", + "properties": { + "type": { + "enum": ["Input.Number"], + "description": "Must be `Input.Number`" + }, + "max": { + "type": "number", + "description": "Hint of maximum value (may be ignored by some clients)." + }, + "min": { + "type": "number", + "description": "Hint of minimum value (may be ignored by some clients)." + }, + "placeholder": { + "type": "string", + "description": "Description of the input desired. Displayed when no selection has been made." + }, + "value": { + "type": "number", + "description": "Initial value for this field." + }, + "id": {}, + "errorMessage": {}, + "isRequired": {}, + "label": {}, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Input" + } + ] + }, + "Input.Text": { + "description": "Lets a user enter text.", + "properties": { + "type": { + "enum": ["Input.Text"], + "description": "Must be `Input.Text`" + }, + "isMultiline": { + "type": "boolean", + "description": "If `true`, allow multiple lines of input.", + "default": false + }, + "maxLength": { + "type": "number", + "description": "Hint of maximum length characters to collect (may be ignored by some clients)." + }, + "placeholder": { + "type": "string", + "description": "Description of the input desired. Displayed when no text has been input." + }, + "regex": { + "type": "string", + "description": "Regular expression indicating the required format of this text input.", + "version": "1.3" + }, + "style": { + "$ref": "#/definitions/TextInputStyle", + "description": "Style hint for text input." + }, + "inlineAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "The inline action for the input. Typically displayed to the right of the input. It is strongly recommended to provide an icon on the action (which will be displayed instead of the title of the action).", + "version": "1.2" + }, + "value": { + "type": "string", + "description": "The initial value for this field." + }, + "id": {}, + "errorMessage": {}, + "isRequired": {}, + "label": {}, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Input" + } + ] + }, + "Input.Time": { + "description": "Lets a user select a time.", + "properties": { + "type": { + "enum": ["Input.Time"], + "description": "Must be `Input.Time`" + }, + "max": { + "type": "string", + "description": "Hint of maximum value expressed in HH:MM (may be ignored by some clients)." + }, + "min": { + "type": "string", + "description": "Hint of minimum value expressed in HH:MM (may be ignored by some clients)." + }, + "placeholder": { + "type": "string", + "description": "Description of the input desired. Displayed when no time has been selected." + }, + "value": { + "type": "string", + "description": "The initial value for this field expressed in HH:MM." + }, + "id": {}, + "errorMessage": {}, + "isRequired": {}, + "label": {}, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Input" + } + ] + }, + "Input.Toggle": { + "description": "Lets a user choose between two options.", + "properties": { + "type": { + "enum": ["Input.Toggle"], + "description": "Must be `Input.Toggle`" + }, + "title": { + "type": "string", + "description": "Title for the toggle" + }, + "value": { + "type": "string", + "description": "The initial selected value. If you want the toggle to be initially on, set this to the value of `valueOn`'s value.", + "default": "false" + }, + "valueOff": { + "type": "string", + "description": "The value when toggle is off", + "default": "false" + }, + "valueOn": { + "type": "string", + "description": "The value when toggle is on", + "default": "true" + }, + "wrap": { + "type": "boolean", + "description": "If `true`, allow text to wrap. Otherwise, text is clipped.", + "version": "1.2" + }, + "id": {}, + "errorMessage": {}, + "isRequired": {}, + "label": {}, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["title"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Input" + } + ] + }, + "Media": { + "description": "Displays a media player for audio or video content.", + "version": "1.1", + "features": [196], + "properties": { + "type": { + "enum": ["Media"], + "description": "Must be `Media`" + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/MediaSource" + }, + "description": "Array of media sources to attempt to play." + }, + "poster": { + "type": "string", + "format": "uri-reference", + "description": "URL of an image to display before playing. Supports data URI in version 1.2+" + }, + "altText": { + "type": "string", + "description": "Alternate text describing the audio or video." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["sources"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "MediaSource": { + "description": "Defines a source for a Media element", + "version": "1.1", + "features": [196], + "properties": { + "type": { + "enum": ["MediaSource"], + "description": "Must be `MediaSource`" + }, + "mimeType": { + "type": "string", + "description": "Mime type of associated media (e.g. `\"video/mp4\"`)." + }, + "url": { + "type": "string", + "format": "uri-reference", + "description": "URL to media. Supports data URI in version 1.2+" + } + }, + "type": "object", + "additionalProperties": false, + "required": ["mimeType", "url"] + }, + "RichTextBlock": { + "description": "Defines an array of inlines, allowing for inline text formatting.", + "version": "1.2", + "features": [1933], + "properties": { + "type": { + "enum": ["RichTextBlock"], + "description": "Must be `RichTextBlock`" + }, + "inlines": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Inline" + }, + "description": "The array of inlines." + }, + "horizontalAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls the horizontal text alignment. When not specified, the value of horizontalAlignment is inherited from the parent container. If no parent container has horizontalAlignment set, it defaults to Left." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["inlines"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "Table": { + "description": "Provides a way to display data in a tabular form.", + "version": "1.5", + "properties": { + "type": { + "enum": ["Table"], + "description": "Must be `Table`" + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/definitions/TableColumnDefinition" + }, + "description": "Defines the number of columns in the table, their sizes, and more." + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/definitions/TableRow" + }, + "description": "Defines the rows of the table." + }, + "firstRowAsHeader": { + "type": "boolean", + "description": "Specifies whether the first row of the table should be treated as a header row, and be announced as such by accessibility software.", + "default": true + }, + "showGridLines": { + "type": "boolean", + "description": "Specifies whether grid lines should be displayed.", + "default": true + }, + "gridStyle": { + "anyOf": [ + { + "$ref": "#/definitions/ContainerStyle" + }, + { + "type": "null" + } + ], + "description": "Defines the style of the grid. This property currently only controls the grid's color.", + "default": "default" + }, + "horizontalCellContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how the content of all cells is horizontally aligned by default. When not specified, horizontal alignment is defined on a per-cell basis." + }, + "verticalCellContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/VerticalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how the content of all cells is vertically aligned by default. When not specified, vertical alignment is defined on a per-cell basis." + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "TableCell": { + "description": "Represents a cell within a row of a Table element.", + "version": "1.5", + "properties": { + "type": { + "enum": ["TableCell"], + "description": "Must be `TableCell`" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + "description": "The card elements to render inside the `TableCell`." + }, + "selectAction": { + "$ref": "#/definitions/ImplementationsOf.ISelectAction", + "description": "An Action that will be invoked when the `TableCell` is tapped or selected. `Action.ShowCard` is not supported.", + "version": "1.1" + }, + "style": { + "anyOf": [ + { + "$ref": "#/definitions/ContainerStyle" + }, + { + "type": "null" + } + ], + "description": "Style hint for `TableCell`." + }, + "verticalContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/VerticalContentAlignment" + }, + { + "type": "null" + } + ], + "description": "Defines how the content should be aligned vertically within the container. When not specified, the value of verticalContentAlignment is inherited from the parent container. If no parent container has verticalContentAlignment set, it defaults to Top.", + "version": "1.1" + }, + "bleed": { + "type": "boolean", + "description": "Determines whether the element should bleed through its parent's padding.", + "version": "1.2", + "features": [2109] + }, + "backgroundImage": { + "anyOf": [ + { + "$ref": "#/definitions/BackgroundImage" + }, + { + "type": "string", + "format": "uri-reference", + "description": "The URL (or data url) to use as the background image. Supports data URI." + } + ], + "description": "Specifies the background image. Acceptable formats are PNG, JPEG, and GIF", + "version": "1.2" + }, + "minHeight": { + "type": "string", + "description": "Specifies the minimum height of the container in pixels, like `\"80px\"`.", + "examples": ["50px"], + "version": "1.2", + "features": [2293] + }, + "rtl?": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "When `true` content in this container should be presented right to left. When 'false' content in this container should be presented left to right. When unset layout direction will inherit from parent container or column. If unset in all ancestors, the default platform behavior will apply.", + "version": "1.5" + } + }, + "type": "object", + "additionalProperties": false, + "required": ["items"] + }, + "TableColumnDefinition": { + "description": "Defines the characteristics of a column in a Table element.", + "version": "1.5", + "properties": { + "type": { + "enum": ["TableColumnDefinition"], + "description": "Must be `TableColumnDefinition`" + }, + "width": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "Specifies the width of the column. If expressed as a number, width represents the weight a the column relative to the other columns in the table. If expressed as a string, width must by in the format \"px\" (for instance, \"50px\") and represents an explicit number of pixels.", + "default": 1 + }, + "horizontalCellContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how the content of all cells in the column is horizontally aligned by default. When specified, this value overrides the setting at the table level. When not specified, horizontal alignment is defined at the table, row or cell level." + }, + "verticalCellContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/VerticalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how the content of all cells in the column is vertically aligned by default. When specified, this value overrides the setting at the table level. When not specified, vertical alignment is defined at the table, row or cell level." + } + }, + "type": "object", + "additionalProperties": false + }, + "TableRow": { + "description": "Represents a row of cells within a Table element.", + "version": "1.5", + "properties": { + "type": { + "enum": ["TableRow"], + "description": "Must be `TableRow`" + }, + "cells": { + "type": "array", + "items": { + "$ref": "#/definitions/TableCell" + }, + "description": "The cells in this row. If a row contains more cells than there are columns defined on the Table element, the extra cells are ignored." + }, + "style": { + "anyOf": [ + { + "$ref": "#/definitions/ContainerStyle" + }, + { + "type": "null" + } + ], + "description": "Defines the style of the entire row." + }, + "horizontalCellContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how the content of all cells in the row is horizontally aligned by default. When specified, this value overrides both the setting at the table and columns level. When not specified, horizontal alignment is defined at the table, column or cell level." + }, + "verticalCellContentAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/VerticalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls how the content of all cells in the column is vertically aligned by default. When specified, this value overrides the setting at the table and column level. When not specified, vertical alignment is defined either at the table, column or cell level." + } + }, + "type": "object", + "additionalProperties": false + }, + "TextBlock": { + "description": "Displays text, allowing control over font sizes, weight, and color.", + "properties": { + "type": { + "enum": ["TextBlock"], + "description": "Must be `TextBlock`" + }, + "text": { + "type": "string", + "description": "Text to display. A subset of markdown is supported (https://aka.ms/ACTextFeatures)" + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Colors" + }, + { + "type": "null" + } + ], + "description": "Controls the color of `TextBlock` elements." + }, + "fontType": { + "anyOf": [ + { + "$ref": "#/definitions/FontType" + }, + { + "type": "null" + } + ], + "description": "Type of font to use for rendering", + "version": "1.2" + }, + "horizontalAlignment": { + "anyOf": [ + { + "$ref": "#/definitions/HorizontalAlignment" + }, + { + "type": "null" + } + ], + "description": "Controls the horizontal text alignment. When not specified, the value of horizontalAlignment is inherited from the parent container. If no parent container has horizontalAlignment set, it defaults to Left." + }, + "isSubtle": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "If `true`, displays text slightly toned down to appear less prominent.", + "default": false + }, + "maxLines": { + "type": "number", + "description": "Specifies the maximum number of lines to display." + }, + "size": { + "anyOf": [ + { + "$ref": "#/definitions/FontSize" + }, + { + "type": "null" + } + ], + "description": "Controls size of text." + }, + "weight": { + "anyOf": [ + { + "$ref": "#/definitions/FontWeight" + }, + { + "type": "null" + } + ], + "description": "Controls the weight of `TextBlock` elements." + }, + "wrap": { + "type": "boolean", + "description": "If `true`, allow text to wrap. Otherwise, text is clipped.", + "default": false + }, + "style": { + "anyOf": [ + { + "$ref": "#/definitions/TextBlockStyle" + }, + { + "type": "null" + } + ], + "description": "The style of this TextBlock for accessibility purposes.", + "default": "default" + }, + "fallback": {}, + "height": {}, + "separator": {}, + "spacing": {}, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "additionalProperties": false, + "required": ["text"], + "allOf": [ + { + "$ref": "#/definitions/Extendable.Element" + } + ] + }, + "ActionMode": { + "description": "Determines whether an action is displayed with a button or is moved to the overflow menu.", + "features": [4715], + "version": "1.5", + "anyOf": [ + { + "enum": ["primary", "secondary"] + }, + { + "pattern": "^([p|P][r|R][i|I][m|M][a|A][r|R][y|Y])|([s|S][e|E][c|C][o|O][n|N][d|D][a|A][r|R][y|Y])$" + } + ] + }, + "ActionStyle": { + "description": "Controls the style of an Action, which influences how the action is displayed, spoken, etc.", + "features": [861], + "version": "1.2", + "anyOf": [ + { + "enum": ["default", "positive", "destructive"] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([p|P][o|O][s|S][i|I][t|T][i|I][v|V][e|E])|([d|D][e|E][s|S][t|T][r|R][u|U][c|C][t|T][i|I][v|V][e|E])$" + } + ] + }, + "AssociatedInputs": { + "anyOf": [ + { + "enum": ["Auto", "None"] + }, + { + "pattern": "^([a|A][u|U][t|T][o|O])|([n|N][o|O][n|N][e|E])$" + } + ] + }, + "BlockElementHeight": { + "anyOf": [ + { + "enum": ["auto", "stretch"] + }, + { + "pattern": "^([a|A][u|U][t|T][o|O])|([s|S][t|T][r|R][e|E][t|T][c|C][h|H])$" + } + ] + }, + "ChoiceInputStyle": { + "description": "Style hint for `Input.ChoiceSet`.", + "anyOf": [ + { + "enum": ["compact", "expanded"] + }, + { + "pattern": "^([c|C][o|O][m|M][p|P][a|A][c|C][t|T])|([e|E][x|X][p|P][a|A][n|N][d|D][e|E][d|D])$" + } + ] + }, + "Colors": { + "anyOf": [ + { + "enum": [ + "default", + "dark", + "light", + "accent", + "good", + "warning", + "attention" + ] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([d|D][a|A][r|R][k|K])|([l|L][i|I][g|G][h|H][t|T])|([a|A][c|C][c|C][e|E][n|N][t|T])|([g|G][o|O][o|O][d|D])|([w|W][a|A][r|R][n|N][i|I][n|N][g|G])|([a|A][t|T][t|T][e|E][n|N][t|T][i|I][o|O][n|N])$" + } + ] + }, + "ContainerStyle": { + "anyOf": [ + { + "enum": [ + "default", + "emphasis", + "good", + "attention", + "warning", + "accent" + ] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([e|E][m|M][p|P][h|H][a|A][s|S][i|I][s|S])|([g|G][o|O][o|O][d|D])|([a|A][t|T][t|T][e|E][n|N][t|T][i|I][o|O][n|N])|([w|W][a|A][r|R][n|N][i|I][n|N][g|G])|([a|A][c|C][c|C][e|E][n|N][t|T])$" + } + ] + }, + "FallbackOption": { + "anyOf": [ + { + "enum": ["drop"] + }, + { + "pattern": "^([d|D][r|R][o|O][p|P])$" + } + ] + }, + "FontSize": { + "anyOf": [ + { + "enum": ["default", "small", "medium", "large", "extraLarge"] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([s|S][m|M][a|A][l|L][l|L])|([m|M][e|E][d|D][i|I][u|U][m|M])|([l|L][a|A][r|R][g|G][e|E])|([e|E][x|X][t|T][r|R][a|A][l|L][a|A][r|R][g|G][e|E])$" + } + ] + }, + "FontType": { + "anyOf": [ + { + "enum": ["default", "monospace"] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([m|M][o|O][n|N][o|O][s|S][p|P][a|A][c|C][e|E])$" + } + ] + }, + "FontWeight": { + "anyOf": [ + { + "enum": ["default", "lighter", "bolder"] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([l|L][i|I][g|G][h|H][t|T][e|E][r|R])|([b|B][o|O][l|L][d|D][e|E][r|R])$" + } + ] + }, + "HorizontalAlignment": { + "description": "Controls how content is horizontally positioned within its container.", + "anyOf": [ + { + "enum": ["left", "center", "right"] + }, + { + "pattern": "^([l|L][e|E][f|F][t|T])|([c|C][e|E][n|N][t|T][e|E][r|R])|([r|R][i|I][g|G][h|H][t|T])$" + } + ] + }, + "ImageFillMode": { + "anyOf": [ + { + "enum": ["cover", "repeatHorizontally", "repeatVertically", "repeat"] + }, + { + "pattern": "^([c|C][o|O][v|V][e|E][r|R])|([r|R][e|E][p|P][e|E][a|A][t|T][h|H][o|O][r|R][i|I][z|Z][o|O][n|N][t|T][a|A][l|L][l|L][y|Y])|([r|R][e|E][p|P][e|E][a|A][t|T][v|V][e|E][r|R][t|T][i|I][c|C][a|A][l|L][l|L][y|Y])|([r|R][e|E][p|P][e|E][a|A][t|T])$" + } + ] + }, + "ImageSize": { + "description": "Controls the approximate size of the image. The physical dimensions will vary per host. Every option preserves aspect ratio.", + "anyOf": [ + { + "enum": ["auto", "stretch", "small", "medium", "large"] + }, + { + "pattern": "^([a|A][u|U][t|T][o|O])|([s|S][t|T][r|R][e|E][t|T][c|C][h|H])|([s|S][m|M][a|A][l|L][l|L])|([m|M][e|E][d|D][i|I][u|U][m|M])|([l|L][a|A][r|R][g|G][e|E])$" + } + ] + }, + "ImageStyle": { + "description": "Controls how this `Image` is displayed.", + "anyOf": [ + { + "enum": ["default", "person"] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([p|P][e|E][r|R][s|S][o|O][n|N])$" + } + ] + }, + "Spacing": { + "description": "Specifies how much spacing. Hosts pick the exact pixel amounts for each of these.", + "anyOf": [ + { + "enum": [ + "default", + "none", + "small", + "medium", + "large", + "extraLarge", + "padding" + ] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([n|N][o|O][n|N][e|E])|([s|S][m|M][a|A][l|L][l|L])|([m|M][e|E][d|D][i|I][u|U][m|M])|([l|L][a|A][r|R][g|G][e|E])|([e|E][x|X][t|T][r|R][a|A][l|L][a|A][r|R][g|G][e|E])|([p|P][a|A][d|D][d|D][i|I][n|N][g|G])$" + } + ] + }, + "TextBlockStyle": { + "description": "Controls how a TextBlock behaves.", + "version": "1.5", + "anyOf": [ + { + "enum": ["default", "heading"] + }, + { + "pattern": "^([d|D][e|E][f|F][a|A][u|U][l|L][t|T])|([h|H][e|E][a|A][d|D][i|I][n|N][g|G])$" + } + ] + }, + "TextInputStyle": { + "description": "Style hint for text input.", + "anyOf": [ + { + "enum": ["text", "tel", "url", "email", "password"] + }, + { + "pattern": "^([t|T][e|E][x|X][t|T])|([t|T][e|E][l|L])|([u|U][r|R][l|L])|([e|E][m|M][a|A][i|I][l|L])|([p|P][a|A][s|S][s|S][w|W][o|O][r|R][d|D])$" + } + ] + }, + "VerticalAlignment": { + "anyOf": [ + { + "enum": ["top", "center", "bottom"] + }, + { + "pattern": "^([t|T][o|O][p|P])|([c|C][e|E][n|N][t|T][e|E][r|R])|([b|B][o|O][t|T][t|T][o|O][m|M])$" + } + ] + }, + "VerticalContentAlignment": { + "anyOf": [ + { + "enum": ["top", "center", "bottom"] + }, + { + "pattern": "^([t|T][o|O][p|P])|([c|C][e|E][n|N][t|T][e|E][r|R])|([b|B][o|O][t|T][t|T][o|O][m|M])$" + } + ] + }, + "AuthCardButton": { + "description": "Defines a button as displayed when prompting a user to authenticate. This maps to the cardAction type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.cardaction).", + "version": "1.4", + "properties": { + "type": { + "type": "string", + "description": "The type of the button." + }, + "title": { + "type": "string", + "description": "The caption of the button." + }, + "image": { + "type": "string", + "description": "A URL to an image to display alongside the button's caption." + }, + "value": { + "type": "string", + "description": "The value associated with the button. The meaning of value depends on the button's type." + } + }, + "type": "object", + "additionalProperties": false, + "required": ["type", "value"] + }, + "Authentication": { + "description": "Defines authentication information associated with a card. This maps to the OAuthCard type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.oauthcard)", + "version": "1.4", + "properties": { + "type": { + "enum": ["Authentication"], + "description": "Must be `Authentication`" + }, + "text": { + "type": "string", + "description": "Text that can be displayed to the end user when prompting them to authenticate." + }, + "connectionName": { + "type": "string", + "description": "The identifier for registered OAuth connection setting information." + }, + "tokenExchangeResource": { + "$ref": "#/definitions/TokenExchangeResource", + "description": "Provides information required to enable on-behalf-of single sign-on user authentication." + }, + "buttons": { + "type": "array", + "items": { + "$ref": "#/definitions/AuthCardButton" + }, + "description": "Buttons that should be displayed to the user when prompting for authentication. The array MUST contain one button of type \"signin\". Other button types are not currently supported." + } + }, + "type": "object", + "additionalProperties": false + }, + "BackgroundImage": { + "description": "Specifies a background image. Acceptable formats are PNG, JPEG, and GIF", + "properties": { + "type": { + "enum": ["BackgroundImage"], + "description": "Must be `BackgroundImage`" + }, + "url": { + "type": "string", + "format": "uri-reference", + "description": "The URL (or data url) of the image. Acceptable formats are PNG, JPEG, and GIF" + }, + "fillMode": { + "$ref": "#/definitions/ImageFillMode", + "description": "Describes how the image should fill the area." + }, + "horizontalAlignment": { + "$ref": "#/definitions/HorizontalAlignment", + "description": "Describes how the image should be aligned if it must be cropped or if using repeat fill mode." + }, + "verticalAlignment": { + "$ref": "#/definitions/VerticalAlignment", + "description": "Describes how the image should be aligned if it must be cropped or if using repeat fill mode." + } + }, + "version": "1.2", + "type": "object", + "additionalProperties": false, + "required": ["url"] + }, + "Refresh": { + "description": "Defines how a card can be refreshed by making a request to the target Bot.", + "version": "1.4", + "properties": { + "type": { + "enum": ["Refresh"], + "description": "Must be `Refresh`" + }, + "action": { + "$ref": "#/definitions/Action.Execute", + "description": "The action to be executed to refresh the card. Clients can run this refresh action automatically or can provide an affordance for users to trigger it manually." + }, + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of user Ids informing the client for which users should the refresh action should be run automatically. Some clients will not run the refresh action automatically unless this property is specified. Some clients may ignore this property and always run the refresh action automatically." + } + }, + "type": "object", + "additionalProperties": false + }, + "TokenExchangeResource": { + "description": "Defines information required to enable on-behalf-of single sign-on user authentication. Maps to the TokenExchangeResource type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.tokenexchangeresource)", + "version": "1.4", + "properties": { + "type": { + "enum": ["TokenExchangeResource"], + "description": "Must be `TokenExchangeResource`" + }, + "id": { + "type": "string", + "description": "The unique identified of this token exchange instance." + }, + "uri": { + "type": "string", + "description": "An application ID or resource identifier with which to exchange a token on behalf of. This property is identity provider- and application-specific." + }, + "providerId": { + "type": "string", + "description": "An identifier for the identity provider with which to attempt a token exchange." + } + }, + "type": "object", + "additionalProperties": false, + "required": ["id", "uri", "providerId"] + }, + "ImplementationsOf.Action": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.Execute" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.OpenUrl" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.ShowCard" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.Submit" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.ToggleVisibility" + } + ] + } + ] + }, + "ImplementationsOf.Item": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.Execute" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.OpenUrl" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.ShowCard" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.Submit" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.ToggleVisibility" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ActionSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Column" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ColumnSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Container" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/FactSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Image" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ImageSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.ChoiceSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Date" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Number" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Text" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Time" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Toggle" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Media" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/RichTextBlock" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Table" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/TextBlock" + } + ] + } + ] + }, + "ImplementationsOf.ISelectAction": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.Execute" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.OpenUrl" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.Submit" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Action.ToggleVisibility" + } + ] + } + ] + }, + "ImplementationsOf.Element": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ActionSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ColumnSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Container" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/FactSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Image" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ImageSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.ChoiceSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Date" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Number" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Text" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Time" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Toggle" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Media" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/RichTextBlock" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Table" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/TextBlock" + } + ] + } + ] + }, + "ImplementationsOf.ToggleableItem": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ActionSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Column" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ColumnSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Container" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/FactSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Image" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/ImageSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.ChoiceSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Date" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Number" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Text" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Time" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Toggle" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Media" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/RichTextBlock" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Table" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/TextBlock" + } + ] + } + ] + }, + "ImplementationsOf.Inline": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/TextRun" + } + ] + } + ] + }, + "ImplementationsOf.Input": { + "anyOf": [ + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.ChoiceSet" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Date" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Number" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Text" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Time" + } + ] + }, + { + "required": ["type"], + "allOf": [ + { + "$ref": "#/definitions/Input.Toggle" + } + ] + } + ] + }, + "Extendable.Action": { + "properties": { + "title": { + "type": "string", + "description": "Label for button or link that represents this action." + }, + "iconUrl": { + "type": "string", + "format": "uri-reference", + "description": "Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+", + "version": "1.1" + }, + "id": { + "type": "string", + "description": "A unique identifier associated with this Action." + }, + "style": { + "$ref": "#/definitions/ActionStyle", + "description": "Controls the style of an Action, which influences how the action is displayed, spoken, etc.", + "version": "1.2" + }, + "fallback": { + "anyOf": [ + { + "$ref": "#/definitions/ImplementationsOf.Action" + }, + { + "$ref": "#/definitions/FallbackOption" + } + ], + "description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.", + "version": "1.2" + }, + "tooltip": { + "type": "string", + "description": "Defines text that should be displayed to the end user as they hover the mouse over the action, and read when using narration software.", + "version": "1.5" + }, + "isEnabled": { + "type": "boolean", + "description": "Determines whether the action should be enabled.", + "default": true, + "version": "1.5" + }, + "mode": { + "$ref": "#/definitions/ActionMode", + "description": "Determines whether the action should be displayed as a button or in the overflow menu.", + "version": "1.5", + "default": "primary" + }, + "requires": {} + }, + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Extendable.Item" + } + ] + }, + "Extendable.Element": { + "properties": { + "fallback": { + "anyOf": [ + { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + { + "$ref": "#/definitions/FallbackOption" + } + ], + "description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.", + "version": "1.2" + }, + "height": { + "$ref": "#/definitions/BlockElementHeight", + "description": "Specifies the height of the element.", + "version": "1.1" + }, + "separator": { + "type": "boolean", + "description": "When `true`, draw a separating line at the top of the element." + }, + "spacing": { + "$ref": "#/definitions/Spacing", + "description": "Controls the amount of spacing between this element and the preceding element." + }, + "id": {}, + "isVisible": {}, + "requires": {} + }, + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Extendable.ToggleableItem" + } + ] + }, + "Extendable.Input": { + "description": "Base input class", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the value. Used to identify collected input when the Submit action is performed." + }, + "errorMessage": { + "type": "string", + "description": "Error message to display when entered input is invalid", + "version": "1.3" + }, + "isRequired": { + "type": "boolean", + "description": "Whether or not this input is required", + "version": "1.3" + }, + "label": { + "type": "string", + "description": "Label for this input", + "version": "1.3" + }, + "fallback": { + "anyOf": [ + { + "$ref": "#/definitions/ImplementationsOf.Element" + }, + { + "$ref": "#/definitions/FallbackOption" + } + ], + "description": "Describes what to do when an unknown element is encountered or the requires of this or any children can't be met.", + "version": "1.2" + }, + "height": { + "$ref": "#/definitions/BlockElementHeight", + "description": "Specifies the height of the element.", + "version": "1.1" + }, + "separator": { + "type": "boolean", + "description": "When `true`, draw a separating line at the top of the element." + }, + "spacing": { + "$ref": "#/definitions/Spacing", + "description": "Controls the amount of spacing between this element and the preceding element." + }, + "isVisible": { + "type": "boolean", + "description": "If `false`, this item will be removed from the visual tree.", + "default": true, + "version": "1.2" + }, + "requires": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered.", + "version": "1.2" + } + }, + "type": "object", + "required": ["id"] + }, + "Extendable.Item": { + "properties": { + "requires": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A series of key/value pairs indicating features that the item requires with corresponding minimum version. When a feature is missing or of insufficient version, fallback is triggered.", + "version": "1.2" + } + }, + "type": "object" + }, + "Extendable.ToggleableItem": { + "properties": { + "id": { + "type": "string", + "description": "A unique identifier associated with the item." + }, + "isVisible": { + "type": "boolean", + "description": "If `false`, this item will be removed from the visual tree.", + "default": true, + "version": "1.2" + }, + "requires": {} + }, + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Extendable.Item" + } + ] + } + }, + "anyOf": [ + { + "allOf": [ + { + "$ref": "#/definitions/AdaptiveCard" + } + ] + } + ] +} diff --git a/packages/vscode-ui5-language-assistant/src/manifest/schema.json b/packages/vscode-ui5-language-assistant/src/manifest/schema.json new file mode 100644 index 000000000..e63b1b344 --- /dev/null +++ b/packages/vscode-ui5-language-assistant/src/manifest/schema.json @@ -0,0 +1,7629 @@ +{ + "title": "SAP JSON schema for Web Application Manifest File", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["_version", "sap.app", "sap.ui"], + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents Application Descriptor format version. It is managed by schema owner", + "type": "string", + "enum": [ + "1.1.0", + "1.2.0", + "1.3.0", + "1.4.0", + "1.5.0", + "1.6.0", + "1.7.0", + "1.8.0", + "1.9.0", + "1.10.0", + "1.11.0", + "1.12.0", + "1.13.0", + "1.14.0", + "1.15.0", + "1.16.0", + "1.17.0", + "1.18.0", + "1.19.0", + "1.20.0", + "1.21.0", + "1.22.0", + "1.23.0", + "1.24.0", + "1.25.0", + "1.26.0", + "1.27.0", + "1.28.0", + "1.29.0", + "1.30.0", + "1.31.0", + "1.32.0", + "1.33.0", + "1.34.0", + "1.35.0", + "1.36.0", + "1.37.0", + "1.38.0", + "1.39.0", + "1.40.0", + "1.41.0", + "1.42.0", + "1.43.0", + "1.44.0", + "1.45.0", + "1.46.0", + "1.47.0", + "1.48.0", + "1.49.0", + "1.50.0", + "1.51.0" + ] + }, + "start_url": { + "description": "Represents the URL that the developer would prefer the user agent load when the user launches the web application", + "type": "string" + }, + "sap.app": { + "title": "JSON schema for SAP.APP Namespace", + "description": "Represents general application attributes", + "type": "object", + "additionalProperties": false, + "required": ["id", "type", "title", "applicationVersion"], + "properties": { + "_version": { + "description": "Application attributes format version. It is managed by namespace owner", + "type": "string", + "enum": [ + "1.1.0", + "1.2.0", + "1.3.0", + "1.4.0", + "1.5.0", + "1.6.0", + "1.7.0", + "1.8.0", + "1.9.0", + "1.10.0", + "1.11.0", + "1.12.0", + "1.13.0", + "1.14.0", + "1.15.0", + "1.16.0", + "1.17.0", + "1.18.0", + "1.19.0" + ] + }, + "sourceTemplate": { + "description": "Represents the template from which the app was generated", + "type": "object", + "required": ["id", "version"], + "properties": { + "id": { + "description": "Represents id of the template from which the app was generated ", + "type": "string" + }, + "version": { + "description": "Represents the version of the template from which the app was generated", + "type": "string" + }, + "toolsId": { + "description": "Represents an Id generated by SAP Fiori tools", + "type": "string" + } + } + }, + "id": { + "description": "Represents mandatory unique app identifier which must correspond to component 'id/namespace'", + "$ref": "#/definitions/id_def" + }, + "type": { + "description": "Represents type of an application and can be application or component or library", + "type": "string", + "enum": ["application", "component", "library", "card"] + }, + "i18n": { + "default": "i18n/i18n.properties", + "description": "Represents path inside the app to the properties file containing text symbols for the Descriptor or properties file specific settings (including supportedLocales, fallbackLocale, terminologies and enhanceWith)", + "oneOf": [ + { + "default": "i18n/i18n.properties", + "type": "string" + }, + { + "type": "object", + "required": ["bundleName"], + "additionalProperties": false, + "properties": { + "bundleName": { + "description": "Represents the alternative for bundleUrl", + "type": "string" + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + }, + "enhanceWith": { + "description": "Represents enhancement of UI5 resource model with additional properties files", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/enhanceWithSetting" + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["bundleUrl"], + "properties": { + "bundleUrl": { + "description": "Represents the URL for the resource bundle", + "type": "string" + }, + "bundleUrlRelativeTo": { + "description": "Indicates whether url is relative to component (default) or manifest", + "type": "string", + "default": "component", + "enum": ["manifest", "component"] + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + }, + "enhanceWith": { + "description": "Represents enhancement of UI5 resource model with additional properties files", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/enhanceWithSetting" + } + } + } + } + ] + }, + "applicationVersion": { + "description": "Represents mandatory version of the app", + "type": "object", + "required": ["version"], + "properties": { + "version": { + "$ref": "#/definitions/version" + } + } + }, + "embeds": { + "description": "Represents array of relative paths to the nested manifest.json's (mandatory if it contains nested 'manifest.json')", + "type": "array", + "items": { + "type": "string" + } + }, + "embeddedBy": { + "description": "Represents relative path back to the manifest.json of an embedding component or library (mandatory for nested 'manifest.json')", + "type": "string" + }, + "title": { + "description": "Represents a title (mandatory); to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "subTitle": { + "description": "Represents a subtitle to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "shortTitle": { + "description": "Represents a shorter version of the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "info": { + "description": "Represents additional information to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "description": { + "description": "Represents a description; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "tags": { + "description": "Represents array of keywords", + "type": "object", + "additionalProperties": true, + "required": ["keywords"], + "properties": { + "keywords": { + "$ref": "#/definitions/tag" + }, + "technicalAttributes": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Z0-9_\\-\\/]+$" + } + } + } + }, + "ach": { + "description": "Represents application component hierarchy", + "type": "string", + "pattern": "^([a-zA-Z0-9]{2,3})(-[a-zA-Z0-9]{1,6})*$" + }, + "dataSources": { + "description": "Represents used data sources with a unique key/alias", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]*$": { + "$ref": "#/definitions/dataSource" + } + } + }, + "cdsViews": { + "description": "Represents array of directly used CDS views, which only to be added if directly used via INA protocol and not if used via OData service", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Represents reference to a file (naming convention is resources.json) which contains list with all resources which the app needs", + "type": "string", + "enum": ["resources.json"] + }, + "destination": { + "description": "Represents a system alias", + "type": "object", + "required": ["name"], + "additionalProperties": false, + "properties": { + "name": { + "description": "Represents an alias for the system", + "type": "string" + } + } + }, + "openSourceComponents": { + "description": "Represents a collection of directly used open source libs (not when used via UI5 capsulation)", + "type": "array", + "items": { + "$ref": "#/definitions/openSource" + } + }, + "provider": { + "description": "Represents the name of the provider which owns the application", + "type": "string", + "enum": ["sfsf"] + }, + "offline": { + "description": "Represents indicator whether the app is running offline. Possible values are true or false (default)", + "type": "boolean", + "default": false + }, + "crossNavigation": { + "description": "Represents cross navigation for inbound and outbound targets", + "type": "object", + "required": ["inbounds"], + "properties": { + "scopes": { + "description": "Represents scopes of a site", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]+$": { + "description": "Represents unique id of the site", + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "string" + } + } + } + } + }, + "inbounds": { + "description": "Represents cross navigation for inbound target", + "$ref": "#/definitions/inbound" + }, + "outbounds": { + "description": "Describes intents that can be triggered from the application to navigate", + "$ref": "#/definitions/outbound" + } + } + } + }, + "definitions": { + "i18n_key": { + "type": "string", + "pattern": "^\\{\\{[\\w][\\w\\.\\-]*\\}\\}$" + }, + "parameter": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + } + }, + "sap.ui": { + "title": "JSON schema for SAP.UI Namespace", + "description": "Represents general ui attributes", + "type": "object", + "required": ["technology", "deviceTypes"], + "properties": { + "_version": { + "description": "Represents UI attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0", "1.3.0", "1.4.0", "1.5.0"] + }, + "technology": { + "description": "Represents UI technology. The possible values are UI5 (default), WDA, NWBC, GUI, URL and WCF", + "type": "string", + "enum": ["UI5", "WDA", "NWBC", "GUI", "URL", "WCF"], + "default": "UI5" + }, + "icons": { + "description": "Represents icons which used in application", + "type": "object", + "additionalProperties": false, + "properties": { + "icon": { + "description": "Represents icon of the app", + "type": "string" + }, + "favIcon": { + "description": "Represents ICO file to be used inside the browser and for desktop shortcuts", + "type": "string" + }, + "phone": { + "description": "Represents 57x57 pixel version for non-retina iPhones", + "type": "string" + }, + "phone@2": { + "description": "Represents 114x114 pixel version for non-retina iPhones", + "type": "string" + }, + "tablet": { + "description": "Represents 72x72 pixel version for non-retina iPads", + "type": "string" + }, + "tablet@2": { + "description": "Represents 144x144 pixel version for non-retina iPads", + "type": "string" + } + } + }, + "deviceTypes": { + "description": "Represents device types on which application is running. Supported device types are desktop, tablet and phone", + "allOf": [ + { + "$ref": "#/definitions/deviceType" + }, + { + "required": ["desktop", "tablet", "phone"] + } + ] + }, + "supportedThemes": { + "description": "The property is Deprecated. Represents array of supported SAP themes such as sap_hcb, sap_bluecrystal", + "type": "array", + "items": { + "type": "string" + } + }, + "fullWidth": { + "description": "Indicates whether app should run in full screen mode: possible values: true or false ", + "type": "boolean" + } + } + }, + "sap.ui5": { + "title": "JSON schema for SAP.UI5 Namespace", + "description": "Represents sapui5 attributes", + "allOf": [ + { + "type": "object", + "required": ["dependencies", "contentDensities"], + "properties": { + "_version": { + "description": " Represents SAPUI5 attributes format version. It is managed by namespace owner", + "type": "string", + "enum": [ + "1.1.0", + "1.2.0", + "1.3.0", + "1.4.0", + "1.5.0", + "1.6.0", + "1.7.0", + "1.8.0", + "1.9.0", + "1.10.0", + "1.11.0", + "1.12.0", + "1.13.0", + "1.14.0", + "1.15.0", + "1.16.0" + ] + }, + "resources": { + "description": "Represents paths to JavaScript/CSS resources that your app needs (app internal), formerly called '.includes'", + "$ref": "#/definitions/resource" + }, + "componentUsages": { + "description": "Represents the explicit usage declaration for UI5 reuse components", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.]*$": { + "$ref": "#/definitions/componentUsages" + } + } + }, + "dependencies": { + "description": "Represents external dependences such as libraries or components, that will be loaded by UI5 Core in the initialization phase of your Component and can be used after it", + "type": "object", + "additionalProperties": false, + "required": ["minUI5Version"], + "properties": { + "minUI5Version": { + "description": "Represents the minimum version of SAP UI5 that your component requires", + "$ref": "#/definitions/version" + }, + "libs": { + "description": "Represents the id (namespace) of the libraries that should be loaded by UI5 Core to be used in your component", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^([a-z][a-z0-9]{0,39})(\\.[a-z][a-z0-9]{0,39})*$": { + "$ref": "#/definitions/lib" + } + } + }, + "components": { + "description": "Represents the id (namespace) of the components that should be loaded by UI5 Core to be used in your component", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^([a-zA-Z_$][a-zA-Z0-9_$]{0,39}\\.)*([a-zA-Z_$][a-zA-Z0-9_$]{0,39})$": { + "$ref": "#/definitions/component" + } + } + } + } + }, + "models": { + "description": "Represents models which should be created/destroyed with the life-cycle of the component", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-\\|@]*$": { + "$ref": "#/definitions/model" + } + } + }, + "resourceRoots": { + "description": "Represents relative path to the resource. Only relative path allowed, no '../' ", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]*$": { + "$ref": "#/definitions/resourceRoot" + } + } + }, + "handleValidation": { + "description": "Represents the usage of validation handling by MessageManager for this component (enable/disable)", + "type": "boolean", + "default": false + }, + "config": { + "description": "Represents the static configuration for components", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "[\\s\\S]*": { + "$ref": "#/definitions/config" + } + } + }, + "extends": { + "description": "Represents the extension of an additional component", + "type": "object", + "additionalProperties": false, + "properties": { + "component": { + "description": "Represents the component name", + "$ref": "#/definitions/id_def" + }, + "minVersion": { + "description": "Represents minimal version of the component", + "$ref": "#/definitions/version" + }, + "extensions": { + "description": "Represents extensions of the component", + "type": "object" + } + } + }, + "contentDensities": { + "description": "Represents object with content density modes the app is supporting. Supported density modes are 'cozy' and 'compact'", + "type": "object", + "additionalProperties": false, + "required": ["compact", "cozy"], + "properties": { + "compact": { + "description": "Represents indicator whether compact mode is supported", + "type": "boolean" + }, + "cozy": { + "description": "Represents indicator whether cozy mode is supported", + "type": "boolean" + } + } + }, + "componentName": { + "description": "Represents a name of the UI5 component", + "type": "string", + "pattern": "^([a-zA-Z_$][a-zA-Z0-9_$]{0,39}\\.)*([a-zA-Z_$][a-zA-Z0-9_$]{0,39})$" + }, + "autoPrefixId": { + "description": "Enables the auto prefixing of IDs of ManagedObjects (e.g. Controls) which are created in context of the Component (e.g. createContent invocation)", + "type": "boolean" + }, + "appVariantId": { + "description": "Represents the identifier of an application variant. The value will be calculated and should not be set manually ", + "type": "string" + }, + "appVariantIdHierarchy": { + "description": "Represents array of appVariantId hierarchy with origin layer and version, calculated attribute and filled automatically during variant merge", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["layer", "appVariantId", "version"], + "properties": { + "layer": { + "description": "Represents origin layer of the app variant id", + "type": "string" + }, + "appVariantId": { + "description": "Represents app variant id", + "type": "string" + }, + "version": { + "description": "Represents version of the app variant id", + "type": "string" + } + } + } + }, + "services": { + "description": "Represents a list of the services ", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "[\\s\\S]*": { + "$ref": "#/definitions/service" + } + } + }, + "library": { + "description": "Represents UI5 library specific properties", + "type": "object", + "additionalProperties": false, + "properties": { + "i18n": { + "description": "Setting to define i18n properties of a library. Can either be a boolean, string or object.", + "oneOf": [ + { + "description": "Using a boolean indicates whether the library contains a i18n resource or not.", + "type": "boolean" + }, + { + "description": "When using a string an alternative name for the i18n resource can be defined.", + "type": "string" + }, + { + "type": "object", + "additionalProperties": false, + "required": ["bundleUrl"], + "properties": { + "bundleUrl": { + "description": "Represents the URL for the resource bundle", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + }, + "enhanceWith": { + "description": "Represents enhancement of UI5 resource bundle with additional properties files", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/enhanceWithSetting" + } + } + } + }, + { + "type": "object", + "required": ["bundleName"], + "additionalProperties": false, + "properties": { + "bundleName": { + "description": "Represents the alternative for bundleUrl", + "type": "string" + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + }, + "enhanceWith": { + "description": "Represents enhancement of UI5 resource bundle with additional properties files", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/enhanceWithSetting" + } + } + } + } + ] + }, + "css": { + "description": "Flag whether the library contains a CSS file or not.", + "$ref": "#/definitions/booleanOrString" + }, + "content": { + "description": "Represents the content of a library. Content are controls, elements, types and interfaces.", + "type": "object" + } + } + }, + "commands": { + "description": "Represents a list of UI5 shortcut commands", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[A-Za-z_][A-Za-z0-9_\\-\\|@]+$": { + "$ref": "#/definitions/command" + } + } + }, + "flexExtensionPointEnabled": { + "description": "Represents an indicator whether app variant is flex extension point enabled", + "type": "boolean", + "default": false + } + } + }, + { + "oneOf": [ + { + "type": "object", + "required": ["flexEnabled"], + "properties": { + "flexEnabled": { + "description": "Represents an Indicator whether an app is flex enabled", + "type": "boolean", + "enum": [true] + }, + "routing": { + "$ref": "#/definitions/routing_flexEnabled" + }, + "rootView": { + "$ref": "#/definitions/rootView_def_flexEnabled" + } + } + }, + { + "type": "object", + "properties": { + "flexEnabled": { + "description": "Represents an Indicator whether an app is flex enabled", + "type": "boolean", + "enum": [false] + }, + "routing": { + "$ref": "#/definitions/routing" + }, + "rootView": { + "$ref": "#/definitions/rootView_def" + } + } + } + ] + } + ], + "definitions": { + "deviceType": { + "type": "object", + "description": "Represents device types on which the app is running", + "additionalProperties": false, + "properties": { + "desktop": { + "description": "Represents indicator whether desktop device is supported, default true", + "type": "boolean" + }, + "tablet": { + "description": "Represents indicator whether tablet device is supported, default true", + "type": "boolean" + }, + "phone": { + "description": "Represents indicator whether phone device is supported, default true", + "type": "boolean" + } + } + } + } + }, + "sap.platform.abap": { + "title": "JSON schema for SAP.PLATFORM.ABAP Namespace", + "description": "Represents ABAP platform specific attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0"] + }, + "uri": { + "description": "Represents the uri of the app in the ABAP system", + "type": "string" + }, + "uriNwbc": { + "description": "Represents the alternative uri of the app in the ABAP system for starting the application", + "type": "string" + } + } + }, + "sap.platform.hcp": { + "title": "JSON schema for SAP.PLATFORM.HCP Namespace", + "description": "Represents HANA Cloud Platform platform specific attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0", "1.3.0"] + }, + "uri": { + "description": "Represents the uri of the app in the HANA Cloud Platform", + "type": "string" + }, + "uriNwbc": { + "description": "Represents the alternative uri of the app in the ABAP system for starting the application", + "type": "string" + }, + "providerAccount": { + "description": "Represents the provider account of the HTML5 application", + "type": "string" + }, + "appName": { + "description": "Represents the HTML5 application name", + "type": "string", + "pattern": "^[a-z][a-z0-9]{0,29}$" + }, + "appVersion": { + "description": "Represents the version of the HTML5 application", + "type": "string" + }, + "multiVersionApp": { + "description": "Indicates that HCP application is multi-version enabled", + "type": "boolean" + } + } + }, + "sap.platform.cf": { + "title": "JSON schema for SAP.PLATFORM.CF Namespace", + "description": "Represents CF(Cloud Foundry) platform specific attributes", + "type": "object", + "additionalProperties": true, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0"] + }, + "oAuthScopes": { + "description": "Represents the authorization scope of the application", + "type": "array", + "items": { + "type": "string" + }, + "appHostId": { + "description": "Application host id to which the HTML5 app belongs", + "type": "string" + }, + "changedOn": { + "description": "Changed on time stamp of the HTML5 app", + "type": "string" + }, + "appName": { + "description": "Represents the HTML5 application name", + "type": "string", + "pattern": "^[a-z][a-z0-9]{0,29}$" + }, + "appVersion": { + "description": "Represents the version of the HTML5 application", + "type": "string" + }, + "multiVersionApp": { + "description": "Indicates wether an HTML5 application is multi-version enabled", + "type": "boolean" + } + } + } + }, + "sap.platform.mobilecards": { + "title": "JSON schema for SAP.PLATFORM.MOBILECARDS Namespace", + "description": "Represents Mobile Cards platform specific attributes", + "type": "object", + "additionalProperties": true, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0"] + }, + "compatible": { + "description": "Represents the compatibility of this app with the Mobile Cards platform.", + "type": "boolean" + } + } + }, + "sap.fiori": { + "title": "JSON schema for SAP.FIORI Namespace", + "description": "Represents SAP Fiori specific attributes", + "type": "object", + "required": ["registrationIds", "archeType"], + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0", "1.3.0"] + }, + "registrationIds": { + "description": "Represents array of registration ids, i.e. for Fiori apps fiori id(s)", + "type": "array", + "items": { + "type": "string" + } + }, + "archeType": { + "description": "Represents architecture type of an application. The supported types are transactional or analytical or factsheet or reusecomponent or fpmwebdynpro or designstudio", + "type": "string", + "enum": [ + "transactional", + "analytical", + "factsheet", + "reusecomponent", + "fpmwebdynpro", + "designstudio" + ] + }, + "abstract": { + "description": "Indicator that app is an abstract (generic) app which may not be used directly, but needs to be specialized in the SAP Fiori launchpad content", + "type": "boolean" + }, + "cloudDevAdaptationStatus": { + "description": "Represents the release status for the developer adaptation in the cloud (relevant for SAP internal only). The supported types are released, deprecated, obsolete, no value means not released", + "type": "string", + "enum": ["released", "deprecated", "obsolete"] + } + } + }, + "sap.ui.generic.app": { + "title": "JSON schema for SAP.UI.GENERIC.APP Namespace", + "description": "Represents GENERIC APP specific attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "_version": { + "type": "string", + "enum": ["1.1.0", "1.2.0", "1.3.0", "1.4.0", "1.5.0", "1.6.0"] + }, + "settings": { + "description": "Represents global settings for the application controller", + "$ref": "#/definitions/setting_def" + }, + "pages": { + "description": "Represents one ore more pages of an application. UI5 routing is created from the definitions in this section", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/pages_array" + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]+[\\|]?[a-zA-Z0-9_\\.\\-]+$": { + "$ref": "#/definitions/pages_map" + } + } + } + ] + } + } + }, + "sap.fe": { + "title": "JSON schema for SAP.FE Namespace", + "description": "Represents specific attributes for Fiori Elements ", + "type": "object" + }, + "sap.flp": { + "title": "JSON schema for SAP.FLP Namespace", + "description": "Represents FLP specific attributes", + "type": "object", + "required": ["type"], + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0", "1.3.0"] + }, + "tileSize": { + "description": "Represents size of the tile", + "type": "string", + "enum": ["1x1", "1x2"] + }, + "type": { + "description": "Represents the type of FLP entry. It must be 'application' or 'tile' or 'plugin'", + "type": "string", + "enum": ["application", "tile", "plugin"] + }, + "config": { + "description": "Represents configuration parameters of the FLP entry", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9\\_\\.\\-]*$": { + "description": "Represents the configuration key and values", + "type": "object" + } + } + }, + "origin": { + "description": "Represents the original tile and target mapping which resulted in this app", + "type": "object", + "additionalProperties": false, + "properties": { + "tileId": { + "description": "Represents the original tile which resulted in this app", + "type": "string" + }, + "targetMappingId": { + "description": "Represents the original target mapping which resulted in this app", + "type": "string" + } + } + } + } + }, + "sap.ovp": { + "title": "JSON schema for SAP.OVP Namespace", + "description": "Represents OVP specific attributes", + "type": "object", + "required": ["cards"], + "dependencies": { + "globalFilterEntityType": ["globalFilterModel"] + }, + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": [ + "1.1.0", + "1.2.0", + "1.3.0", + "1.4.0", + "1.5.0", + "1.6.0", + "1.7.0", + "1.8.0" + ] + }, + "globalFilterModel": { + "description": "Represents the name of global filter OData model, which contains entities definition that are relevant for global filters", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@]*$" + }, + "globalFilterEntityType": { + "description": "Represents the entity to use as global filter in the smart filter bar control", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@]*$" + }, + "globalFilterEntitySet": { + "description": "Represents the entity set to use as global filter in the smart filter bar control", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@]*$" + }, + "showBasicSearch": { + "description": "Represents a switch to include basic search in the global filters", + "type": "boolean", + "default": false + }, + "disableErrorPage": { + "description": "Represents a switch to disable the error page shown on load of overview page when no data is retreived from the backend", + "type": "boolean", + "default": false + }, + "smartVariantRequired": { + "description": "Represents a switch to activate smart variant management in the global filters", + "type": "boolean", + "default": true + }, + "bHeaderExpanded": { + "description": "Represents a switch to show smart filter bar in expanded or collapsed mode", + "type": "boolean", + "default": false + }, + "containerLayout": { + "description": "Represents the layout of the card container", + "type": "string", + "default": "fixed", + "enum": ["fixed", "resizable"] + }, + "showDateInRelativeFormat": { + "description": "Represents a switch to Enable or disable Relative or Normal date formating in ovp application", + "type": "boolean", + "default": true + }, + "disableTableCardFlexibility": { + "description": "Represents a switch to Enable or Disable the Flexibility of Table cards", + "type": "boolean", + "default": false + }, + "enableLiveFilter": { + "description": "Represents the switch to activate live update in the global filters, else manual update will be required", + "type": "boolean", + "default": true + }, + "refreshStrategyOnAppRestore": { + "description": "Represents the refresh strategies configured for OVP while coming back to the source app", + "$ref": "#/definitions/refreshStrategies_prop_def" + }, + "considerAnalyticalParameters": { + "description": "Flag to enable/disable analytical parameter support for Smart filter bar", + "type": "boolean", + "default": false + }, + "refreshIntervalInMinutes": { + "description": "Time interval in minutes to auto refresh the card models", + "type": "integer", + "default": 1 + }, + "useDateRangeType": { + "description": "Flag to enable/disable semantic date range control for Smart filter bar", + "type": "boolean", + "default": false + }, + "chartSettings": { + "description": "Represents the object to store analytical chart settings", + "type": "object", + "properties": { + "showDataLabel": { + "description": "Flag to enable data labels on analytical charts", + "type": "boolean", + "default": false + } + } + }, + "filterSettings": { + "description": "Represents the object to store filter bar configuration", + "type": "object", + "properties": { + "dateSettings": { + "description": "Represents the object to store date type filter fields configuration", + "type": "object", + "properties": { + "useDateRange": { + "description": "Flag to enable DateTimeRange setting for date type filter fields with filter restriction interval", + "type": "boolean", + "default": false + }, + "selectedValues": { + "description": "Represents the semantic date values selected for the date filter field", + "type": "string" + }, + "exclude": { + "description": "Flag to exclude values from the date picker", + "type": "boolean", + "default": false + }, + "fields": { + "description": "Represents the filter field definition for each field", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]*$": { + "$ref": "#/definitions/filterFieldName" + } + } + } + } + } + } + }, + "dataLoadSettings": { + "description": "Represents the object to define data loading behaviour for an overview page application", + "type": "object", + "properties": { + "loadDataOnAppLaunch": { + "description": "Data load behaviour options on application launch", + "type": "string", + "default": "always", + "enum": ["always", "never", "ifAnyFilterExist"] + } + } + }, + "cards": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]+$": { + "$ref": "#/definitions/card" + } + } + }, + "resizableLayout": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^cols_[0-9]+$": { + "$ref": "#/definitions/resizableLayoutVariant" + } + } + } + } + }, + "sap.insights": { + "additionalProperties": false, + "description": "Represents Insights attributes", + "required": ["parentAppId", "cardType"], + "properties": { + "_version": { + "type": "string", + "enum": ["1.0.0", "1.1.0", "1.2.0", "1.3.0", "1.4.0"] + }, + "parentAppId": { + "type": "string", + "description": "Represents mandatory unique app identifier of the app containing self manifest." + }, + "filterEntitySet": { + "description": "Represents the entity to use as global filter in the filter bar control", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@]*$", + "type": "string" + }, + "templateName": { + "description": "Represents the template name, from where manifest is generated", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@]*$", + "type": "string" + }, + "cardType": { + "description": "Represents the environment type of Insights card", + "type": "string", + "enum": ["DT", "RT"] + }, + "isDtCardCopy": { + "description": "Represents the state of original or copied card", + "type": "boolean", + "default": false + }, + "isDeletedForUser": { + "description": "Represents the deleted state for a user", + "type": "boolean", + "default": false + }, + "visible": { + "description": "Represents the visibility type of Insights card", + "type": "boolean", + "default": true + }, + "rank": { + "description": "Represents the display order of Insights card", + "type": "integer" + }, + "versions": { + "description": "Represents UI5 and card generator middleware version.", + "type": "object", + "properties": { + "ui5": { + "description": "Represents the version of UI5 used to generate the card.", + "type": "string" + }, + "dtMiddleware": { + "description": "Represents the version of design time card generator", + "type": "string" + } + } + } + }, + "title": "JSON schema for SAP Insights Namespace", + "type": "object" + }, + "sap.wda": { + "title": "JSON schema for SAP.WDA Namespace", + "description": "Represents WDA specific attributes", + "type": "object", + "required": ["applicationId"], + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0"] + }, + "applicationId": { + "description": "Represents ID of an application", + "type": "string", + "pattern": "^[a-zA-Z0-9\\/_]{1,30}$" + }, + "configId": { + "description": "Represents ID of an application configuration", + "type": "string", + "pattern": "^[a-zA-Z0-9\\/\\_]{1,32}$" + }, + "flavorId": { + "description": "Represents SAP Screen Personas Flavor ID", + "type": "string", + "pattern": "^[A-F0-9]{1,32}$" + }, + "compatibilityMode": { + "description": "Indicates that WebDynpro Application requires Compatibility Mode, while uses legacy shell services. Possible values are true or false (default)", + "type": "boolean", + "default": false + } + } + }, + "sap.apf": { + "title": "JSON schema for SAP.APF Namespace", + "description": "Represents APF specific attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0"] + }, + "activateFilterReduction": { + "description": "Represents a switch to activate filter reduction so that filters in OData requests can be represented as ABAP select options", + "type": "boolean", + "default": false + }, + "activateLrep": { + "description": "Represents a switch to activate LREP as the persistence for configurations and texts", + "type": "boolean", + "default": false + }, + "useHeadRequestForXsrfToken": { + "description": "Represents a switch to use HEAD-Requests instead of GET-Requests when fetching the XSRF-Security-Token", + "type": "boolean", + "default": false + } + } + }, + "sap.cloud.portal": { + "title": "JSON schema for SAP.CLOUD.PORTAL Namespace", + "description": "Represents Cloud Portal specific attributes", + "type": "object" + }, + "sap.gui": { + "title": "JSON schema for SAP.GUI Namespace", + "description": "Represents GUI specific attributes", + "type": "object", + "required": ["transaction"], + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0", "1.2.0"] + }, + "transaction": { + "description": "Represents transaction of an application", + "type": "string", + "pattern": "^[a-zA-Z0-9\\/_]{1,20}$" + }, + "flavorId": { + "description": "Represents SAP Screen Personas Flavor ID", + "type": "string", + "pattern": "^[A-F0-9]{1,32}$" + } + } + }, + "sap.integration": { + "title": "JSON schema for SAP.INTEGRATION Namespace", + "description": "Represents Application Integration specific attributes", + "type": "object", + "required": ["urlTemplateId", "parameters"], + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0"] + }, + "urlTemplateId": { + "description": "Reference to the desired URL Template", + "type": "string", + "examples": [ + "template.sap.sfsf", + "template.sap.ui5", + "template.sap.wda" + ] + }, + "parameters": { + "description": "Represents configuration parameters which will be used by Template Engine to compile URL Template", + "type": "array", + "items": { + "type": "object", + "required": ["key", "value"], + "properties": { + "key": { + "type": "string", + "description": "Represents the name of the desired parameter" + }, + "value": { + "type": "string", + "description": "Represents the actual value of the desired parameter" + } + } + } + } + } + }, + "sap.wcf": { + "title": "JSON schema for SAP.WCF Namespace", + "description": "Represents WCF Application specific attributes", + "type": "object", + "required": ["wcf-target-id"], + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0"] + }, + "wcf-target-id": { + "description": "Represents the target technical id for a WCF Application", + "type": "string", + "pattern": "^[a-zA-Z0-9\\/_]{1,10}$" + } + } + }, + "sap.ui.smartbusiness.app": { + "title": "JSON schema for SAP.UI.SMARTBUSINESS.APP Namespace", + "description": "Represents specific attributes for Smart Business ", + "type": "object" + }, + "sap.mobile": { + "title": "JSON schema for SAP.MOBILE Namespace", + "description": "Represents mobile specific attributes", + "type": "object", + "required": ["definingRequests"], + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.1.0"] + }, + "definingRequests": { + "description": "Represents mobile specific attributes", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]*": { + "$ref": "#/definitions/definingRequest" + } + } + } + } + }, + "sap.copilot": { + "title": "JSON schema for SAP.COPILOT Namespace", + "description": "Represents specific attributes for SAP CoPilot", + "type": "object", + "additionalProperties": true, + "properties": { + "_version": { + "description": "Represents SAP.COPILOT attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0", "1.1.0"] + }, + "contextAnalysis": { + "description": "Settings for the context analysis features of SAP CoPilot", + "type": "object", + "additionalProperties": true, + "properties": { + "allowAddingObjectsFromAppScreenToCollection": { + "description": "Enable/Disable the ability for SAP CoPilot to analyze your Application Screens and add the found objects to a Collection", + "type": "boolean", + "default": true + }, + "whitelistedEntityTypes": { + "description": "A list of the whitelisted EntityTypes, prefixed with their namespace, that SAP CoPilot can display. The empty list is ignored, thus allowing all EntityTypes by default.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "digitalAssistant": { + "description": "Settings for the Digital Assistant features of SAP CoPilot", + "type": "object", + "additionalProperties": true, + "properties": { + "intentDefinition": { + "description": "A list of Intent", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]*$": { + "type": "object", + "additionalProperties": true, + "properties": { + "uri": { + "description": "Represents the uri of the intent", + "type": "string" + }, + "dataSources": { + "description": "A list of the sap.app.dataSources used by the intent", + "type": "array", + "items": { + "type": "string" + } + }, + "i18n": { + "description": "Represents the uri of the translation file", + "type": "string" + } + } + } + } + } + } + } + } + }, + "sap.map": { + "title": "JSON schema for SAP.MAP Namespace", + "description": "Represents specific attributes for SAP.MAP ", + "type": "object" + }, + "sap.url": { + "title": "JSON schema for SAP.URL Namespace", + "description": "Represents specific attributes for SAP URL", + "type": "object", + "additionalProperties": false, + "required": ["uri"], + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0"] + }, + "uri": { + "description": "Represents URI of an application", + "type": "string" + } + } + }, + "sap.platform.sfsf": { + "title": "JSON schema for SAP.PLATFORM.SFSF Namespace", + "description": "Represents SFSF platform specific attributes", + "type": "object", + "additionalProperties": false, + "required": ["appName"], + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0"] + }, + "uri": { + "description": "Represents the uri inside the SFSF app", + "type": "string" + }, + "appName": { + "description": "Represents the SFSF application name", + "type": "string" + }, + "appVersion": { + "description": "Represents the version of the SFSF application", + "type": "string" + } + } + }, + "sap.cloud": { + "title": "JSON schema for SAP.CLOUD Namespace", + "description": "Represents cloud platform specific attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "_version": { + "description": "Represents attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0", "1.1.0", "1.2.0"] + }, + "service": { + "description": "Unique Business Service Identifier", + "type": "string", + "pattern": "^[^- @#$%^&()!]+$" + }, + "public": { + "description": "Specify if the UI can be accessed from a different space than origin development space", + "type": "boolean", + "default": false + } + } + }, + "sap.card": { + "title": "JSON schema for SAP.CARD Namespace", + "description": "Represents general card attributes", + "type": "object", + "additionalProperties": false, + "required": ["type", "header"], + "properties": { + "_version": { + "description": "Represents SAP.CARD attributes format version. It is managed by namespace owner", + "type": "string", + "enum": [ + "1.1.0", + "1.2.0", + "1.3.0", + "1.4.0", + "1.5.0", + "1.6.0", + "1.7.0", + "1.8.0", + "1.9.0", + "1.10.0", + "1.11.0", + "1.13.0", + "1.14.0", + "1.15.0", + "1.16.0", + "1.17.0", + "1.18.0", + "1.19.0", + "1.20.0", + "1.21.0", + "1.22.0", + "1.23.0", + "1.24.0", + "1.25.0", + "1.26.0", + "1.27.0", + "1.28.0", + "1.29.0", + "1.30.0", + "1.31.0", + "1.32.0", + "1.33.0", + "1.34.0", + "1.35.0", + "1.36.0" + ] + }, + "designtime": { + "description": "The path to the design time folder with assets files", + "type": "string" + }, + "configuration": { + "description": "General configuration of the card. Allows to define parameters, destinations, filters and more", + "type": "object", + "additionalProperties": false, + "properties": { + "enableMarkdown": { + "description": "Markdown enablement for Adaptive Content", + "type": "boolean" + }, + "parameters": { + "description": "Map of parameters", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Configuration.Parameter" + } + }, + "filters": { + "description": "Map of filters", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Configuration.FilterType.Select" + }, + { + "$ref": "#/definitions/Configuration.FilterType.DateRange" + }, + { + "$ref": "#/definitions/Configuration.FilterType.Search" + } + ] + } + }, + "destinations": { + "description": "Describes what destinations are used by the card", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Configuration.Destinations" + } + }, + "csrfTokens": { + "description": "Describes the CSRF tokens used by the card", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Configuration.CSRFToken" + } + }, + "actionHandlers": { + "description": "Holds configuration for the default action handlers", + "type": "object", + "additionalProperties": false, + "properties": { + "submit": { + "description": "Configuration for the submit action handler", + "type": "object" + } + } + }, + "messages": { + "description": "Describes the messages for the card", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Configuration.NoData" + } + } + } + }, + "type": { + "description": "Represents the type of the card's content", + "type": "string", + "enum": [ + "AdaptiveCard", + "Analytical", + "AnalyticsCloud", + "Calendar", + "Component", + "List", + "Object", + "Table", + "Timeline", + "WebPage" + ] + }, + "data": { + "$ref": "#/definitions/data" + }, + "headerPosition": { + "description": "Represents card header position - under or over the content", + "type": "string", + "oneOf": [ + { + "enum": ["Top", "Bottom"], + "default": "Top" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "header": { + "description": "Represents card header attributes", + "$ref": "#/definitions/HeaderType" + }, + "content": { + "description": "Represents card content attributes. Content type should be the same as card type e.g. if card type List is used the content type should also be List" + }, + "extension": { + "description": "A path to an Extension implementation. It is resolved relatively to the manifest", + "type": "string" + }, + "footer": { + "description": "Represent card footer attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "actionsStrip": { + "description": "[Experimental] Describes actions strip", + "type": "array", + "items": { + "$ref": "#/definitions/actionsStripItem" + } + }, + "paginator": { + "description": "[Experimental] Describes the paginator", + "type": "object", + "additionalProperties": false, + "properties": { + "pageSize": { + "description": "Represents the number of the items in one page", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "totalCount": { + "description": "Represents the total count of the items in all pages", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "visible": { + "description": "[Experimental] Visibility of the footer", + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "requiredHeight": { + "description": "Represents card minimum required height", + "type": "string" + }, + "requiredWidth": { + "description": "Represents card minimum required width", + "type": "string" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "List" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.List" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "Analytical" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.Analytical" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "AnalyticsCloud" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.AnalyticsCloud" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "Timeline" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.Timeline" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "Table" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.Table" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "Object" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.Object" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "Component" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.Component" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "Calendar" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.Calendar" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "AdaptiveCard" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.AdaptiveCard" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "WebPage" + } + } + }, + "then": { + "properties": { + "content": { + "$ref": "#/definitions/ContentType.WebPage" + } + } + } + } + ], + "definitions": { + "i18n_key": { + "type": "string", + "pattern": "^\\{\\{[\\w][\\w\\.\\-]*\\}\\}$" + } + } + }, + "sap.package": { + "title": "JSON schema for SAP.PACKAGE Namespace", + "description": "Represents general package attributes. Experimental, will be detailed in the future", + "type": "object", + "additionalProperties": true, + "required": [ + "id", + "title", + "description", + "packageVersion", + "vendor", + "support" + ], + "properties": { + "_version": { + "description": "Represents SAP.PACKAGE attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0", "1.1.0"] + }, + "id": { + "description": "Represents mandatory unique package identifier", + "$ref": "#/definitions/iddef" + }, + "i18n": { + "default": "i18n/i18n.properties", + "description": "Represents path inside the package to the properties file containing text symbols for the packages texts", + "oneOf": [ + { + "default": "i18n/i18n.properties", + "type": "string" + } + ] + }, + "packageVersion": { + "description": "Represents mandatory semantic version of the package information and optional the upgrade notification", + "type": "object", + "required": ["version"], + "properties": { + "version": { + "description": "Represents mandatory semantic version of the package", + "$ref": "#/definitions/semanticversion" + }, + "upgradeNotification": { + "description": "Represents optional upgrade notification once the package is available. none - no notification, package will be installed automatically for any version. major - notification before a new major version is installed. major.minor - notification before a major and minor version is installed. all - notification before any new version is installed, including patches", + "type": "string", + "default": "all", + "enum": ["none", "major", "major.minor", "all"] + } + } + }, + "type": { + "description": "Represents type of an package and can be card, workflow, workspace-template", + "type": "string", + "enum": ["card", "workflow", "workspace-template"] + }, + "title": { + "description": "Represents a title (mandatory); to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "subTitle": { + "description": "Represents a subtitle to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "shortTitle": { + "description": "Represents a shorter version of the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "info": { + "description": "Represents additional information to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "description": { + "description": "Represents a description; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "icon": { + "description": "Represents icon name or source URL for the package", + "type": "string" + }, + "tags": { + "description": "Represents array of keywords used to find the package", + "type": "object", + "additionalProperties": true, + "required": ["keywords"], + "properties": { + "keywords": { + "$ref": "#/definitions/tag" + }, + "technicalAttributes": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Z0-9_\\-\\/]+$" + } + } + } + }, + "vendor": { + "description": "Represents the support information", + "$ref": "#/definitions/vendor" + }, + "homepage": { + "description": "Represents the homepage information", + "$ref": "#/definitions/infolink" + }, + "support": { + "description": "Represents the support information", + "$ref": "#/definitions/infolink" + }, + "documentation": { + "description": "Represents the documentation information", + "$ref": "#/definitions/infolink" + }, + "contents": { + "type": "array", + "items": { + "description": "Represents the artifacts contained in the package", + "$ref": "#/definitions/contentitem" + } + }, + "consumption": { + "description": "Represents list of product ids that are allowed to consume this package. if not defined all products that are capable of installing this package are allowed", + "type": "array", + "items": { + "description": "Represents the id of the product that can consume this package.", + "type": "string" + } + }, + "dependencies": { + "description": "Represents the products and service that the pacakge depends on", + "type": "object", + "properties": { + "products": { + "description": "List of products that this package depends on", + "type": "array", + "items": { + "type": "string" + } + }, + "services": { + "description": "List of services that this package depends on", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "sap.artifact": { + "title": "JSON schema for SAP.ARTIFACT Namespace", + "description": "Represents general artifact attributes.", + "type": "object", + "additionalProperties": true, + "required": ["id", "type", "title", "description", "artifactVersion"], + "properties": { + "_version": { + "description": "Represents SAP.ARTIFACT attributes format version. It is managed by namespace owner", + "type": "string", + "enum": ["1.0.0", "1.1.0"] + }, + "id": { + "description": "Represents mandatory unique artifact identifier", + "$ref": "#/definitions/iddef" + }, + "i18n": { + "default": "i18n/i18n.properties", + "description": "Represents path inside the artifact to the properties file containing text symbols for the artifacts texts", + "oneOf": [ + { + "default": "i18n/i18n.properties", + "type": "string" + } + ] + }, + "artifactVersion": { + "description": "Represents mandatory semantic version of the artifact", + "type": "object", + "required": ["version"], + "properties": { + "version": { + "$ref": "#/definitions/semanticversion" + } + } + }, + "type": { + "description": "Represents type of an artifact and can be card, workflow, workspace-template", + "type": "string", + "enum": ["card", "workflow", "workspace-template"] + }, + "title": { + "description": "Represents a title (mandatory); to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "subTitle": { + "description": "Represents a subtitle to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "shortTitle": { + "description": "Represents a shorter version of the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "info": { + "description": "Represents additional information to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "description": { + "description": "Represents a description; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "icon": { + "description": "Represents icon name or source URL for the artifact", + "type": "string" + }, + "tags": { + "description": "Represents array of keywords used to find the artifact", + "type": "object", + "additionalProperties": true, + "required": ["keywords"], + "properties": { + "keywords": { + "$ref": "#/definitions/tag" + }, + "technicalAttributes": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-Z0-9_\\-\\/]+$" + } + } + } + } + } + } + }, + "definitions": { + "tag": { + "type": "array", + "items": { + "description": "Represents a tag; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + } + }, + "semanticversion": { + "description": "The version number of the schema in major.minor.patch format.", + "type": "string", + "pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$" + }, + "iddef": { + "type": "string", + "maxLength": 70, + "pattern": "^[A-Za-z]{2,}.[A-Za-z]{2,}" + }, + "contentitem": { + "description": "Represents an item of the content list defining the sub manifest and baseurl", + "type": "object", + "properties": { + "baseURL": { + "description": "Relative url to the artifact within the folder in this package", + "type": "string" + }, + "manifest": { + "description": "Wraps the child manifest", + "type": "object", + "properties": { + "sap.artifact": { + "description": "The artifacts manifest", + "type": "object" + } + } + } + } + }, + "infolink": { + "description": "Represents a link information with text and url", + "type": "object", + "required": ["url", "text"], + "properties": { + "url": { + "description": "Represents a target url", + "type": "string", + "format": "uri-template" + }, + "text": { + "description": "Represents a descriptive text for the target", + "type": "string" + } + } + }, + "vendor": { + "description": "Represents the vendor information", + "type": "object", + "required": ["id", "name", "url"], + "properties": { + "id": { + "description": "Represents the vendor id", + "type": "string" + }, + "name": { + "description": "Represents the vendor name", + "type": "string" + }, + "lineOfBusiness": { + "description": "Represents the vendor line of business within the vendors organization if any", + "type": "string" + }, + "url": { + "description": "Represents a target url", + "type": "string", + "format": "uri-template" + } + } + }, + "Microchart.StackedBar.Bar": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "description": "The actual value shown as a colored horizontal bar", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "displayValue": { + "description": "The value, which will be displayed as a text in the tooltip of the bar", + "type": "string" + }, + "legendTitle": { + "description": "Title, which will be displayed in the legend", + "type": "string" + }, + "color": { + "description": "The color of the bar", + "type": "string", + "oneOf": [ + { + "$ref": "#/definitions/Enums.ValueColor" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "Microchart.Bullet.Threshold": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "description": "The value of the threshold", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "color": { + "description": "The state color of the threshold", + "type": "string", + "oneOf": [ + { + "$ref": "#/definitions/Enums.ValueColor" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "Microchart.StackedBar": { + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { + "description": "Represents the type of the Microchart", + "type": "string", + "const": "StackedBar" + }, + "maxValue": { + "description": "The maximum scale value for the bar chart", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "displayValue": { + "description": "The value, which will be displayed as a text next to the bar", + "type": "string" + }, + "bars": { + "description": "The bars of the chart", + "type": "array", + "items": { + "$ref": "#/definitions/Microchart.StackedBar.Bar" + } + } + } + }, + "Microchart.Bullet": { + "type": "object", + "additionalProperties": false, + "required": ["type"], + "properties": { + "type": { + "description": "Represents the type of the Microchart", + "type": "string", + "const": "Bullet" + }, + "value": { + "description": "The actual value shown as a colored horizontal bar", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "minValue": { + "description": "The minimum scale value for the bar chart", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "maxValue": { + "description": "The maximum scale value for the bar chart", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "displayValue": { + "description": "The actual value, which will be displayed as a text next to the bar", + "type": "string" + }, + "target": { + "description": "The target value - displayed as a vertical line (marker)", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "scale": { + "description": "The scaling suffix that is appended to all values", + "type": "string" + }, + "color": { + "description": "The state color of the bar", + "type": "string", + "oneOf": [ + { + "$ref": "#/definitions/Enums.ValueColor" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "thresholds": { + "description": "The thresholds indicators of the bar", + "type": "array", + "items": { + "$ref": "#/definitions/Microchart.Bullet.Threshold" + } + } + } + }, + "Configuration.Filter.Item": { + "description": "A single filter selection option", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the filter option", + "type": "string" + }, + "key": { + "description": "The unique key of the filter option. Mapped to the filter's value", + "type": "string" + } + } + }, + "Configuration.BasicDataType": { + "description": "Basic data types for parameters and filters", + "type": "string", + "enum": ["string", "integer", "number", "boolean", "date", "datetime"] + }, + "cache": { + "description": "Cache control settings", + "type": "object", + "additionalProperties": false, + "properties": { + "maxAge": { + "description": "The maximum age for which the cache is considered fresh", + "type": "number", + "default": 0 + }, + "staleWhileRevalidate": { + "description": "Should we show stale cache while revalidating", + "type": "boolean", + "default": false + }, + "noStore": { + "description": "[Deprecated] Set to true to disable caching for this card", + "type": "boolean", + "default": false + }, + "enabled": { + "description": "Set to false to disable caching for this card", + "type": "boolean", + "default": false + } + } + }, + "batchRequest": { + "description": "Represents a request which is a part of a batch request", + "type": "object", + "additionalProperties": false, + "required": ["url", "method"], + "properties": { + "url": { + "description": "The URL to make the request to", + "type": "string" + }, + "method": { + "description": "The HTTP method", + "type": "string", + "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] + }, + "headers": { + "description": "Represents HTTP headers", + "type": "object", + "additionalProperties": true + }, + "body": { + "description": "Represents the request body", + "additionalProperties": true + } + } + }, + "parameters": { + "description": "Represents parameters that are passed in the actions", + "type": "object", + "additionalProperties": true + }, + "extension": { + "description": "[Experimental] Represents attributes, needed to get data via extension", + "type": "object", + "additionalProperties": false, + "required": ["method"], + "properties": { + "method": { + "description": "The method of the extension, which fetches data", + "type": "string" + }, + "args": { + "description": "The arguments, with which the method will be called", + "type": "array" + } + } + }, + "service_0": { + "description": "Represents service that will be used for actions", + "oneOf": [ + { + "description": "Represents name of the Service to be used for the action", + "type": "string" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "Represents name of the Service to be used for the action", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/parameters" + } + } + } + ] + }, + "request": { + "description": "Represents request attributes", + "type": "object", + "additionalProperties": false, + "required": ["url"], + "properties": { + "mode": { + "description": "The mode of the request", + "type": "string", + "oneOf": [ + { + "enum": ["no-cors", "same-origin", "cors"], + "default": "cors" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "url": { + "description": "The URL to make the request to", + "type": "string" + }, + "method": { + "description": "The HTTP method", + "type": "string", + "oneOf": [ + { + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "OPTIONS", + "HEAD" + ], + "default": "GET" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "parameters": { + "description": "Represents the request parameters. If it is a POST request the parameters will be put as key/value pairs into the body of the request", + "$ref": "#/definitions/parameters" + }, + "headers": { + "description": "Represents HTTP headers", + "type": "object", + "additionalProperties": true + }, + "retryAfter": { + "description": "Number of seconds before the request is retried if it failed the previous time", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "timeout": { + "description": "A timeout (in milliseconds) for the request. A value of 0 means there will be no timeout.", + "oneOf": [ + { + "type": "number", + "default": 15000 + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "withCredentials": { + "description": "Indicates whether cross-site requests should be made using credentials", + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "batch": { + "description": "Map of requests to be batched", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/batchRequest" + } + }, + "cache": { + "description": "Cache control settings", + "$ref": "#/definitions/cache" + } + } + }, + "statusTextFormatter": { + "type": "object", + "description": "Defines fields for dynamic status formatting", + "additionalProperties": false, + "properties": { + "format": { + "description": "Defines binding information", + "type": "object", + "additionalProperties": false, + "properties": { + "translationKey": { + "type": "string" + }, + "parts": { + "type": "array" + } + } + } + } + }, + "iconBackgroundColor": { + "oneOf": [ + { + "enum": [ + "Accent1", + "Accent2", + "Accent3", + "Accent4", + "Accent5", + "Accent6", + "Accent7", + "Accent8", + "Accent9", + "Accent10", + "Placeholder", + "Random", + "TileIcon", + "Transparent" + ], + "default": "Transparent" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "ContentType.Calendar.SpecialDate.Template": { + "description": "The template for all specialDates", + "type": "object", + "additionalProperties": false, + "properties": { + "startDate": { + "description": "The start date of the special date. The accepted date format is ISO 8601", + "type": "string" + }, + "endDate": { + "description": "The end date of the special date. The accepted date format is ISO 8601", + "type": "string" + }, + "type": { + "description": "The type of the special date - one of the types defined in the legend", + "oneOf": [ + { + "enum": [ + "Type01", + "Type02", + "Type03", + "Type04", + "Type05", + "Type06", + "Type07", + "Type08", + "Type09", + "Type10", + "Type11", + "Type12", + "Type13", + "Type14", + "Type15", + "Type16", + "Type17", + "Type18", + "Type19", + "Type20" + ], + "default": "Type01" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.Calendar.LegendItem.Template": { + "description": "The template for all legendItems", + "type": "object", + "additionalProperties": false, + "properties": { + "category": { + "description": "Defines which card component describes the legend item. Available categories: \"calendar\" (represented as square) or \"appointment\" (circle)", + "type": "string" + }, + "text": { + "description": "The describing information of the item", + "type": "string" + }, + "type": { + "description": "The type of the legend item corresponding with the described component", + "oneOf": [ + { + "enum": [ + "Type01", + "Type02", + "Type03", + "Type04", + "Type05", + "Type06", + "Type07", + "Type08", + "Type09", + "Type10", + "Type11", + "Type12", + "Type13", + "Type14", + "Type15", + "Type16", + "Type17", + "Type18", + "Type19", + "Type20" + ], + "default": "Type01" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.Calendar.Item.Template": { + "description": "The template for all items", + "type": "object", + "additionalProperties": false, + "properties": { + "startDate": { + "description": "The start date of the item. The accepted date format is ISO 8601", + "type": "string" + }, + "endDate": { + "description": "The end date of the item. The accepted date format is ISO 8601", + "type": "string" + }, + "title": { + "description": "The title of the item", + "type": "string" + }, + "text": { + "description": "The additional information of the item", + "type": "string" + }, + "icon": { + "$ref": "#/definitions/simpleIcon" + }, + "type": { + "description": "The type of the item - one of the types defined in the legend", + "oneOf": [ + { + "enum": [ + "Type01", + "Type02", + "Type03", + "Type04", + "Type05", + "Type06", + "Type07", + "Type08", + "Type09", + "Type10", + "Type11", + "Type12", + "Type13", + "Type14", + "Type15", + "Type16", + "Type17", + "Type18", + "Type19", + "Type20" + ], + "default": "Type01" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "actions": { + "description": "Defines actions that can be applied on the item", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + } + } + }, + "ContentType.Calendar.SpecialDate": { + "description": "Describes each specialDate", + "type": "object", + "additionalProperties": false, + "properties": { + "template": { + "$ref": "#/definitions/ContentType.Calendar.SpecialDate.Template" + }, + "path": { + "description": "Defines the path to the structure holding the data about the specialDates", + "type": "string" + } + } + }, + "ContentType.Calendar.LegendItem": { + "description": "Describes each legendItem", + "type": "object", + "additionalProperties": false, + "properties": { + "template": { + "$ref": "#/definitions/ContentType.Calendar.LegendItem.Template" + }, + "path": { + "description": "Defines the path to the structure holding the data about the legendItems", + "type": "string" + } + } + }, + "ContentType.Calendar.Item": { + "description": "Describes each item", + "type": "object", + "additionalProperties": false, + "properties": { + "template": { + "$ref": "#/definitions/ContentType.Calendar.Item.Template" + }, + "path": { + "description": "Defines the path to the structure holding the data about the items", + "type": "string" + } + } + }, + "progressIndicator": { + "description": "Represents progress indicator attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "state": { + "description": "Represents state color", + "oneOf": [ + { + "$ref": "#/definitions/state" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "percent": { + "description": "Represents progress indicator percent value", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "text": { + "description": "Represents progress indicator text", + "type": "string" + } + } + }, + "identifier": { + "description": "Represents identifier", + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "type": "object", + "additionalProperties": false, + "description": "[Deprecated]", + "properties": { + "url": { + "type": "string" + }, + "target": { + "$ref": "#/definitions/target" + } + } + } + ] + }, + "textAlign": { + "description": "Represents options for text alignments", + "type": "string", + "enum": ["Begin", "Center", "End", "Initial", "Left", "Right"], + "default": "Begin" + }, + "ContentType.Table.Column": { + "description": "Represents object item attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "Represents a title of the column; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "width": { + "description": "Defines the width of the column", + "type": "string" + }, + "hAlign": { + "description": "Defines the horizontal alignment of the column content", + "oneOf": [ + { + "$ref": "#/definitions/textAlign" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "value": { + "description": "Represents the text value of the column", + "type": "string" + }, + "icon": { + "description": "Represents column with icon", + "$ref": "#/definitions/icon" + }, + "state": { + "description": "Defines the state of the column", + "oneOf": [ + { + "$ref": "#/definitions/state" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "url": { + "description": "[Deprecated] Defines the URL string", + "type": "string" + }, + "target": { + "description": "[Deprecated] Specifies where to open the 'url', if it is provided", + "type": "string", + "oneOf": [ + { + "$ref": "#/definitions/target" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "identifier": { + "oneOf": [ + { + "$ref": "#/definitions/identifier" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "progressIndicator": { + "description": "Represents progress indicator attributes", + "$ref": "#/definitions/progressIndicator" + }, + "visible": { + "description": "Represents the visibility state of the column", + "$ref": "#/definitions/visibility" + }, + "actions": { + "description": "Defines actions that can be applied on the group item", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + } + } + }, + "ContentType.Object.Item.IconGroupIcon": { + "description": "Definition for icons in the IconGroup", + "type": "object", + "additionalProperties": false, + "properties": { + "src": { + "type": "string", + "description": "Represents icon name or source URL" + }, + "text": { + "type": "string", + "description": "[Deprecated] Represents text that will be displayed in the icon" + }, + "initials": { + "type": "string", + "description": "Used as fallback if the 'src' property is not set or there is an issue with the resource. Up to two Latin letters can be displayed" + }, + "alt": { + "type": "string", + "description": "Represents text that will be displayed as a tooltip" + } + } + }, + "ContentType.Object.Item.Validation": { + "description": "[Experimental] Defines the user input validation", + "type": "object", + "additionalProperties": false, + "properties": { + "message": { + "description": "Defines custom validation message text", + "type": "string" + }, + "type": { + "description": "Defines the validation type", + "oneOf": [ + { + "enum": ["Error", "Warning", "Information"], + "default": "Error" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "required": { + "description": "Defines whether the user input is required", + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "minLength": { + "description": "Defines the minimum number of characters", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "maxLength": { + "description": "Defines the maximum number of characters", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "restrictToPredefinedOptions": { + "description": "Defines whether the value is restricted to predefined options", + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "pattern": { + "description": "Sets the regular expression pattern that should match the value", + "type": "string" + }, + "validate": { + "description": "An extension function used to validate the value", + "type": "string" + } + } + }, + "ContentType.Object.Item.ComboBoxItemTemplate": { + "description": "Template for combo box items", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the option", + "type": "string" + }, + "key": { + "description": "The unique key of the option. Mapped to the input's value", + "type": "string" + } + } + }, + "ContentType.Object.Item.IconGroupTemplate": { + "description": "Template definition for the icons in the group", + "type": "object", + "additionalProperties": false, + "required": ["icon"], + "properties": { + "icon": { + "$ref": "#/definitions/ContentType.Object.Item.IconGroupIcon" + }, + "actions": { + "description": "Defines actions that can be applied on the icon", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + } + } + }, + "ContentType.Object.Item.MainIndicator": { + "description": "Represents the main numeric indicator of the NumericData", + "type": "object", + "additionalProperties": false, + "properties": { + "number": { + "description": "The value of the main indicator", + "type": "string" + }, + "unit": { + "description": "The unit of the main indicator", + "type": "string" + }, + "trend": { + "description": "The trend indicator (direction)", + "type": "string", + "oneOf": [ + { + "enum": ["Down", "None", "Up"], + "default": "None" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "state": { + "description": "The state color of the main indicator", + "type": "string", + "oneOf": [ + { + "description": "The state color of the main indicator", + "$ref": "#/definitions/Enums.ValueColor" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "size": { + "oneOf": [ + { + "enum": ["S", "L"], + "default": "Default" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "target_0": { + "description": "Specifies where to open an URL", + "type": "string", + "enum": ["_blank", "_self"], + "default": "_blank" + }, + "ContentType.Object.Item": { + "description": "Represents a single item of information. It can contain label, value and image", + "type": "object", + "additionalProperties": false, + "properties": { + "icon": { + "description": "Defines the icon of the item", + "$ref": "#/definitions/icon" + }, + "label": { + "description": "Defines the label of the item", + "type": "string" + }, + "value": { + "description": "Represents the text, which is associated with the label", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "tooltip": { + "description": "Defines the tooltip of the link", + "type": "string" + }, + "type": { + "description": "Defines the type of the displayed information. Some of the types are deprecated", + "type": "string", + "oneOf": [ + { + "enum": [ + "Default", + "NumericData", + "Status", + "IconGroup", + "ComboBox", + "TextArea", + "RatingIndicator", + "phone", + "email", + "link", + "text" + ], + "default": "Default" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "url": { + "description": "[Deprecated] Defines the URL string. Works only with items of type 'link'", + "type": "string" + }, + "target": { + "description": "[Deprecated] Specifies the target of the link - it works like the target property of the HTML 'a' tag. Works only with items of type 'link'", + "oneOf": [ + { + "$ref": "#/definitions/target" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "emailSubject": { + "description": "[Deprecated] Represents the subject of the email. Works only with item of type 'email'", + "type": "string" + }, + "actions": { + "description": "Defines actions that can be applied on the group item", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "visible": { + "description": "Represents the visibility state of the item", + "$ref": "#/definitions/visibility" + }, + "mainIndicator": { + "description": "[Experimental]", + "$ref": "#/definitions/ContentType.Object.Item.MainIndicator" + }, + "sideIndicators": { + "description": "[Experimental] Multiple side indicators that relate to the main numeric indicator", + "type": "array", + "maxItems": 2, + "items": { + "$ref": "#/definitions/HeaderType.Numeric.SideIndicator" + } + }, + "sideIndicatorsAlignment": { + "description": "[Experimental] The alignment of the side indicators", + "type": "string", + "oneOf": [ + { + "enum": ["Begin", "End"], + "default": "Begin" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "template": { + "description": "[Experimental] Template definition for the icons in the group", + "$ref": "#/definitions/ContentType.Object.Item.IconGroupTemplate" + }, + "path": { + "description": "[Experimental] Binding path to the icon data", + "type": "string" + }, + "size": { + "description": "[Experimental] The size of the icons in an IconGroup", + "oneOf": [ + { + "enum": ["XS", "S", "M"], + "default": "XS" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "maxLines": { + "description": "Maximum number of lines", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "details": { + "description": "Represents additional information about the numeric indicators", + "type": "string" + }, + "state": { + "description": "The state color of the item", + "$ref": "#/definitions/state" + }, + "showStateIcon": { + "description": "Defines if a default state icon is shown", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "id": { + "description": "ID for input fields", + "type": "string" + }, + "selectedKey": { + "description": "Defines the initially selected key from the given options for ComboBox.", + "type": "string" + }, + "placeholder": { + "description": "Placeholder for input fields", + "type": "string" + }, + "rows": { + "description": "Property rows for TextArea", + "type": "number" + }, + "item": { + "type": "object", + "description": "Binding info for ComboBox items", + "required": ["template"], + "additionalProperties": false, + "properties": { + "template": { + "$ref": "#/definitions/ContentType.Object.Item.ComboBoxItemTemplate" + }, + "path": { + "description": "Defines the path to the structure holding the data about the items", + "type": "string", + "default": "/", + "pattern": "^[a-zA-Z0-9_\\.\\-/|@#]*$" + } + } + }, + "validations": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Object.Item.Validation" + } + }, + "maxValue": { + "description": "The number of displayed symbols for RatingIndicator", + "oneOf": [ + { + "type": "number", + "default": 5 + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "visualMode": { + "description": "Defines how float values are visualized for RatingIndicator: Full (values are rounded to the nearest integer value (e.g. 1.7 -> 2)) or Half (values are rounded to the nearest half value (e.g. 1.7 -> 1.5))", + "oneOf": [ + { + "enum": ["Full", "Half"], + "default": "Half" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.Object.Group": { + "description": "Represents a group of information for an object", + "type": "object", + "required": ["items"], + "additionalProperties": false, + "properties": { + "title": { + "description": "Represents a title of the object group; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "titleMaxLines": { + "description": "[Experimental] Limits the number of lines for wrapping the group title.", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": 1 + }, + "labelWrapping": { + "description": "[Experimental] Determines whether the labels of the group items will be wrapped.", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": false + }, + "items": { + "description": "Represents items of information", + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Object.Item" + } + }, + "visible": { + "description": "Represents the visibility state of the group", + "$ref": "#/definitions/visibility" + }, + "alignment": { + "description": "[Experimental] Alignment of the group", + "enum": ["Default", "Stretch"], + "default": "Default" + } + } + }, + "simpleIcon": { + "description": "Represents simple icon attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "src": { + "type": "string", + "description": "Represents icon name or source URL" + }, + "visible": { + "description": "Represents the visibility state of the icon", + "$ref": "#/definitions/visibility" + } + } + }, + "ContentType.Timeline.Item": { + "description": "Represents a single timeline item", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the timeline item", + "$ref": "#/definitions/field" + }, + "description": { + "description": "The description of the timeline item", + "$ref": "#/definitions/field" + }, + "dateTime": { + "description": "The dateTime value of the timeline item", + "$ref": "#/definitions/field" + }, + "owner": { + "description": "The owner of the timeline item", + "$ref": "#/definitions/field" + }, + "ownerImage": { + "description": "The owner image of the timeline item", + "properties": { + "value": { + "type": "string" + } + } + }, + "icon": { + "description": "The icon of the timeline item", + "$ref": "#/definitions/simpleIcon" + }, + "actions": { + "description": "Defines actions that can be applied on the item level", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + } + } + }, + "visibility": { + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "ContentType.Analytical.Field": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "The type of the feed", + "oneOf": [ + { + "enum": ["Measure", "Dimension"] + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "uid": { + "description": "The uid of the feed", + "type": "string" + }, + "values": { + "description": "The names of the measures or dimensions that are used for this feed", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ContentType.Analytical.Measure": { + "description": "Measure for the dataset", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "The name of the measure", + "type": "string" + }, + "label": { + "description": "[Deprecated] Label for the measure", + "type": "string" + }, + "value": { + "type": "string", + "description": "Binding path to the data" + } + } + }, + "ContentType.Analytical.Dimension": { + "description": "Dimension for the dataset", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "The name of the dimension", + "type": "string" + }, + "label": { + "description": "[Deprecated] Label for the dimension", + "type": "string" + }, + "value": { + "type": "string", + "description": "Binding path to the data" + }, + "displayValue": { + "type": "string", + "description": "Display value for the dimension. It doesn't work with 'waterfallType'" + }, + "dataType": { + "type": "string", + "description": "Data type of the dimension as displayed in the chart. Currently only in time series chart, it is required to set data type to 'date' if this column is going to feed the 'timeAxis'", + "oneOf": [ + { + "enum": ["string", "number", "date"], + "default": "string" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.Analytical.AxisText": { + "description": "Represents descriptive text of the axis", + "type": "object", + "additionalProperties": false, + "properties": { + "visible": { + "description": "Represents the visibility state of the descriptive axis text", + "$ref": "#/definitions/visibility" + } + } + }, + "ContentType.Analytical.DataLabel": { + "description": "Represents value attributes in the plot area", + "type": "object", + "additionalProperties": false, + "properties": { + "visible": { + "description": "Visibility of the data labels", + "$ref": "#/definitions/visibility" + }, + "showTotal": { + "description": "Visibility of data label for total value in some charts", + "$ref": "#/definitions/visibility" + } + } + }, + "ContentType.Analytical.Legend": { + "description": "[Deprecated] Represents chart legend attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "visible": { + "description": "Defines whether the legend will be visible", + "$ref": "#/definitions/visibility" + }, + "position": { + "description": "Defines where the legend will be positioned", + "type": "string", + "oneOf": [ + { + "enum": ["Top", "Bottom", "Left", "Right"], + "default": "Right" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "alignment": { + "description": "Defines how the legend will be aligned", + "type": "string", + "oneOf": [ + { + "enum": ["TopLeft", "Center"], + "default": "TopLeft" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "Microchart": { + "description": "[Experimental] Describes Microchart attributes", + "oneOf": [ + { + "$ref": "#/definitions/Microchart.Bullet" + }, + { + "$ref": "#/definitions/Microchart.StackedBar" + } + ] + }, + "icon": { + "description": "Represents icon attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "src": { + "type": "string", + "description": "Represents icon name or source URL" + }, + "alt": { + "type": "string", + "description": "Alternative text for the icon" + }, + "shape": { + "type": "string", + "description": "Represents the shape of the icon", + "oneOf": [ + { + "enum": ["Square", "Circle"], + "default": "Circle" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "text": { + "description": "[Deprecated] Initials for the avatar. Up to 2 symbols. If the image provided to the 'src' property fails to load, then the text will be shown", + "type": "string" + }, + "initials": { + "description": "Used as fallback if the 'src' property is not set or there is an issue with the resource. Up to two Latin letters can be displayed", + "type": "string" + }, + "size": { + "description": "[Experimental] The size of the icon", + "oneOf": [ + { + "enum": ["XS", "S", "M"] + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "backgroundColor": { + "$ref": "#/definitions/iconBackgroundColor" + }, + "visible": { + "description": "Represents the visibility state of the icon", + "$ref": "#/definitions/visibility" + } + } + }, + "state": { + "description": "Represents state of an entity", + "type": "string", + "enum": ["Error", "Success", "Warning", "None", "Information"], + "default": "None" + }, + "ContentType.List.Item.ValueStateItem": { + "description": "Represents value and state information for an object", + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "string", + "description": "The value of the field" + }, + "state": { + "description": "The state of the field", + "oneOf": [ + { + "$ref": "#/definitions/state" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "showStateIcon": { + "description": "Defines if a default state icon is shown", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "visible": { + "description": "Visibility of the item", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "field": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": { + "description": "Represents a label of the field; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "value": { + "type": "string", + "description": "The value of the field" + } + } + }, + "group": { + "description": "Represents group of items", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the group", + "type": "string" + }, + "order": { + "description": "The order by which the group will be sorted", + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "description": "Defines the path to the structure holding the data about the group order", + "type": "string" + }, + "dir": { + "description": "The sorting direction in which the group items will be ordered", + "oneOf": [ + { + "enum": ["ASC", "DESC"], + "default": "ASC" + } + ] + } + } + } + } + }, + "ContentType.List.Item": { + "description": "The template for all items", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "The title of the item", + "oneOf": [ + { + "$ref": "#/definitions/field" + }, + { + "type": "string" + } + ] + }, + "description": { + "description": "The description of the item", + "oneOf": [ + { + "$ref": "#/definitions/field" + }, + { + "type": "string" + } + ] + }, + "info": { + "description": "Defines an additional information text", + "$ref": "#/definitions/ContentType.List.Item.ValueStateItem" + }, + "highlight": { + "type": "string", + "description": "The highlight of the item", + "oneOf": [ + { + "$ref": "#/definitions/state" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "icon": { + "$ref": "#/definitions/icon" + }, + "attributesLayoutType": { + "description": "Defines the layout type of the attributes", + "oneOf": [ + { + "enum": ["OneColumn", "TwoColumns"], + "default": "TwoColumns" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "attributes": { + "description": "Defines the attributes", + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.List.Item.ValueStateItem" + } + }, + "actions": { + "description": "Defines actions that can be applied on the item", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "chart": { + "$ref": "#/definitions/Microchart" + }, + "actionsStrip": { + "description": "[Experimental] Describes actions strip", + "type": "array", + "items": { + "$ref": "#/definitions/actionsStripItem" + } + } + } + }, + "minHeight": { + "description": "Defines the min-height of the Content as a CSS value", + "type": "string" + }, + "Enums.ValueColor": { + "enum": ["Critical", "Error", "Good", "Neutral"], + "default": "Neutral" + }, + "HeaderType.Numeric.SideIndicator": { + "description": "Represents side indicator attributes which are used for additional information about the main indicator", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "Represents a title of the side indicator", + "type": "string" + }, + "number": { + "description": "Represents value of the side indicator", + "type": "string" + }, + "unit": { + "description": "Represents unit of measurement of the side indicator", + "type": "string" + }, + "state": { + "description": "The state color of the side indicator", + "type": "string", + "oneOf": [ + { + "description": "The state color of the side indicator", + "$ref": "#/definitions/Enums.ValueColor" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "visible": { + "description": "Visibility of the side indicator", + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "HeaderType.Numeric.MainIndicator": { + "description": "Represents the main numeric indicator of the header", + "type": "object", + "additionalProperties": false, + "properties": { + "number": { + "description": "The value of the main indicator", + "type": "string" + }, + "unit": { + "description": "The unit of the main indicator", + "type": "string" + }, + "trend": { + "description": "The trend indicator (direction)", + "type": "string", + "oneOf": [ + { + "enum": ["Down", "None", "Up"], + "default": "None" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "state": { + "description": "The state color of the main indicator", + "type": "string", + "oneOf": [ + { + "description": "The state color of the main indicator", + "$ref": "#/definitions/Enums.ValueColor" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "visible": { + "description": "Visibility of the main indicator", + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "status": { + "description": "Represents status attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "text": { + "description": "Represents status text", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/statusTextFormatter" + } + ] + } + } + }, + "iconWithoutSize": { + "description": "Represents icon attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "src": { + "type": "string", + "description": "Represents icon name or source URL" + }, + "alt": { + "type": "string", + "description": "Alternative text for the icon" + }, + "shape": { + "type": "string", + "description": "Represents the shape of the icon", + "oneOf": [ + { + "enum": ["Square", "Circle"], + "default": "Circle" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "text": { + "description": "[Deprecated] Initials for the avatar. Up to 2 symbols. If the image provided to the 'src' property fails to load, then the text will be shown", + "type": "string" + }, + "initials": { + "description": "Used as fallback if the 'src' property is not set or there is an issue with the resource. Up to two Latin letters can be displayed", + "type": "string" + }, + "backgroundColor": { + "$ref": "#/definitions/iconBackgroundColor" + }, + "visible": { + "description": "Visibility of the icon", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "action": { + "description": "Represents actions that can be applied on card elements", + "type": "object", + "required": ["type"], + "additionalProperties": false, + "properties": { + "type": { + "description": "The type of the action", + "type": "string", + "oneOf": [ + { + "enum": ["Custom", "Navigation", "Submit", "ShowCard", "HideCard"] + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "enabled": { + "description": "Represents the state of the action", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "service": { + "$ref": "#/definitions/service" + }, + "url": { + "description": "Represents the URL that will be used as navigation target if no service is provided", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "target": { + "description": "Specifies where to open the 'url', if it is provided", + "type": "string", + "oneOf": [ + { + "$ref": "#/definitions/target" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "HeaderType.Numeric": { + "additionalProperties": false, + "required": ["type"], + "description": "Represents header with numeric data", + "type": "object", + "properties": { + "type": { + "description": "Represents the type of the header", + "type": "string", + "enum": ["Numeric"] + }, + "title": { + "description": "Represents a title of the header; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "titleMaxLines": { + "description": "[Experimental] Limit the number of lines for the title.", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": 3 + }, + "subTitle": { + "description": "Represents a subtitle to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "subTitleMaxLines": { + "description": "[Experimental] Limit the number of lines for the sub title.", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": 2 + }, + "actions": { + "description": "Represents a description of the actions that can be applied on a part of a card", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "data": { + "$ref": "#/definitions/data" + }, + "unitOfMeasurement": { + "description": "Represents unit of measurement for the whole numeric header", + "type": "string" + }, + "mainIndicator": { + "$ref": "#/definitions/HeaderType.Numeric.MainIndicator" + }, + "sideIndicatorsAlignment": { + "description": "The alignment of the side indicators", + "type": "string", + "oneOf": [ + { + "enum": ["Begin", "End"], + "default": "Begin" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "details": { + "description": "Represents additional information about the numeric header", + "type": "string" + }, + "detailsMaxLines": { + "description": "[Experimental] Limit the number of lines for the details text.", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": 1 + }, + "sideIndicators": { + "description": "Multiple side indicators that relate to the main numeric indicator", + "type": "array", + "maxItems": 2, + "items": { + "$ref": "#/definitions/HeaderType.Numeric.SideIndicator" + } + }, + "status": { + "description": "Represents the status of the card", + "$ref": "#/definitions/status" + }, + "visible": { + "description": "[Experimental] Visibility of the header", + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "HeaderType.Default": { + "additionalProperties": false, + "description": "Represents default header attributes", + "type": "object", + "properties": { + "type": { + "description": "Represents the type of the header", + "type": "string", + "enum": ["Default"] + }, + "title": { + "description": "Represents a title of the header; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "titleMaxLines": { + "description": "[Experimental] Limit the number of lines for the title.", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": 3 + }, + "subTitle": { + "description": "Represents a subtitle to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "subTitleMaxLines": { + "description": "[Experimental] Limit the number of lines for the sub title.", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": 2 + }, + "actions": { + "description": "Represents a description of the actions that can be applied on a part of a card", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "data": { + "$ref": "#/definitions/data" + }, + "icon": { + "description": "Represents the icon of the card", + "$ref": "#/definitions/iconWithoutSize" + }, + "status": { + "description": "Represents the status of the card", + "$ref": "#/definitions/status" + }, + "visible": { + "description": "[Experimental] Visibility of the header", + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.WebPage": { + "description": "WebPage content is used to embed HTML page", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "minHeight": { + "$ref": "#/definitions/minHeight" + }, + "src": { + "description": "URL of the web page to be embedded", + "type": "string" + }, + "sandbox": { + "description": "Sandbox attribute of the iframe", + "type": "string" + } + } + }, + "ContentType.AdaptiveCard": { + "description": "Represents AdaptiveCard content", + "$ref": "/manifest/adaptive-card.json" + }, + "ContentType.Calendar": { + "description": "The calendar card is used to display a schedule of a single entity (such as person, resource) for a selected time interval", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "item": { + "$ref": "#/definitions/ContentType.Calendar.Item" + }, + "legendItem": { + "$ref": "#/definitions/ContentType.Calendar.LegendItem" + }, + "specialDate": { + "$ref": "#/definitions/ContentType.Calendar.SpecialDate" + }, + "date": { + "description": "The initial date of the calendar which appointments are initially shown. The accepted date format is ISO 8601", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "maxItems": { + "description": "Represents number of items displayed", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "maxLegendItems": { + "description": "Represents number of legendItems displayed", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "noItemsText": { + "description": "The text shown when there are no items for the selected day", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "moreItems": { + "description": "Defines actions that can be applied on the button showing there are more items than the shown", + "type": "object", + "properties": { + "actions": { + "description": "Represents an action that can be applied on he button showing there are more items than the shown", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + } + } + } + } + }, + "ContentType.Component": { + "description": "Represents the configuration for a component card's content", + "type": "object", + "additionalProperties": false, + "properties": { + "minHeight": { + "$ref": "#/definitions/minHeight" + } + } + }, + "ContentType.Object": { + "description": "Represents object content attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "groups": { + "description": "Represents groups of information for an object", + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Object.Group" + } + }, + "actions": { + "description": "Defines actions that can be applied on the content", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "hasData": { + "description": "Represents flag for no data", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object" + }, + { + "type": "array" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ], + "default": true + } + } + }, + "ContentType.Table": { + "description": "Represents table content attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "row": { + "description": "The template for all rows", + "type": "object", + "additionalProperties": false, + "properties": { + "columns": { + "description": "Defines the columns attributes", + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Table.Column" + } + }, + "actions": { + "description": "Defines actions that can be applied on the item", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + } + } + }, + "maxItems": { + "description": "Represents number of items", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "minItems": { + "description": "Represents the minimum expected number of items", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "group": { + "$ref": "#/definitions/group" + } + } + }, + "ContentType.Timeline": { + "description": "Represents time related content", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "item": { + "description": "Defines the timeline item", + "$ref": "#/definitions/ContentType.Timeline.Item" + }, + "maxItems": { + "description": "Represents number of items", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "minItems": { + "description": "Represents the minimum expected number of items", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.AnalyticsCloud": { + "description": "Represents SAP Analytics Cloud content attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "minHeight": { + "$ref": "#/definitions/minHeight" + }, + "actions": { + "description": "Defines actions that can be applied on the content", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "options": { + "description": "Options of the chart", + "oneOf": [ + { + "type": "object" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "ContentType.Analytical": { + "description": "Represents analytical content attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "chartType": { + "description": "The type of the chart", + "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "chartProperties": { + "description": "[Experimental] Chart configuration", + "oneOf": [ + { + "type": "object" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "minHeight": { + "$ref": "#/definitions/minHeight" + }, + "legend": { + "$ref": "#/definitions/ContentType.Analytical.Legend" + }, + "plotArea": { + "description": "[Deprecated] Describes the plotArea properties", + "type": "object", + "additionalProperties": false, + "properties": { + "dataLabel": { + "$ref": "#/definitions/ContentType.Analytical.DataLabel" + }, + "categoryAxisText": { + "$ref": "#/definitions/ContentType.Analytical.AxisText" + }, + "valueAxisText": { + "$ref": "#/definitions/ContentType.Analytical.AxisText" + } + } + }, + "title": { + "description": "[Deprecated] Represents title attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "visible": { + "description": "Represents the visibility state of the title", + "oneOf": [ + { + "type": "boolean", + "default": true + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "text": { + "description": "Represents a title text", + "type": "string" + }, + "alignment": { + "description": "Represents the title alignment", + "oneOf": [ + { + "enum": ["Left", "Center", "Right"], + "default": "Center" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "measureAxis": { + "description": "[Deprecated] Represents the value set for measure axis", + "type": "string" + }, + "dimensionAxis": { + "description": "[Deprecated] Represents the value set for dimension axis", + "type": "string" + }, + "dimensions": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Analytical.Dimension" + } + }, + "measures": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Analytical.Measure" + } + }, + "feeds": { + "description": "Feeds for the chart", + "type": "array", + "items": { + "$ref": "#/definitions/ContentType.Analytical.Field" + } + }, + "actions": { + "description": "Defines actions that can be applied on the content", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "actionableArea": { + "oneOf": [ + { + "enum": ["Full", "Chart"], + "default": "Full" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "popover": { + "type": "object", + "additionalProperties": false, + "description": "Configuration for a popover, which will open while pressing chart points", + "properties": { + "active": { + "description": "Whether the popover is connected to the chart. If it's not it won't open", + "oneOf": [ + { + "type": "boolean", + "default": false + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + } + } + }, + "ContentType.List": { + "description": "Represents list content attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + }, + "item": { + "$ref": "#/definitions/ContentType.List.Item" + }, + "maxItems": { + "description": "Represents number of items", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "minItems": { + "description": "Represents the minimum expected number of items", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "group": { + "$ref": "#/definitions/group" + } + } + }, + "actionsStripItem": { + "description": "[Experimental] Attributes of actions strip item", + "type": "object", + "additionalProperties": false, + "properties": { + "actions": { + "description": "Action(s) which will be executed when button is pressed", + "type": "array", + "items": { + "$ref": "#/definitions/action" + } + }, + "type": { + "description": "The type of the item", + "oneOf": [ + { + "enum": ["Button", "ToolbarSpacer", "Link"], + "default": "Button" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "overflowPriority": { + "description": "Defines items priority", + "oneOf": [ + { + "enum": [ + "AlwaysOverflow", + "Disappear", + "High", + "Low", + "NeverOverflow" + ], + "default": "High" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "icon": { + "description": "The icon of the item", + "type": "string" + }, + "text": { + "description": "The text of the item", + "type": "string" + }, + "tooltip": { + "description": "The tooltip of the item", + "type": "string" + }, + "buttonType": { + "description": "The type of the button", + "oneOf": [ + { + "enum": [ + "Accept", + "Attention", + "Back", + "Critical", + "Default", + "Emphasized", + "Ghost", + "Negative", + "Neutral", + "Reject", + "Success", + "Transparent", + "Unstyled", + "Up" + ], + "default": "Default" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "ariaHasPopup": { + "description": "Use this property only when the item is related to a popover/popup", + "oneOf": [ + { + "enum": ["Dialog", "Grid", "ListBox", "Menu", "None", "Tree"], + "default": "None" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "visible": { + "description": "Determines whether the item is visible", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "HeaderType": { + "oneOf": [ + { + "$ref": "#/definitions/HeaderType.Default" + }, + { + "$ref": "#/definitions/HeaderType.Numeric" + } + ] + }, + "simpleBinding": { + "type": "string", + "pattern": "\\{.*\\}" + }, + "data": { + "description": "Represents request and response attributes", + "type": "object", + "additionalProperties": false, + "properties": { + "request": { + "$ref": "#/definitions/request" + }, + "path": { + "description": "The path from the JSON to be used as root", + "type": "string", + "default": "/", + "pattern": "^[a-zA-Z0-9_\\.\\-/|@#]*$" + }, + "json": { + "description": "The data to be used directly. Without making requests", + "type": ["object", "array"], + "additionalProperties": true + }, + "service": { + "$ref": "#/definitions/service" + }, + "updateInterval": { + "description": "Represents interval in seconds, after which a new data request will be triggered", + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "extension": { + "description": "[Experimental] Provides a way to request data via extension", + "$ref": "#/definitions/extension" + }, + "name": { + "description": "[Experimental] Gives a name to the data section. A model with the same name will be assigned to the card", + "type": "string" + } + } + }, + "Configuration.NoData": { + "description": "Represents a configuration for a NoData", + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "description": "Title shown in the illustrated message of the card", + "type": "string" + }, + "description": { + "description": "Description shown in the illustrated message of the card", + "type": "string" + }, + "size": { + "description": "Defines the size predefined from sap.m.IllustratedMessage", + "type": "string" + }, + "type": { + "description": "Defines the image predefined from sap.m.IllustratedMessage", + "type": "string" + } + } + }, + "Configuration.CSRFToken": { + "description": "Represents a configuration for a CSRF token", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/data" + } + } + }, + "Configuration.Destinations": { + "description": "Represents a configuration for a cloud platform destination", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "The name of the destination. Use the same name which is used in Cloud Platform", + "type": "string" + }, + "label": { + "description": "Label for the destination for user-friendly visualization in the design-time editor", + "type": "string" + }, + "description": { + "description": "Description of the destination for user-friendly visualization in the design-time editor", + "type": "string" + }, + "defaultUrl": { + "description": "A default url which will be used if there is no Host associated with the card", + "type": "string" + } + } + }, + "Configuration.FilterType.Search": { + "description": "Search filter", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "The type of the filter", + "oneOf": [ + { + "const": "Search" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "data": { + "$ref": "#/definitions/data" + }, + "label": { + "description": "Label for the filter. Used by screen readers", + "type": "string" + }, + "value": { + "description": "The value of the filter", + "type": "string" + }, + "placeholder": { + "description": "The placeholder of the filter", + "type": "string" + }, + "visible": { + "description": "Determines whether the filter is visible", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "Configuration.FilterType.DateRange": { + "description": "Date range filter", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "The type of the filter", + "oneOf": [ + { + "const": "DateRange" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "data": { + "$ref": "#/definitions/data" + }, + "label": { + "description": "Label for the filter. Used by screen readers", + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "option": { + "description": "The date range option", + "type": "string" + }, + "values": { + "type": "array" + } + } + }, + "options": { + "description": "Options that will appear in the dropdown", + "type": "array", + "items": { + "type": "string", + "enum": [ + "date", + "today", + "yesterday", + "tomorrow", + "dateRange", + "from", + "to", + "yearToDate", + "lastDays", + "lastWeeks", + "lastMonths", + "lastQuarters", + "lastYears", + "nextDays", + "nextWeeks", + "nextMonths", + "nextQuarters", + "nextYears", + "todayFromTo", + "thisWeek", + "lastWeek", + "nextWeek", + "specificMonth", + "thisMonth", + "lastMonth", + "nextMonth", + "thisQuarter", + "lastQuarter", + "nextQuarter", + "quarter1", + "quarter2", + "quarter3", + "quarter4", + "thisYear", + "lastYear", + "nextYear" + ] + } + }, + "visible": { + "description": "Determines whether the filter is visible", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "Configuration.FilterType.Select": { + "description": "Select filter", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "The type of the filter", + "oneOf": [ + { + "const": "Select" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + }, + "value": { + "description": "The value of the filter" + }, + "data": { + "$ref": "#/definitions/data" + }, + "label": { + "description": "Label for the filter. Used by screen readers", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/Configuration.Filter.Item" + } + }, + "item": { + "type": "object", + "required": ["template"], + "properties": { + "template": { + "$ref": "#/definitions/Configuration.Filter.Item" + }, + "path": { + "description": "Defines the path to the structure holding the data about the items", + "type": "string", + "default": "/", + "pattern": "^[a-zA-Z0-9_\\.\\-/|@#]*$" + } + } + }, + "visible": { + "description": "Determines whether the filter is visible", + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/simpleBinding" + } + ] + } + } + }, + "Configuration.Parameter": { + "description": "Represents configuration parameter", + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "description": "The value of the parameter" + }, + "type": { + "description": "The type of the value for the parameter", + "$ref": "#/definitions/Configuration.BasicDataType" + }, + "label": { + "description": "Label for the parameter for user-friendly visualization in the design-time editor", + "type": "string" + }, + "description": { + "description": "Description of the parameter for user-friendly visualization in the design-time editor", + "type": "string" + } + } + }, + "definingRequest": { + "type": "object", + "additionalProperties": false, + "required": ["dataSource", "path"], + "properties": { + "dataSource": { + "description": "Represents reference to dataSource under sap.app", + "type": "string" + }, + "path": { + "description": "Represents path to the title collection", + "type": "string" + }, + "retrieveStreams": { + "description": "Represents indicator whether streams should be retrieved", + "type": "boolean", + "default": false + } + } + }, + "levelsDef": { + "description": "Plot area is a parent property which defines multiple other properties for smoothness and marker size", + "type": "array" + }, + "resizableLayoutVariantCardProperties": { + "required": ["col", "row", "colSpan", "rowSpan"], + "description": "Represents the card properties is a layout variant", + "type": "object", + "additionalProperties": false, + "properties": { + "col": { + "description": "Represents the grid column", + "type": "integer" + }, + "row": { + "description": "Represents the grid row", + "type": "integer" + }, + "colSpan": { + "description": "Represents the column span", + "type": "integer" + }, + "rowSpan": { + "description": "Represents the row span", + "type": "integer" + }, + "visible": { + "description": "Represents the visibility of the card", + "type": "boolean", + "default": true + } + } + }, + "customActionsSetting": { + "description": "Represents the properties for the custom actions in the Quick View Cards", + "type": "object", + "additionalProperties": true, + "properties": { + "text": { + "description": "Text displayed for extended actions in Quick View", + "type": "string", + "pattern": "^\\{\\{[^\\W\\.\\-][\\w\\.\\-]*\\}\\}$" + }, + "press": { + "description": "Name of the press handler for extended actions in Quick View", + "type": "string", + "pattern": "^[^\\W\\.\\-][\\w\\.\\-]*$" + }, + "position": { + "description": "Position of extended actions in Quick View", + "type": "integer" + } + } + }, + "timeAxisDef": { + "description": "Represents the configuration to customize the time axis", + "type": "object", + "properties": { + "levels": { + "$ref": "#/definitions/levelsDef" + } + } + }, + "plotAreaDef": { + "description": "Plot area is a parent property which defines multiple other properties for smoothness and marker size", + "type": "object", + "additionalProperties": false, + "properties": { + "isSmoothed": { + "description": "Represents whether smoother curves are required or not", + "type": "boolean", + "default": false + }, + "markerSize": { + "description": "Represents the size of the markers in scatter plots", + "type": "integer" + }, + "dataLabel": { + "type": "object", + "description": "dataLabel is a parent property that defines other properties for type", + "additionalProperties": false, + "properties": { + "type": { + "description": "Defines whether to display percentage values or actual counts in the donut chart", + "type": "string", + "enum": ["value", "percentage"], + "default": "value" + } + } + } + } + }, + "objectStreamCardsSettingsDef": { + "description": "Represents the Object Stream properties - properties that are passed to the Object Stream cards", + "type": "object", + "additionalProperties": true, + "properties": { + "showFirstActionInFooter": { + "description": "Represents the flag to show first action in footer of the Quickview cards", + "type": "boolean", + "default": false + }, + "customActions": { + "description": "Represents the custom actions in the Quick View Cards", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/customActionsSetting" + } + } + } + }, + "defaultSpanDef": { + "description": "Represents the card default grid size in columns and rows", + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": ["cols", "rows"], + "properties": { + "cols": { + "description": "Represents the number of the number of grid columns", + "type": "integer" + }, + "rows": { + "description": "Represents the number of the number of grid rows", + "type": "integer" + }, + "showOnlyHeader": { + "description": "Represents if user wants to show only header part of card in resizable layout", + "type": "boolean", + "default": false + }, + "minimumTitleRow": { + "description": "If user wants to show more text in title then he/she can configure no of lines to be shown in title(Maximum allowed 3 lines)", + "type": "integer", + "default": 1, + "pattern": "^[1-3]$" + }, + "minimumSubTitleRow": { + "description": "If user wants to show more text in title then he/she can configure no of lines to be shown in sub-title(Maximum allowed 2 lines)", + "type": "integer", + "default": 1, + "pattern": "^[12]$" + } + } + }, + { + "type": "string", + "enum": ["auto"] + } + ] + }, + "tab_setting": { + "description": "Represents the tab specific properties - properties that are passed to a particular tab in a card", + "type": "object", + "additionalProperties": true, + "properties": { + "annotationPath": { + "description": "Represents the annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "selectionAnnotationPath": { + "description": "Represents the selection annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "chartAnnotationPath": { + "description": "Represents the chart annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "presentationAnnotationPath": { + "description": "Represents the presentation annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "dataPointAnnotationPath": { + "description": "Represents the data point annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "identificationAnnotationPath": { + "description": "Represents the identification annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "dynamicSubtitleAnnotationPath": { + "description": "Represents the dynamic subtitle annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "value": { + "description": "Represents the drop down value to be shown", + "type": "string" + }, + "chartProperties": { + "description": "This property is responsible for setting specific chart settings", + "type": "object", + "additionalProperties": false, + "properties": { + "plotArea": { + "$ref": "#/definitions/plotAreaDef" + }, + "timeAxis": { + "$ref": "#/definitions/timeAxisDef" + } + } + }, + "colorPalette": { + "description": "Represents the configuration to customize the column stacked chart", + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, + { + "type": "object" + } + ] + } + } + }, + "card_setting": { + "description": "Represents the card specific properties - properties that are passed to the card", + "type": "object", + "required": ["title"], + "additionalProperties": true, + "properties": { + "category": { + "description": "Represents the category of the card- used in the card header", + "type": "string", + "pattern": "^\\{\\{[^\\W\\.\\-][\\w\\.\\-]*\\}\\}$" + }, + "itemText": { + "description": "Represents the user defined string in placeholder card", + "type": "string", + "pattern": "^\\{\\{[^\\W\\.\\-][\\w\\.\\-]*\\}\\}$" + }, + "title": { + "description": "Represents language-dependent title of the card - used in the card header", + "type": "string", + "pattern": "^\\{\\{[^\\W\\.\\-][\\w\\.\\-]*\\}\\}$" + }, + "subTitle": { + "description": "Represents language-dependent subtitle of the card - used in the card header", + "type": "string", + "pattern": "^\\{\\{[^\\W\\.\\-][\\w\\.\\-]*\\}\\}$" + }, + "valueSelectionInfo": { + "description": "Represents things like people, number of items", + "type": "string", + "pattern": "^\\{\\{[^\\W\\.\\-][\\w\\.\\-]*\\}\\}$" + }, + "entitySet": { + "description": "Represents the entity set that will be displayed in this card", + "type": "string", + "pattern": "^[a-zA-Z0-9_]+$" + }, + "staticContent": { + "description": "Represents the static content that will be displayed in this card", + "type": "array", + "items": { + "type": "object" + } + }, + "listFlavor": { + "description": "Represents the flavor of the list to use in this card. The flavor can be bar chart, carousel or standard", + "type": "string", + "enum": ["standard", "bar", "carousel"] + }, + "listType": { + "description": "Represents the type of list to use for this card. The list can be extended to display more information or condensed to take up less space on the card", + "type": "string", + "enum": ["extended", "condensed"] + }, + "sortBy": { + "description": "Represents the sort key for the entity set", + "type": "string" + }, + "sortOrder": { + "description": "Represents the sort order for the entity set", + "type": "string", + "enum": ["ascending", "descending"] + }, + "annotationPath": { + "description": "Represents the annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "selectionAnnotationPath": { + "description": "Represents the selection annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "chartAnnotationPath": { + "description": "Represents the chart annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "presentationAnnotationPath": { + "description": "Represents the presentation annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "dataPointAnnotationPath": { + "description": "Represents the data point annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "identificationAnnotationPath": { + "description": "Represents the identification annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#,]*$" + }, + "kpiAnnotationPath": { + "description": "Represents the KPI annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "selectionPresentationAnnotationPath": { + "description": "Represents the selection presentation annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "dynamicSubtitleAnnotationPath": { + "description": "Represents the dynamic subtitle annotation path", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@#]*$" + }, + "ignoreSapText": { + "description": "Represents the flag to indicate priority of number formatting over sap text", + "type": "boolean", + "default": false + }, + "enableAddToInsights": { + "description": "Represents the flag to enable/disable individual card's functionality to add them to insight", + "type": "boolean", + "default": true + }, + "defaultSpan": { + "$ref": "#/definitions/defaultSpanDef" + }, + "requireAppAuthorization": { + "description": "Represents the cards for which authorization is required", + "type": "string" + }, + "objectStreamCardsSettings": { + "$ref": "#/definitions/objectStreamCardsSettingsDef" + }, + "enableLocaleCurrencyFormatting": { + "description": "Represents the flag to indicate the use of object number/smart field", + "type": "boolean", + "default": false + }, + "navigation": { + "description": "Represents the configuration to alter the navigation mode in OVP Analytical Cards", + "type": "string", + "enum": ["dataPointNav", "chartNav", "headerNav", "noHeaderNav"] + }, + "showFilterInHeader": { + "description": "Represents a switch to Show or Hide Filters in Cards Headers in OVP application", + "type": "boolean", + "default": false + }, + "showSortingInHeader": { + "description": "Represents a switch to Show or Hide Sorting in Cards Headers in OVP application", + "type": "boolean", + "default": false + }, + "imageSupported": { + "description": "Flag for enabling images in a condensed list card", + "type": "boolean", + "default": false + }, + "showLineItemDetail": { + "description": "Flag for show line item detail in list and table card", + "type": "boolean", + "default": false + }, + "showLabelText": { + "description": "This property is responsible for showing and hiding text labels on the geo spots", + "type": "boolean", + "default": false + }, + "customParams": { + "description": "This property is responsible for passing custom parameters present in the entity set to the navigating application", + "type": "string", + "pattern": "^[^\\W\\.\\-][\\w\\.\\-]*$" + }, + "chartProperties": { + "description": "This property is responsible for setting specific chart settings", + "type": "object", + "additionalProperties": false, + "properties": { + "plotArea": { + "$ref": "#/definitions/plotAreaDef" + }, + "timeAxis": { + "$ref": "#/definitions/timeAxisDef" + } + } + }, + "colorPalette": { + "description": "Represents the configuration to customize the column stacked chart", + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, + { + "type": "object" + } + ] + } + } + }, + "resizableLayoutVariant": { + "description": "Represents the resizable layout variant", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]+$": { + "$ref": "#/definitions/resizableLayoutVariantCardProperties" + } + } + }, + "card": { + "description": "Represents the card attributes", + "type": "object", + "required": ["template"], + "additionalProperties": false, + "properties": { + "sequencePos": { + "description": "Represents the position of the card in the sequence", + "type": "integer" + }, + "model": { + "description": "Represents the model for the card", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\.\\-\\|@]*$" + }, + "template": { + "description": "Represents the card component path to use for this card", + "type": "string", + "pattern": "^[a-zA-Z0-9\\.]+$" + }, + "settings": { + "$ref": "#/definitions/card_setting" + }, + "tabs": { + "description": "Represents the card with view switch control", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/tab_setting" + } + } + } + }, + "filterFieldName": { + "type": "object", + "description": "Represents the configuration object for each date filter field", + "properties": { + "defaultValue": { + "type": "object", + "description": "Represents the configuration for setting default value for the date filter field", + "properties": { + "operation": { + "type": "string", + "description": "Represents the default semantic date value to be set on the filter field" + } + } + }, + "selectedValues": { + "type": "string", + "description": "Represents the semantic date values selected for the date filter field" + }, + "customDateRangeImplementation": { + "type": "string", + "description": "Represents the custom implementation for semantic date filter field" + }, + "exclude": { + "type": "boolean", + "description": "Flag to exclude values from the date picker", + "default": false + } + } + }, + "refreshStrategies_prop_def": { + "type": "object", + "additionalProperties": false, + "properties": { + "entitySets": { + "description": "Represents the map of entity sets configured for refresh strategies", + "type": "object" + } + } + }, + "defaultLayoutType_def": { + "type": "string" + }, + "implementingComponent_def": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": ["componentName"], + "properties": { + "componentName": { + "description": "Represents the name of the component to be loaded inside the canvas", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9_]{0,39})(\\.[a-zA-Z][a-zA-Z0-9_]{0,39})*$" + }, + "binding": { + "$ref": "#/definitions/component_binding_def" + }, + "settings": { + "$ref": "#/definitions/component_setting_def" + }, + "pages": { + "$ref": "#/definitions/component_pages_def" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": ["componentUsage"], + "properties": { + "componentUsage": { + "description": "Represents the reference to the name of the componentUsages defined in sap.ui5/componentUsages for the component to be loaded inside the canvas", + "type": "string" + }, + "binding": { + "$ref": "#/definitions/component_binding_def" + }, + "settings": { + "$ref": "#/definitions/component_setting_def" + }, + "pages": { + "$ref": "#/definitions/component_pages_def" + } + } + } + ] + }, + "routingSpec_def": { + "type": "object", + "additionalProperties": false, + "required": ["routeName"], + "properties": { + "routeName": { + "description": "Represents the name of the route", + "type": "string" + }, + "noOData": { + "description": "Represents the switch to indicate, that this route is not related to the OData service", + "type": "boolean" + }, + "binding": { + "description": "Represents the binding string to indicate, how the page should be bound relative to the predecessor page or absolute", + "type": "string" + }, + "headerTitle": { + "description": "Represents the the title to be shown on the page", + "type": "string" + }, + "typeImageUrl": { + "description": "Represents the URL pointing to an icon, that will be shown in the navigation menu additional to the title to represent the page", + "type": "string" + }, + "noKey": { + "description": "Represents the switch to indicate, whether this route is reached via a 1:1 navigation or a 1:n navigation", + "type": "boolean" + }, + "semanticKey": { + "description": "Name of a semantic key field which can be used to identify an instance of this page. Only relevant if nKey is false.", + "type": "string" + } + } + }, + "navigation_def": { + "description": "Represents ...", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "properties": { + "display": { + "description": "Represents an action triggered by the user on UI: the navigation to display an object", + "$ref": "#/definitions/action_prop_def" + }, + "create": { + "description": "Represents an action triggered by the user on UI: the navigation to create an object", + "$ref": "#/definitions/action_prop_def" + }, + "edit": { + "description": "Represents an action triggered by the user on UI: the navigation to edit an object", + "$ref": "#/definitions/action_prop_def" + } + } + }, + "component_def": { + "type": "object", + "additionalProperties": false, + "required": ["name"], + "properties": { + "name": { + "description": "The name of the component", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9]{0,39})(\\.[a-zA-Z][a-zA-Z0-9]{0,39})*$" + }, + "list": { + "description": "Switch to create a route for a list (aggregation) if true and routing for an entity if not set or false", + "type": "boolean" + }, + "settings": { + "$ref": "#/definitions/component_setting_def" + } + } + }, + "component_pages_def": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]+[\\|]?[a-zA-Z0-9_\\.\\-]+$": { + "$ref": "#/definitions/pages_map" + } + } + }, + "component_binding_def": { + "description": " Represents a binding string to indicate, how the reuse component should be bound relative to the containing page or absolute ", + "type": "string" + }, + "component_setting_def": { + "description": "Represents the settings specific to one component", + "type": "object" + }, + "embeddedComponent": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_.:-]+$": { + "allOf": [ + { + "type": "object", + "required": ["id", "title"], + "properties": { + "id": { + "description": "Represents an unique id for the instance of the reuse component inside of the object page", + "type": "string", + "pattern": "^([A-Za-z_][-A-Za-z0-9_.:]*)$" + }, + "title": { + "description": "Represents the title for the content of the reuse component", + "type": "string", + "pattern": "^\\{\\{[^\\W][\\w\\.\\-]*\\}\\}$" + }, + "binding": { + "description": "Represents an optional element binding for the ComponentContainer that hosts the reuse component", + "type": "string" + }, + "settings": { + "description": "Represents a map to populate the API of the reuse component", + "type": "object" + }, + "hiddenByDefault": { + "description": "Flag, whether the embedded component should be hidden by default", + "type: ": "boolean" + }, + "groupTitle": { + "description": "Represents group title of reuse components", + "type": "string" + }, + "leadingSectionIdOrPath": { + "description": "Represents a section that behaves a leading section for the group", + "type": "string" + } + } + }, + { + "oneOf": [ + { + "type": "object", + "required": ["componentName"], + "properties": { + "componentName": { + "description": "Represents the name of the reuse component ", + "type": "string", + "pattern": "^([a-zA-Z][a-zA-Z0-9_]{0,39})(\\.[a-zA-Z][a-zA-Z0-9_]{0,39})*$" + } + } + }, + { + "type": "object", + "required": ["componentUsage"], + "properties": { + "componentUsage": { + "description": "Represents the reference to the name of the componentUsages defined in sap.ui5/componentUsages", + "type": "string" + } + } + }, + { + "type": "object", + "required": ["embeddedComponents"], + "properties": { + "embeddedComponents": { + "$ref": "#/definitions/embeddedComponent" + } + } + } + ] + } + ] + } + } + }, + "action_prop_def": { + "type": "object", + "additionalProperties": false, + "required": ["path", "target"], + "properties": { + "path": { + "description": "Represents the path in the manifest to the target to which the navigation is bound", + "type": "string" + }, + "target": { + "description": "Represents the pointer to a semantic object", + "type": "string" + }, + "refreshStrategyOnAppRestore": { + "description": "Represents the refresh strategies configured for external display navigation while coming back to the source app", + "$ref": "#/definitions/refreshStrategies_prop_def" + } + } + }, + "pages_map": { + "type": "object", + "additionalProperties": false, + "required": ["component"], + "properties": { + "navigationProperty": { + "description": "Represents the navigation property that leads to this page. The navigation links of the previous page (the page that calls this one) are determined through this property ", + "type": "string" + }, + "entitySet": { + "description": "Represents the entity set that defines either the aggregation or the root object of the component", + "type": "string" + }, + "component": { + "description": "Represents the component and its settings that makes the page", + "$ref": "#/definitions/component_def" + }, + "navigation": { + "description": "Represents the different navigation targets", + "$ref": "#/definitions/navigation_def" + }, + "embeddedComponents": { + "description": "Represent reuse components that should be appended at the end of the template component", + "$ref": "#/definitions/embeddedComponent" + }, + "routingSpec": { + "description": "Represents the routing specification", + "$ref": "#/definitions/routingSpec_def" + }, + "implementingComponent": { + "description": "Represents the component to be loaded inside the canvas if sap.suite.ui.generic.template.Canvas is used as component name, and its settings", + "$ref": "#/definitions/implementingComponent_def" + }, + "defaultLayoutType": { + "description": "Default layout used to open the corresponding page in FlexibleColumnLayout", + "$ref": "#/definitions/defaultLayoutType_def" + }, + "defaultLayoutTypeIfExternalNavigation": { + "description": "Default layout used to open the corresponding page in FlexibleColumnLayout when reached via external navigation", + "$ref": "#/definitions/defaultLayoutType_def" + }, + "pages": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\.\\-]+[\\|]?[a-zA-Z0-9_\\.\\-]+$": { + "$ref": "#/definitions/pages_map" + } + } + } + } + }, + "pages_array": { + "type": "object", + "additionalProperties": false, + "required": ["component"], + "properties": { + "navigationProperty": { + "description": "Represents the navigation property that leads to this page. The navigation links of the previous page (the page that calls this one) are determined through this property ", + "type": "string" + }, + "entitySet": { + "description": "Represents the entity set that defines either the aggregation or the root object of the component", + "type": "string" + }, + "component": { + "description": "Represents the component and its settings that makes the page", + "$ref": "#/definitions/component_def" + }, + "navigation": { + "description": "Represents the different navigation targets", + "$ref": "#/definitions/navigation_def" + }, + "embeddedComponents": { + "description": "Represent reuse components that should be appended at the end of the template component", + "$ref": "#/definitions/embeddedComponent" + }, + "routingSpec": { + "description": "Represents the routing specification", + "$ref": "#/definitions/routingSpec_def" + }, + "implementingComponent": { + "description": "Represents the component to be loaded inside the canvas if sap.suite.ui.generic.template.Canvas is used as component name, and its settings", + "$ref": "#/definitions/implementingComponent_def" + }, + "defaultLayoutType": { + "description": "Default layout used to open the corresponding page in FlexibleColumnLayout", + "$ref": "#/definitions/defaultLayoutType_def" + }, + "defaultLayoutTypeIfExternalNavigation": { + "description": "Default layout used to open the corresponding page in FlexibleColumnLayout when reached via external navigation", + "$ref": "#/definitions/defaultLayoutType_def" + }, + "pages": { + "type": "array", + "items": { + "$ref": "#/definitions/pages_array" + } + } + } + }, + "setting_def": { + "description": "Represents global settings for the application controller", + "type": "object" + }, + "routeTargetObject": { + "description": "Represents the definition of a target of a route as object.", + "type": "object", + "properties": { + "name": { + "description": "Represents the name of the routing target", + "type": "string" + }, + "prefix": { + "description": "The prefix of the routing target", + "type": "string" + }, + "propagateTitle": { + "description": "Indicates whether this 'Component' target should propagate it's title to this component or not", + "type": "boolean", + "default": "#/definitions/routing/config/propagateTitle" + } + } + }, + "routeWithoutName": { + "description": "Represents the definition of route without the option 'name'. This is used when routes are defined in an object.", + "type": "object", + "properties": { + "pattern": { + "description": "Represents the url pattern that the route is matched against", + "type": "string" + }, + "greedy": { + "description": "Whether the route should be matched when another route is already matched", + "type": "boolean" + }, + "target": { + "description": "Represents one or multiple names of targets which are displayed when the route is matched", + "$ref": "#/definitions/routeTarget" + }, + "titleTarget": { + "description": "Represents the name of the target where the 'title' information should be taken", + "type": "string" + } + } + }, + "route": { + "description": "Represents the definition of each route", + "allOf": [ + { + "$ref": "#/definitions/routeWithoutName" + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "description": "Represents the name of the route", + "type": "string" + } + } + } + ] + }, + "target": { + "description": "Represents the definition of each target", + "type": "object", + "properties": { + "title": { + "description": "Represents the information which is included as a parameter of the 'titleChanged' event fired on Router when this target is displayed. The title can be set with static text and can also be set with a valid property binding syntax which will be resolved under the scope of the view in the target where the title property is defined.", + "type": "string" + }, + "viewType": { + "description": "Represents the type of view that is going to be created", + "type": "string", + "enum": ["XML", "JSON", "JS", "HTML", "Template"] + }, + "targetParent": { + "description": "Represents the id of the view that contains the control specified by the 'controlId'", + "type": "string" + }, + "controlId": { + "description": "Represents the id of the control where you want to place the view created by the target", + "type": "string" + }, + "controlAggregation": { + "description": "Represents the name of an aggregation of the controlId that contains the views", + "type": "string" + }, + "clearControlAggregation": { + "description": "Whether the aggregation of the control should be cleared before adding the view", + "type": "boolean" + }, + "parent": { + "description": "Represents the name of another target which will also be displayed once this target is displayed", + "type": "string" + }, + "viewLevel": { + "description": "Represents the level of the current view which is used to define the transition direction when navigate to this view", + "type": "number", + "multipleOf": 1 + }, + "transition": { + "description": "Represents the type of transition when navigating from previous view to this view", + "anyOf": [ + { + "type": "string", + "default": "slide" + }, + { + "type": "string", + "enum": ["slide", "flip", "fade", "show"] + } + ] + }, + "transitionParameters": { + "description": "Represents the transition parameters that are passed to the event handlers", + "type": "object" + } + } + }, + "routeTarget": { + "description": "Represents the definition of a target of a route.", + "oneOf": [ + { + "type": "array", + "items": [ + { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/routeTargetObject" + } + ] + } + ] + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/routeTargetObject" + } + ] + }, + "ui5setting": { + "type": "object", + "additionalProperties": true, + "properties": { + "defaultBindingMode": { + "description": "Represents default binding mode and must be a string value from sap.ui.model.BindingMode. Possible values: Default, OneTime, OneWay, TwoWay", + "type": "string", + "default": "Default", + "enum": ["Default", "OneTime", "OneWay", "TwoWay"] + }, + "bundleName": { + "description": "Represents the alternative for bundleUrl", + "type": "string" + }, + "bundleUrl": { + "description": "Represents the URL for the resource bundle", + "type": "string" + }, + "bundleUrlRelativeTo": { + "description": "Indicates whether url is relative to component (default) or manifest", + "type": "string", + "default": "component", + "enum": ["manifest", "component"] + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": true, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + }, + "enhanceWith": { + "description": "Represents enhancement of UI5 resource model with additional properties files", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/enhanceWithSetting" + } + } + } + }, + "rootView_def": { + "description": "Represents the root view definition being either the name of the view or the view definition object", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": ["viewName"], + "additionalProperties": true, + "properties": { + "viewName": { + "description": "Represents the name of the view", + "type": "string" + }, + "type": { + "description": "Represents the type of the view. Possible Values: XML, JSON, JS, HTML, Template", + "type": "string", + "enum": ["XML", "JSON", "JS", "HTML", "Template"] + }, + "id": { + "description": "Represents the id of the view", + "type": "string" + }, + "async": { + "description": "Configure the targets for asynchronous loading", + "type": "boolean", + "default": false + } + } + } + ] + }, + "routing": { + "description": "Represents the configuration of routing", + "type": "object", + "properties": { + "config": { + "description": "Represents the default properties defined for route and target", + "allOf": [ + { + "type": "object", + "properties": { + "routerClass": { + "description": "Represents the router class", + "type": "string" + }, + "async": { + "description": "Indicates whether the Views in routing are loaded asyncly", + "type": "boolean", + "default": false + }, + "propagateTitle": { + "description": "Indicates whether the targets which have type 'Component' should propagate their title to this component or not", + "type": "boolean", + "default": false + }, + "bypassed": { + "description": "Represents information about targets to display when no route is matched", + "type": "object", + "additionalProperties": false, + "required": ["target"], + "properties": { + "target": { + "description": "Represents one or multiple names of targets that are displayed when no route is matched", + "$ref": "#/definitions/routeTarget" + } + } + }, + "viewPath": { + "description": "Represents a prefix that is prepended in front of the viewName", + "type": "string" + } + } + }, + { + "$ref": "#/definitions/target" + } + ] + }, + "routes": { + "oneOf": [ + { + "description": "Represents the definition of routes by providing an array with elements which contain the configuration for each route", + "type": "array", + "items": { + "$ref": "#/definitions/route" + } + }, + { + "description": "Represents the definition of routes by providing an object with the route's name as the key and other route options in an object as the value", + "type": "object", + "patternProperties": { + "[\\s\\S]*": { + "$ref": "#/definitions/routeWithoutName" + } + } + } + ] + }, + "targets": { + "description": "Represents the definition of targets", + "type": "object", + "patternProperties": { + "[\\s\\S]*": { + "oneOf": [ + { + "allOf": [ + { + "$ref": "#/definitions/target" + }, + { + "type": "object", + "required": ["viewName"], + "properties": { + "viewName": { + "description": "Represents the name of a view that will be created", + "type": "string" + }, + "viewId": { + "description": "Represents the id of the created view", + "type": "string" + }, + "viewPath": { + "description": "Represents a prefix that is prepended in front of the viewName", + "type": "string" + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#/definitions/target" + }, + { + "oneOf": [ + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "description": "Represents the name of a view or component that will be created", + "type": "string" + }, + "id": { + "description": "Represents the id of the created view or component", + "type": "string" + }, + "path": { + "description": "Represents a prefix that is prepended in front of the view or component name", + "type": "string" + }, + "type": { + "description": "Represents the type of the type View or Component", + "type": "string", + "enum": ["View", "Component"] + } + } + }, + { + "type": "object", + "required": ["usage", "type"], + "properties": { + "usage": { + "description": "Represents the componentUsage of the component that will be created", + "type": "string" + }, + "id": { + "description": "Represents the id of the created view or component", + "type": "string" + }, + "type": { + "description": "Represents the type of the type Component", + "type": "string", + "enum": ["Component"] + } + } + } + ] + } + ] + } + ] + } + } + } + } + }, + "rootView_def_flexEnabled": { + "description": "Represents the root view definition when flex is enabled (requires a view id)", + "type": "object", + "required": ["id", "viewName"], + "additionalProperties": true, + "properties": { + "viewName": { + "description": "Represents the name of the view", + "type": "string" + }, + "type": { + "description": "Represents the type of the view. Possible Values: XML, JSON, JS, HTML, Template", + "type": "string", + "enum": ["XML", "JSON", "JS", "HTML", "Template"] + }, + "id": { + "description": "Represents the id of the view", + "type": "string" + }, + "async": { + "description": "Configure the targets for asynchronous loading", + "type": "boolean", + "default": false + } + } + }, + "routing_flexEnabled": { + "description": "Represents the configuration of routing", + "type": "object", + "properties": { + "config": { + "description": "Represents the default properties defined for route and target", + "allOf": [ + { + "type": "object", + "properties": { + "routerClass": { + "description": "Represents the router class", + "type": "string" + }, + "async": { + "description": "Indicates whether the Views in routing are loaded asyncly", + "type": "boolean", + "default": false + }, + "bypassed": { + "description": "Represents information about targets to display when no route is matched", + "type": "object", + "additionalProperties": false, + "required": ["target"], + "properties": { + "target": { + "description": "Represents one or multiple names of targets that are displayed when no route is matched", + "$ref": "#/definitions/routeTarget" + } + } + }, + "viewPath": { + "description": "Represents a prefix that is prepended in front of the viewName", + "type": "string" + } + } + }, + { + "$ref": "#/definitions/target" + } + ] + }, + "routes": { + "oneOf": [ + { + "description": "Represents the definition of routes by providing an array with elements which contain the configuration for each route", + "type": "array", + "items": { + "$ref": "#/definitions/route" + } + }, + { + "description": "Represents the definition of routes by providing an object with the route's name as the key and other route options in an object as the value", + "type": "object", + "patternProperties": { + "[\\s\\S]*": { + "$ref": "#/definitions/routeWithoutName" + } + } + } + ] + }, + "targets": { + "description": "Represents the definition of targets", + "type": "object", + "patternProperties": { + "[\\s\\S]*": { + "oneOf": [ + { + "allOf": [ + { + "$ref": "#/definitions/target" + }, + { + "type": "object", + "required": ["viewName", "viewId"], + "properties": { + "viewName": { + "description": "Represents the name of a view that will be created", + "type": "string" + }, + "viewId": { + "description": "Represents the id of the created view", + "type": "string" + }, + "viewPath": { + "description": "Represents a prefix that is prepended in front of the viewName", + "type": "string" + } + } + } + ] + }, + { + "allOf": [ + { + "$ref": "#/definitions/target" + }, + { + "oneOf": [ + { + "type": "object", + "required": ["name", "id"], + "properties": { + "name": { + "description": "Represents the name of a view or component that will be created", + "type": "string" + }, + "id": { + "description": "Represents the id of the created view or component", + "type": "string" + }, + "path": { + "description": "Represents a prefix that is prepended in front of the view or component name", + "type": "string" + }, + "type": { + "description": "Represents the type of the type View or Component", + "type": "string", + "enum": ["View", "Component"] + } + } + }, + { + "type": "object", + "required": ["usage", "id", "type"], + "properties": { + "usage": { + "description": "Represents the componentUsage of the component that will be created", + "type": "string" + }, + "id": { + "description": "Represents the id of the created view or component", + "type": "string" + }, + "type": { + "description": "Represents the type of the type Component", + "type": "string", + "enum": ["Component"] + } + } + } + ] + } + ] + } + ] + } + } + } + } + }, + "command": { + "description": "Represents a UI5 shortcut command.", + "additionalProperties": false, + "type": "object", + "properties": { + "shortcut": { + "description": "A string describing a shortcut key combination that, when used by the user, will trigger the command.", + "type": "string", + "patternTransformCode": "''.split('').map(function(char) { console.log(char); if (/[a-z]/i.test(char)) { return `[${char.toUpperCase()}${char.toLowerCase()}]`; } else { return char; } } ).join('')", + "patternFromRuntime": "^((Ctrl|Shift|Alt)(\\+)?){0,3}([A-Za-z0-9\\.,\\-\\*\\/=]|Plus|Tab|Space|Enter|Backspace|Home|Delete|End|Pageup|Pagedown|Escape|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|F[1-9]|F1[0-2])$", + "pattern": "^(([Cc][Tt][Rr][Ll]|[Ss][Hh][Ii][Ff][Tt]|[Aa][Ll][Tt])(\\+)?){0,3}([A-Za-z0-9\\.,\\-\\*\\/=]|[Pp][Ll][Uu][Ss]|[Tt][Aa][Bb]|[Ss][Pp][Aa][Cc][Ee]|[Ee][Nn][Tt][Ee][Rr]|[Bb][Aa][Cc][Kk][Ss][Pp][Aa][Cc][Ee]|[Hh][Oo][Mm][Ee]|[Dd][Ee][Ll][Ee][Tt][Ee]|[Ee][Nn][Dd]|[Pp][Aa][Gg][Ee][Uu][Pp]|[Pp][Aa][Gg][Ee][Dd][Oo][Ww][Nn]|[Ee][Ss][Cc][Aa][Pp][Ee]|[Aa][Rr][Rr][Oo][Ww][Uu][Pp]|[Aa][Rr][Rr][Oo][Ww][Dd][Oo][Ww][Nn]|[Aa][Rr][Rr][Oo][Ww][Ll][Ee][Ff][Tt]|[Aa][Rr][Rr][Oo][Ww][Rr][Ii][Gg][Hh][Tt]|F[1-9]|F1[0-2])$" + } + } + }, + "booleanOrString": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "enhanceWithSetting_0": { + "oneOf": [ + { + "additionalProperties": false, + "required": ["bundleUrl"], + "properties": { + "bundleUrl": { + "description": "Represents property url for model enhancement", + "type": "string" + }, + "bundleUrlRelativeTo": { + "description": "Indicates whether url is relative to component (default) or manifest", + "type": "string", + "default": "component", + "enum": ["manifest", "component"] + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + } + } + }, + { + "required": ["bundleName"], + "additionalProperties": false, + "properties": { + "bundleName": { + "description": "Represents the alternative for bundleUrl", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + } + } + } + ] + }, + "terminologySetting": { + "oneOf": [ + { + "additionalProperties": false, + "required": ["bundleName"], + "properties": { + "bundleName": { + "description": "Represents the alternative for bundleUrl", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + } + } + }, + { + "additionalProperties": false, + "required": ["bundleUrl"], + "properties": { + "bundleUrl": { + "description": "Represents the URL for the resource bundle", + "type": "string" + }, + "bundleUrlRelativeTo": { + "description": "Indicates whether url is relative to component (default) or manifest", + "type": "string", + "default": "component", + "enum": ["manifest", "component"] + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + } + } + } + ] + }, + "service": { + "description": "Represents the definition of each service", + "type": "object", + "required": ["factoryName"], + "additionalProperties": true, + "properties": { + "factoryName": { + "description": "Represents the name of the service factory ", + "type": "string", + "pattern": "^([a-z_$][a-z0-9_$]{0,39}\\.)*([a-zA-Z_$][a-zA-Z0-9_$]{0,39})$" + }, + "optional": { + "description": "Indicates whether the service optional or not ", + "type": "boolean", + "default": false + } + } + }, + "id_def_0": { + "type": "string" + }, + "config": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/config" + } + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "object" + } + ] + }, + "resourceRoot": { + "type": "string", + "pattern": "^((\\.(?!\\.)\\/)?\\w+\\/?)+$" + }, + "model": { + "description": "Represents sapui5 model name", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "Represents model class name", + "type": "string" + }, + "dataSource": { + "description": "Represents string of key/alias from sap.app dataSources to reference an existing data source", + "type": "string" + }, + "uri": { + "description": "Represents URI for the model", + "type": "string" + }, + "preload": { + "description": "Indicates that the model will be immediately created after the manifest is loaded by Component Factory and before the Component instance is created", + "type": "boolean", + "default": false + }, + "settings": { + "$ref": "#/definitions/ui5setting" + } + } + }, + "component": { + "description": "Represents sapui5 component name", + "type": "object", + "properties": { + "minVersion": { + "description": "Represents minimal version of ui5 component", + "$ref": "#/definitions/version" + }, + "lazy": { + "description": "Represents Indicator to lazy loading component", + "type": "boolean", + "default": false + } + } + }, + "lib": { + "description": "Represents sapui5 library name", + "type": "object", + "properties": { + "minVersion": { + "description": "Represents minimal version of ui5 library", + "$ref": "#/definitions/version" + }, + "lazy": { + "description": "Represents Indicator to lazy loading lib", + "type": "boolean", + "default": false + } + } + }, + "version": { + "type": "string" + }, + "componentUsages": { + "description": "Represents component name for usage", + "type": "object", + "required": ["name"], + "additionalProperties": false, + "properties": { + "name": { + "description": "Represents name of reuse component", + "type": "string", + "pattern": "^([a-zA-Z_$][a-zA-Z0-9_$]{0,39}\\.)*([a-zA-Z_$][a-zA-Z0-9_$]{0,39})$" + }, + "componentData": { + "description": "Represents component data for the Component", + "$ref": "#/definitions/config" + }, + "settings": { + "description": "Represents settings for the Component", + "$ref": "#/definitions/config" + }, + "lazy": { + "description": "Represents Indicator to lazy loading component usage, default true", + "type": "boolean", + "default": true + } + } + }, + "resource": { + "type": "object", + "properties": { + "js": { + "type": "array", + "items": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { + "type": "string" + } + } + } + }, + "css": { + "type": "array", + "items": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + }, + "deviceType": { + "type": "object", + "description": "Represents device types on which the app is running", + "additionalProperties": false, + "properties": { + "desktop": { + "description": "Represents indicator whether desktop device is supported, default true", + "type": "boolean" + }, + "tablet": { + "description": "Represents indicator whether tablet device is supported, default true", + "type": "boolean" + }, + "phone": { + "description": "Represents indicator whether phone device is supported, default true", + "type": "boolean" + } + } + }, + "signature_def": { + "description": "Represents signature for inbound targets ", + "type": "object", + "required": ["parameters", "additionalParameters"], + "additionalProperties": false, + "properties": { + "parameters": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[\\w\\.\\-\\/]+$": { + "type": "object", + "additionalProperties": false, + "properties": { + "defaultValue": { + "type": "object", + "description": " Represents a default Value", + "additionalProperties": false, + "required": ["value"], + "properties": { + "value": { + "description": "Represents a depending on format either a verbatim default value or a reference", + "type": "string" + }, + "format": { + "description": "Indicates how 'value' is to be interpreted: ('plain': the 'value' is taken as a literal string value| 'reference': the 'value' is a reference to e.g. a UserDefault parameter (e.g. 'UserDefault.CostCenter'), the resolved parameter value is used)", + "type": "string", + "enum": ["plain", "reference"] + } + }, + "anyOf": [ + { + "properties": { + "format": { + "type": "string", + "enum": ["plain"] + }, + "value": { + "type": "string" + } + } + }, + { + "properties": { + "format": { + "type": "string", + "enum": ["reference"] + }, + "value": { + "type": "string", + "pattern": "^(User[.]env|UserDefault(.extended)?)[.][^.]+$" + } + } + }, + { + "properties": { + "format": { + "type": "null" + }, + "value": { + "type": "string" + } + } + } + ] + }, + "filter": { + "description": "Represents a filter , only if input parameter matches filter", + "type": "object", + "additionalProperties": false, + "required": ["value"], + "properties": { + "value": { + "description": "Represents a depending on format either a verbatim filter value, a regular expression or a reference", + "type": "string" + }, + "format": { + "type": "string", + "description": "Indicates how 'value' is to be interpreted: ('plain': the actual value must match the 'value' property directly| 'regexp': the 'value' represents a regexp which must be present in the actual value| 'reference' : the 'value' represents a reference to e.g. a UserDefault parameter (e.g. 'UserDefault.CostCenter'), the resolved parameter value is then directly compared with the actual value)", + "enum": ["plain", "regexp", "reference"] + } + } + }, + "launcherValue": { + "type": "object", + "description": " Represents a value to be used when creating a tile intent for this inbound", + "additionalProperties": false, + "properties": { + "value": { + "oneOf": [ + { + "description": "Represents the definition of a single-value tile intent parameter; format property must be 'plain' in this case", + "type": "string" + }, + { + "description": "Represents the definition of a multi-value tile intent parameter; format property must be 'array' in this case", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "format": { + "description": "Indicates how 'value' is to be interpreted: 'plain': the 'value' is taken as a literal string value | 'array': the 'value' is an array of strings", + "type": "string", + "enum": ["plain", "array"] + }, + "prompt": { + "description": "DEPRECATED - Indicates the administrator should be prompted to supply a value when creating a tile", + "type": "boolean" + } + } + }, + "required": { + "type": "boolean" + }, + "renameTo": { + "description": "Represents the parameter name in legacy ABAP application, e.g. 'RF05L-BUKRS' for parameter 'CompanyCode'", + "type": "string" + } + } + } + } + }, + "additionalParameters": { + "description": "Indicates how additional parameters to the declared signature are treated: ('ignored': parameters are not passed on to application | 'allowed': parameters are passed on to application | 'notallowed': additional parameters are not allowed)", + "type": "string", + "enum": ["ignored", "allowed", "notallowed"] + } + } + }, + "objectType": { + "type": "string", + "enum": ["query", "cdsprojectionview", "view", "inamodel"] + }, + "objectName": { + "type": "string", + "pattern": "^(\\\\[0-9a-zA-Z_]+\\\\)?[a-zA-Z][a-zA-Z0-9_]*$", + "minLength": 3, + "maxLength": 50 + }, + "dataSourceCustom": { + "type": "object", + "additionalProperties": false, + "required": ["uri", "customType"], + "properties": { + "uri": { + "description": "Represents the uri of the data source, should always be given in lower case", + "type": "string" + }, + "type": { + "description": "Represents type of the data source. The supported types are OData, ODataAnnotation, INA, XML, JSON, FHIR, WebSocket, http", + "type": "string", + "pattern": "^[a-zA-Z0-9_\\-]+$", + "not": { + "enum": [ + "OData", + "ODataAnnotation", + "INA", + "XML", + "JSON", + "FHIR", + "WebSocket", + "http" + ] + } + }, + "settings": { + "description": "Represents data source type specific attributes (key, value pairs)", + "$ref": "#/definitions/setting" + }, + "customType": { + "description": "Represents a custom data source type flag. So the type can be any string if its true, and only enum values if false", + "type": "boolean", + "enum": [true] + } + } + }, + "dataSourceEnum": { + "type": "object", + "additionalProperties": false, + "required": ["uri"], + "properties": { + "uri": { + "description": "Represents uri of the data source", + "type": "string" + }, + "type": { + "description": "Represents type of the data source. The supported types are OData, ODataAnnotation, INA, XML, JSON, FHIR, WebSocket, http", + "type": "string", + "enum": [ + "OData", + "ODataAnnotation", + "INA", + "XML", + "JSON", + "FHIR", + "WebSocket", + "http" + ], + "default": "OData" + }, + "settings": { + "description": "Represents data source type specific attributes (key, value pairs)", + "$ref": "#/definitions/setting" + }, + "customType": { + "type": "boolean", + "enum": [false] + } + } + }, + "setting": { + "type": "object", + "additionalProperties": true, + "properties": { + "odataVersion": { + "description": "Represents version of OData: 2.0 is default", + "type": "string", + "enum": ["2.0", "4.0"] + }, + "localUri": { + "description": "Represents path to local meta data document or annotation uri", + "type": "string" + }, + "annotations": { + "description": "Represents array of annotation which references an existing data source of type ODataAnnotation", + "type": "array", + "items": { + "type": "string" + } + }, + "maxAge": { + "description": "Indicates that the client is unwilling to accept a response whose age is greater than the number of seconds specified in this field", + "type": "number", + "multipleOf": 1 + }, + "objects": { + "type": "object", + "description": "Dictionary of (catalog) objects offered by the datasource", + "additionalProperties": { + "description": "A (catalog) object of an InA DataSource", + "type": "object", + "properties": { + "objectName": { + "$ref": "#/definitions/objectName" + }, + "objectType": { + "$ref": "#/definitions/objectType" + }, + "packageName": { + "type": "string" + }, + "schemaName": { + "type": "string" + } + }, + "additionalProperties": false, + "required": ["objectName", "objectType"] + } + }, + "ignoreAnnotationsFromMetadata": { + "description": "Indicates whether annotations from metadata should be ignored", + "type": "boolean" + } + } + }, + "outbound": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[\\w\\.\\-]+$": { + "type": "object", + "additionalProperties": false, + "required": ["semanticObject", "action"], + "properties": { + "semanticObject": { + "description": "Represents a business entity (e.g., 'Employee')", + "type": "string", + "pattern": "^[\\w\\*]{0,30}$" + }, + "action": { + "description": "Represents the action to perform on the business entity (e.g., 'display')", + "type": "string", + "pattern": "^[\\w\\*]{0,60}$" + }, + "additionalParameters": { + "description": "Indicates whether the intent can contain additional context parameters that are not described in the outbound: ('notallowed': the intent must contain only the specified parameters | 'allowed': additional parameters might appear in the navigation intent)| 'ignored': technical meta-parameters for framework usage are added to the intent, these parameters should be ignored by target applications", + "type": "string", + "enum": ["notallowed", "ignored", "allowed"] + }, + "parameters": { + "description": "Represents parameters of navigation intents", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[\\w\\.\\-\\/]+$": { + "type": "object", + "additionalProperties": false, + "properties": { + "value": { + "type": "object", + "description": "Describes parameters of navigation intents generated or triggered by the application", + "additionalProperties": false, + "properties": { + "value": { + "description": "Represents a verbatim value (when 'plain' format is used), a pattern (when 'regexp' format is used), a value coming from a UI5 model (when 'binding' format is used), or a User Default reference (when 'reference' format is used)", + "type": "string" + }, + "format": { + "description": "Indicates how 'value' is to be interpreted: 'plain': the 'value' is taken as a literal string value | 'reference': the 'value' is a reference to a parameter maintained in the Fiori Launchpad (e.g. 'UserDefault.CostCenter'); the parameter value is used on the outbound intent parameter| 'regexp': the 'value' matches the specified pattern| 'binding': the 'value' is a binding path; the value from the model at the specified binding path will be used on the outbound intent parameter", + "type": "string", + "enum": ["plain", "regexp", "reference", "binding"] + } + } + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "inbound": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[\\w\\.\\-]+$": { + "type": "object", + "additionalProperties": false, + "required": ["semanticObject", "action"], + "properties": { + "semanticObject": { + "description": "Represents semantic object", + "type": "string", + "pattern": "^[\\w\\*]{0,30}$" + }, + "action": { + "description": "Represents action an the semantic object", + "type": "string", + "pattern": "^[\\w\\*]{0,60}$" + }, + "hideLauncher": { + "description": "Indicates to not expose this inbound as a tile or link", + "type": "boolean" + }, + "icon": { + "description": "Represents icon", + "type": "string" + }, + "title": { + "description": "Represents a title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "subTitle": { + "description": "Represents a subtitle; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "shortTitle": { + "description": "Represents a shorter version of the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "info": { + "description": "Represents additional information to the title; to make this property language dependent (recommended), use a key in double curly brackets '{{key}}'", + "type": "string" + }, + "displayMode": { + "description": "Represents the display mode of the tile", + "type": "string", + "enum": ["ContentMode", "HeaderMode"], + "default": "ContentMode" + }, + "indicatorDataSource": { + "description": "Represents data source", + "type": "object", + "required": ["dataSource", "path"], + "properties": { + "dataSource": { + "type": "string" + }, + "path": { + "type": "string" + }, + "refresh": { + "description": "Represents refresh interval", + "type": "number" + } + } + }, + "deviceTypes": { + "description": "Represents device types for which application is developed", + "$ref": "#/definitions/deviceType" + }, + "signature": { + "$ref": "#/definitions/signature_def" + } + } + } + } + }, + "openSource": { + "type": "object", + "additionalProperties": false, + "required": ["name"], + "properties": { + "name": { + "description": "Represents a name of the open source as appears on the web", + "type": "string" + }, + "version": { + "description": "Represents a version of the open source (if part of app, version must be specified, if part of UI5 dist layer, version is empty)", + "type": "string" + }, + "packagedWithMySelf": { + "description": "Indicates, whether it is part of the app or not", + "type": "boolean" + } + } + }, + "dataSource": { + "oneOf": [ + { + "$ref": "#/definitions/dataSourceEnum" + }, + { + "$ref": "#/definitions/dataSourceCustom" + } + ] + }, + "enhanceWithSetting": { + "oneOf": [ + { + "additionalProperties": false, + "required": ["bundleUrl"], + "properties": { + "bundleUrl": { + "description": "Represents property url for model enhancement", + "type": "string" + }, + "bundleUrlRelativeTo": { + "description": "Indicates whether url is relative to component (default) or manifest", + "type": "string", + "default": "component", + "enum": ["manifest", "component"] + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + } + } + }, + { + "required": ["bundleName"], + "additionalProperties": false, + "properties": { + "bundleName": { + "description": "Represents the alternative for bundleUrl", + "type": "string" + }, + "fallbackLocale": { + "description": "Represents the fallback locale", + "type": "string" + }, + "supportedLocales": { + "description": "Represents the list of supported locales", + "type": "array" + }, + "terminologies": { + "description": "Represents terminologies with additional properties files", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9_\\-]*$": { + "$ref": "#/definitions/terminologySetting" + } + } + } + } + } + ] + }, + "id_def": { + "type": "string", + "maxLength": 70 + } + } +} diff --git a/packages/vscode-ui5-language-assistant/src/utils/index.ts b/packages/vscode-ui5-language-assistant/src/utils/index.ts new file mode 100644 index 000000000..643c20cf3 --- /dev/null +++ b/packages/vscode-ui5-language-assistant/src/utils/index.ts @@ -0,0 +1,16 @@ +import { join } from "path"; +import { readFile } from "fs/promises"; +import { ExtensionContext } from "vscode"; + +/** + * Read schema content from `lib->manifest->schema.json` + * + */ +export const getSchemaContent = ( + context: ExtensionContext +): Promise => { + const filePath = context.asAbsolutePath( + join("lib", "src", "manifest", "schema.json") + ); + return readFile(filePath, "utf8"); +}; diff --git a/packages/vscode-ui5-language-assistant/tsconfig.json b/packages/vscode-ui5-language-assistant/tsconfig.json index 7ecd7b544..26407ddfb 100644 --- a/packages/vscode-ui5-language-assistant/tsconfig.json +++ b/packages/vscode-ui5-language-assistant/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "lib", "baseUrl": "." }, - "include": ["src/**/*", "test/**/*", "api.d.ts"] + "include": ["src/**/*", "test/**/*", "api.d.ts", "src/manifest/*.json"] }