json-schema.metadata.entityInfo.json Maven / Gradle / Ivy
{
"copyright": [
"Copyright 2013 Red Hat, Inc. and/or its affiliates.",
"This file is part of lightblue.",
"This program is free software: you can redistribute it and/or modify",
"it under the terms of the GNU General Public License as published by",
"the Free Software Foundation, either version 3 of the License, or",
"(at your option) any later version.",
"This program is distributed in the hope that it will be useful,",
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
"GNU General Public License for more details.",
"You should have received a copy of the GNU General Public License",
"along with this program. If not, see ."
],
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the entity."
},
"description": {
"type": "string",
"description": "A description of the entity."
},
"defaultVersion": {
"type": "string",
"description": "Default version of the entity used unless a version is explicitly provided in the request."
},
"hooks": {
"type": "array",
"description": "Definition of all hooks for use within field data.",
"items": {
"properties": {
"name": {
"type": "string",
"description": "The name of the hook, maps to a hook implementation class."
},
"projection": {
"description": "If specified, is applied against the request and response before submitting to hook implementation.",
"$ref": "/json-schema/projection/choice.json#/definitions/projection"
},
"configuration": {
"type": "object",
"additionalProperties": true,
"description": "Any configuration needed by the hook implementation."
},
"actions": {
"type": "array",
"minItems": 1,
"items": {
"enum": [
"insert",
"update",
"find",
"delete"
]
}
}
},
"required": [
"name",
"actions"
],
"additionalProperties": false
}
},
"indexes": {
"type": "array",
"description": "Container for all indexes. Each child is an array of fields. Each child array becomes a single index.",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Optional name of the index."
},
"unique": {
"type": "boolean",
"description": "If true, the index is a unique constraint. If not specified, value is 'false'."
},
"fields": {
"type": "array",
"description": "Fields that are part of the index.",
"minItems": 1,
"items": {
"type": "object",
"properties" : {
"field": {
"type":"string",
"description":"Index field"
},
"dir" : {
"type":"string",
"description":"$asc or $desc"
}
},
"required" : [ "field" ]
}
}
},
"required": [
"fields"
],
"additionalProperties": false
}
},
"enums": {
"type": "array",
"description": "Array of defined enums that can be referenced by name from fields.",
"items": {
"properties": {
"name": {
"type": "string",
"description": "The name of the enum. Must be unique per entity. TODO enforce uniqueness in the json schema."
},
"values": {
"type": "array",
"description": "The values that can be used for the enum. Deprecated in favor of annotatedValues",
"minItems": 1,
"items": {
"type": "string"
}
},
"annotatedValues" : {
"type": "array",
"description": "The values with descriptions that can be used for the enum. Replaces values",
"minItems": 1,
"items": {
"properties": {
"name": {
"type": "string",
"description": "The name of the values that can be used for the enum"
},
"description": {
"type": "string",
"description": "description of the enum value"
}
}
}
}
},
"required": [
"name"
]
}
},
"datastore": {
"type": "object",
"description": "Definition of the backend in which data is persisted. Note that credentials are not stored here. Pointers to credientials could be saved, such as env variables. This entity is wide open on purpose to allow individual backend implementations to deal with parsing and validating this structure.",
"additionalProperties": true
},
"controllerConfiguration": {
"type": "object",
"description": "Definition of the backend in which data is persisted. Note that credentials are not stored here. Pointers to credientials could be saved, such as env variables. This entity is wide open on purpose to allow individual backend implementations to deal with parsing and validating this structure.",
"additionalProperties": true
}
},
"required": [
"name",
"datastore"
],
"additionalProperties": false
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy