Commit f89fc714 authored by Romain Courteaud's avatar Romain Courteaud

slapos_json_rpc_api: forbid additional properties in the input/output schemas

parent 757f46e5
......@@ -30,9 +30,9 @@
</item>
<item>
<key> <string>output_schema</string> </key>
<value> <string>{\n
"title": "bar"\n
}</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -45,6 +45,7 @@
"title": "Get Compute Node",\n
"description": "Data necessary to get Compute Node",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"compute_node_id": {\n
"title": "Compute Node ID",\n
......
......@@ -35,6 +35,7 @@
"title": "Software Installation Updated",\n
"description": "Response when the software installation is updated",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"compute_node_id": {\n
"title": "Compute Node ID",\n
......@@ -73,6 +74,7 @@
"title": "Update Compute Node",\n
"description": "Update Compute Node Information. Send the list of partition and their ip addresses.",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"compute_partition_list": {\n
"title": "Compute Partition List",\n
......
......@@ -30,7 +30,9 @@
</item>
<item>
<key> <string>output_schema</string> </key>
<value> <string>{}</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -43,6 +45,7 @@
"title": "Software Installation",\n
"description": "Software Installation",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"software_release_uri": {\n
"title": "Software Release URI",\n
......
......@@ -35,6 +35,7 @@
"title": "Software Installation Updated",\n
"description": "Response when the software installation is updated",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"software_release_uri": {\n
"title": "Software Release URI",\n
......@@ -60,8 +61,14 @@
"title": "Success Message",\n
"type": "string",\n
"description": "Success Message"\n
},\n
}\n
}\n
},\n
"required": [\n
"software_release_uri",\n
"compute_node_id",\n
"portal_type",\n
"success"\n
]\n
}\n
</string> </value>
</item>
......@@ -76,6 +83,7 @@
"title": "Software Installation",\n
"description": "Software Installation",\n
"type": "object",\n
"additionalProperties": false,\n
"oneOf": [\n
{\n
"properties": {\n
......
......@@ -35,6 +35,7 @@
"title": "X509 Certificates",\n
"description": "X509 Certificates used by the instance to authentify itself on master",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"reference": {\n
"title": "Software Instance Reference",\n
......@@ -57,7 +58,13 @@
"const": "Software Instance Certificate Record",\n
"type": "string"\n
}\n
}\n
},\n
"required": [\n
"reference",\n
"key",\n
"portal_type",\n
"certificate"\n
]\n
}</string> </value>
</item>
<item>
......@@ -71,6 +78,7 @@
"title": "Get Software Instance Certificate",\n
"description": "Data necessary to get Software Instance Certificates",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"reference": {\n
"title": "Software Instance Id/Reference",\n
......
......@@ -30,9 +30,9 @@
</item>
<item>
<key> <string>output_schema</string> </key>
<value> <string>{\n
"$ref: "%(base_url)s/portal_types/Software%20Instance/getTextContent"\n
}</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -45,6 +45,7 @@
"title": "Get Compute Node",\n
"description": "Data necessary to get Compute Node",\n
"type": "object",\n
"additionalProperties": false,\n
"oneOf": [\n
{\n
"properties": {\n
......
......@@ -35,6 +35,7 @@
"title": "Software Instance Updated",\n
"description": "Response when the software instance is updated",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"reference": {\n
"title": "Software Instance Id/Reference",\n
......@@ -52,7 +53,12 @@
"type": "string",\n
"format": "date-time"\n
}\n
}\n
},\n
"required": [\n
"reference",\n
"portal_type",\n
"date"\n
]\n
}\n
</string> </value>
</item>
......@@ -68,6 +74,7 @@
"title": "Software Instance",\n
"description": "Software Instance",\n
"type": "object",\n
"additionalProperties": false,\n
"oneOf": [\n
{\n
"properties": {\n
......
......@@ -34,6 +34,7 @@
"title": "Compute Node",\n
"description": "Compute Node",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"portal_type": {\n
"title": "Portal Type",\n
......@@ -46,7 +47,7 @@
"maxLength": 200\n
}\n
},\n
"required": ["portal_type"]\n
"required": ["portal_type", "title"]\n
}\n
</string> </value>
</item>
......
......@@ -33,6 +33,7 @@
"title": "Software Installation",\n
"description": "Software Installation",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"software_release_uri": {\n
"title": "Software Release URI",\n
......
......@@ -40,6 +40,7 @@
"title": "Software Instance",\n
"description": "Software Instance",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"title": {\n
"title": "Title",\n
......
......@@ -34,6 +34,8 @@
"$schema": "http://json-schema.org/draft-07/schema#",\n
"title": "allDocs: Response Payload",\n
"description": "Payload returned by allDocs method.",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"current_page_full": {\n
"title": "Current Page Full",\n
......@@ -51,6 +53,7 @@
"type": "array",\n
"items": {\n
"type": "object",\n
"additionalProperties": false,\n
"title": "Item",\n
"properties": {\n
"title": {\n
......@@ -77,6 +80,7 @@
"title": "Get Parameters",\n
"description": "Copy Paste the content of this object in order to get the object",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"compute_node_id": {\n
"title": "Compute Node ID",\n
......@@ -88,12 +92,27 @@
"const": "Compute Node",\n
"type": "string"\n
}\n
}\n
},\n
"required": [\n
"title",\n
"compute_node_id",\n
"portal_type"\n
]\n
}\n
}\n
},\n
"required": [\n
"title",\n
"compute_node_id",\n
"portal_type",\n
"get_parameters"\n
]\n
}\n
}\n
}\n
},\n
"required": [\n
"current_page_full",\n
"result_list"\n
]\n
}</string> </value>
</item>
<item>
......@@ -107,6 +126,7 @@
"title": "Search Compute Node",\n
"description": "JSON Schema to query/search for a Compute Node",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"title": {\n
"title": "Compute Node Title",\n
......
......@@ -34,6 +34,8 @@
"$schema": "http://json-schema.org/draft-07/schema#",\n
"title": "allDocs: Response Payload",\n
"description": "Payload returned by allDocs method.",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"current_page_full": {\n
"title": "Current Page Full",\n
......@@ -53,6 +55,7 @@
"anyOf": [\n
{\n
"type": "object",\n
"additionalProperties": false,\n
"title": "Software Instance",\n
"properties": {\n
"get_parameters": {\n
......@@ -111,6 +114,7 @@
},\n
{\n
"type": "object",\n
"additionalProperties": false,\n
"title": "Shared Instance",\n
"properties": {\n
"get_parameters": {\n
......@@ -128,7 +132,7 @@
"const": "Software Instance",\n
"type": "string"\n
}\n
},\n
}\n
},\n
"reference": {\n
"title": "Software Instance Reference",\n
......@@ -160,7 +164,11 @@
]\n
}\n
}\n
}\n
},\n
"required": [\n
"current_page_full",\n
"result_list"\n
]\n
}</string> </value>
</item>
<item>
......@@ -175,6 +183,7 @@
"title": "Software Instance",\n
"description": "Software Instance Search",\n
"type": "object",\n
"additionalProperties": false,\n
"oneOf": [\n
{\n
"properties": {\n
......
......@@ -34,6 +34,8 @@
"$schema": "http://json-schema.org/draft-07/schema#",\n
"title": "allDocs: Response Payload",\n
"description": "Payload returned by allDocs method.",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"next_page_request": {\n
"title": "Next Page Request",\n
......@@ -98,10 +100,20 @@
"description": "State of the requested software",\n
"default": "available"\n
}\n
}\n
},\n
"required": [\n
"title",\n
"compute_node_id",\n
"portal_type",\n
"get_parameters"\n
]\n
}\n
}\n
}\n
},\n
"required": [\n
"current_page_full",\n
"result_list"\n
]\n
}</string> </value>
</item>
<item>
......@@ -116,6 +128,7 @@
"title": "Software Instance",\n
"description": "Software Instance",\n
"type": "object",\n
"additionalProperties": false,\n
"properties": {\n
"software_release_uri": {\n
"title": "Software Release URI",\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment