Commit a3651c60 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Add sample and Bad sample for boolean

  The "bad" sample are examples that are miss used, but it should still works (as expected by the format).

  The first example are from the implementation of boolean using enum + strings.
parent abdd8a67
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>simplebaddemo</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo with broken or bad standards",
"additionalProperties": false,
"properties": {
"simple-boolean-as-string": {
"title": "Example of Boolean defined as String (WORKS BUT BAD PATTERN)",
"description": "Example of Boolean defined as String (WORKS BUT BAD PATTERN)",
"enum": [
"false",
"true"
],
"type": "string"
},
"simple-boolean": {
"title": "Correct Boolean definition",
"description": "Correct Boolean definition",
"type": "boolean",
"default": true
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>instance-input-schema.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"name": "Simple Demo following bad parameters",
"description": "Demo Simple following bad parameters",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"description": "Default reference parameters",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -21,6 +21,12 @@
],
"default": "simple string A"
},
"simple-boolean": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "boolean",
"default": true
},
"simple-string-with-text-area": {
"title": "Example of Simple String with textarea",
"description": "Example of Simple String with text area",
......
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