Created
October 4, 2018 14:34
-
-
Save simonetripodi/c69d2ffebdbd2c4b1355df60568f1ab5 to your computer and use it in GitHub Desktop.
Apache Sling Feature JSON schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "$id": "http://sling.apache.org/Feature/1.0.0", | |
| "type": "object", | |
| "properties": { | |
| "model-version": { | |
| "type": "string" | |
| }, | |
| "id": { | |
| "type": "string", | |
| "pattern": "^(([^: ]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)|([^/ ]+)/([^/ ]+)(/([^/ ]+))?(/([^/ ]*)(/([^/ ]+))?)?)$" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| }, | |
| "vendor": { | |
| "type": "string" | |
| }, | |
| "license": { | |
| "type": "string" | |
| }, | |
| "variables": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "bundles": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/definitions/Bundle" | |
| } | |
| }, | |
| "framework-properties": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "type": [ "string", "number", "boolean" ] | |
| } | |
| } | |
| }, | |
| "configurations": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "$ref": "#/definitions/Configuration" | |
| } | |
| } | |
| }, | |
| "include": { | |
| "$ref": "#/definitions/Include" | |
| }, | |
| "requirements": { | |
| " type": "array", | |
| "items": { | |
| "$ref": "#/definitions/Requirement" | |
| } | |
| }, | |
| "capabilities": { | |
| " type": "array", | |
| "items": { | |
| "$ref": "#/definitions/Capability" | |
| } | |
| } | |
| }, | |
| "patternProperties": { | |
| "^[^: ]+:ARTIFACTS\\|(true|false)$": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/definitions/Bundle" | |
| } | |
| }, | |
| "^[^: ]+:TEXT\\|(true|false)$": { | |
| "type": [ "string", "array" ], | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "^[^: ]+:JSON\\|(true|false)$": { | |
| "type": [ | |
| "object", | |
| "array" | |
| ] | |
| } | |
| }, | |
| "definitions": { | |
| "Bundle": { | |
| "$id": "#Bundle", | |
| "type": [ | |
| "string", | |
| "object" | |
| ], | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "pattern": "^(([^: ]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)|(mvn:)?([^/ ]+)/([^/ ]+)(/([^/ ]+))?(/([^/ ]*)(/([^/ ]+))?)?)$" | |
| }, | |
| "start-level": { | |
| "type": [ "string", "number" ], | |
| "pattern": "^\\d+$" | |
| }, | |
| "run-modes": { | |
| "type": [ | |
| "string", | |
| "array" | |
| ], | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "configurations": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "$ref": "#/definitions/Configuration" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "Configuration": { | |
| "$id": "#Configuration", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "type": [ | |
| "string", | |
| "number", | |
| "boolean", | |
| "array", | |
| "object" | |
| ] | |
| } | |
| } | |
| }, | |
| "Include": { | |
| "$id": "#Include", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "pattern": "^(([^: ]+):([^: ]+)(:([^: ]*)(:([^: ]+))?)?:([^: ]+)|(mvn:)?([^/ ]+)/([^/ ]+)(/([^/ ]+))?(/([^/ ]*)(/([^/ ]+))?)?)$" | |
| }, | |
| "removals": { | |
| "$ref": "#/definitions/Removals" | |
| } | |
| } | |
| }, | |
| "Removals": { | |
| "$id": "#Removals", | |
| "type": "object", | |
| "properties": { | |
| "configurations": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "bundles": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "framework-properties": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| }, | |
| "Requirement": { | |
| "$id": "#Requirement", | |
| "type": "object", | |
| "properties": { | |
| "namespace": { | |
| "type": "string" | |
| }, | |
| "directives": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "Capability": { | |
| "$id": "#Capability", | |
| "type": "object", | |
| "properties": { | |
| "namespace": { | |
| "type": "string" | |
| }, | |
| "directives": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "attributes": { | |
| "type": "object", | |
| "patternProperties": { | |
| "^(.+)$": { | |
| "type": [ "string", "number", "boolean" ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment