Implement JsonSchema endpoint
This patchset implements JsonSchema support, and automates our update
of the XML metadata, and Json schema files in the future by way of a
python script.
Change-Id: Iec6f580d10736678149db18d87be2f140b535be9
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/static/redfish/v1/JsonSchemas/Zone/index.json b/static/redfish/v1/JsonSchemas/Zone/index.json
new file mode 100644
index 0000000..c3d30fd
--- /dev/null
+++ b/static/redfish/v1/JsonSchemas/Zone/index.json
@@ -0,0 +1,200 @@
+{
+ "$ref": "#/definitions/Zone",
+ "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_3_0.json",
+ "copyright": "Copyright 2014-2017 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
+ "definitions": {
+ "Actions": {
+ "additionalProperties": false,
+ "description": "The available actions for this resource.",
+ "longDescription": "This type shall contain the available actions for this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "Oem": {
+ "$ref": "#/definitions/OemActions"
+ }
+ },
+ "type": "object"
+ },
+ "Links": {
+ "additionalProperties": false,
+ "description": "Contains references to other resources that are related to this resource.",
+ "longDescription": "This type, as described by the Redfish Specification, shall contain references to resources that are related to, but not contained by (subordinate to), this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "Endpoints": {
+ "description": "Represents an array of references to the endpoints that are contained in this zone.",
+ "items": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Endpoint.json#/definitions/Endpoint"
+ },
+ "longDescription": "The value of this property shall be a reference to the resources that this zone is associated with and shall reference a resource of type Endpoint.",
+ "readonly": true,
+ "type": "array"
+ },
+ "Endpoints@odata.count": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/count"
+ },
+ "InvolvedSwitches": {
+ "description": "Represents an array of references to the switches in this zone.",
+ "items": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Switch.json#/definitions/Switch"
+ },
+ "longDescription": "The value of this property shall be a reference to the resources that this zone is associated with and shall reference a resource of type Switch.",
+ "readonly": true,
+ "type": "array"
+ },
+ "InvolvedSwitches@odata.count": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/count"
+ },
+ "Oem": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
+ "description": "Oem extension object.",
+ "longDescription": "This object represents the Oem property. All values for resources described by this schema shall comply to the requirements as described in the Redfish specification."
+ },
+ "ResourceBlocks": {
+ "description": "An array of references to the Resource Blocks that are used in this Zone.",
+ "items": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/ResourceBlock.json#/definitions/ResourceBlock"
+ },
+ "longDescription": "The value of this property shall be an array of references of type ResourceBlock that are associated with this Zone.",
+ "readonly": true,
+ "type": "array"
+ },
+ "ResourceBlocks@odata.count": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/count"
+ }
+ },
+ "type": "object"
+ },
+ "OemActions": {
+ "additionalProperties": true,
+ "description": "The available OEM specific actions for this resource.",
+ "longDescription": "This type shall contain any additional OEM actions for this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {},
+ "type": "object"
+ },
+ "Zone": {
+ "additionalProperties": false,
+ "description": "The Zone schema represents a fabric zone.",
+ "longDescription": "This resource shall be used to represent a simple zone for a Redfish implementation.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "@odata.context": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/context"
+ },
+ "@odata.id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/id"
+ },
+ "@odata.type": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/type"
+ },
+ "Actions": {
+ "$ref": "#/definitions/Actions",
+ "description": "The available actions for this resource.",
+ "longDescription": "The Actions property shall contain the available actions for this resource."
+ },
+ "Description": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "readonly": true
+ },
+ "Id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
+ "readonly": true
+ },
+ "Identifiers": {
+ "description": "Identifiers for this zone.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Identifier"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "longDescription": "Identifiers for this zone shall be unique in the context of other zones.",
+ "type": "array"
+ },
+ "Links": {
+ "$ref": "#/definitions/Links",
+ "description": "Contains references to other resources that are related to this resource.",
+ "longDescription": "The Links property, as described by the Redfish Specification, shall contain references to resources that are related to, but not contained by (subordinate to), this resource."
+ },
+ "Name": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
+ "readonly": true
+ },
+ "Oem": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
+ "description": "This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.",
+ "longDescription": "The value of this string shall be of the format for the reserved word *Oem*."
+ },
+ "Status": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Status"
+ }
+ },
+ "required": [
+ "Id",
+ "Name"
+ ],
+ "type": "object"
+ }
+ },
+ "title": "#Zone.v1_2_0.Zone"
+}
\ No newline at end of file