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/NetworkInterface/index.json b/static/redfish/v1/JsonSchemas/NetworkInterface/index.json
new file mode 100644
index 0000000..6b2d54c
--- /dev/null
+++ b/static/redfish/v1/JsonSchemas/NetworkInterface/index.json
@@ -0,0 +1,150 @@
+{
+ "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_2_0.json",
+ "title": "#NetworkInterface.v1_1_0.NetworkInterface",
+ "$ref": "#/definitions/NetworkInterface",
+ "definitions": {
+ "NetworkInterface": {
+ "type": "object",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ],
+ "description": "This property shall specify a valid odata or Redfish property."
+ }
+ },
+ "additionalProperties": false,
+ "properties": {
+ "@odata.context": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/context"
+ },
+ "@odata.id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/id"
+ },
+ "@odata.type": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.4.0.0.json#/definitions/type"
+ },
+ "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*."
+ },
+ "Id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
+ "readonly": true
+ },
+ "Description": {
+ "anyOf": [
+ {"$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"},
+ {"type": "null"}
+ ],
+ "readonly": true
+ },
+ "Name": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
+ "readonly": true
+ },
+ "Status": {
+ "anyOf": [
+ {"$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Status"},
+ {"type": "null"}
+ ]
+ },
+ "Links": {
+ "type": "object",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ],
+ "description": "This property shall specify a valid odata or Redfish property."
+ }
+ },
+ "additionalProperties": false,
+ "properties": {
+ "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."
+ },
+ "NetworkAdapter": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkAdapter.json#/definitions/NetworkAdapter",
+ "readonly": true,
+ "description": "Contains the members of this collection."
+ }
+ },
+ "description": "Links.",
+ "longDescription": "Links for this controller."
+ },
+ "NetworkPorts": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkPortCollection.json#/definitions/NetworkPortCollection",
+ "readonly": true,
+ "description": "Contains the members of this collection."
+ },
+ "NetworkDeviceFunctions": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkDeviceFunctionCollection.json#/definitions/NetworkDeviceFunctionCollection",
+ "readonly": true,
+ "description": "Contains the members of this collection."
+ },
+ "Actions": {
+ "type": "object",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ],
+ "description": "This property shall specify a valid odata or Redfish property."
+ }
+ },
+ "additionalProperties": false,
+ "properties": {
+ "Oem": {
+ "type": "object",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ],
+ "description": "This property shall specify a valid odata or Redfish property."
+ }
+ },
+ "additionalProperties": true,
+ "properties": {},
+ "description": "The available OEM specific actions for this resource.",
+ "longDescription": "This type shall contain any additional OEM actions for this resource."
+ }
+ },
+ "description": "The available actions for this resource.",
+ "longDescription": "The Actions property shall contain the available actions for this resource."
+ }
+ },
+ "required": [
+ "Id",
+ "Name"
+ ],
+ "description": "A NetworkInterface contains references linking NetworkAdapter, NetworkPort, and NetworkDeviceFunction resources and represents the functionality available to the containing system.",
+ "longDescription": "A NetworkInterface contains references linking NetworkAdapter, NetworkPort, and NetworkDeviceFunction resources and represents the functionality available to the containing system."
+ }
+ },
+ "copyright": "Copyright 2014-2017 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright"
+}