Commit 105a496d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_panel: Add sample for multiple form with json-schema

parent 42d4d863
<?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>minimal_multiform_demo</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>
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Shared A",
"type": "object",
"oneOf": [
{"$ref": "./instance-shared-A-part1-input-schema.json"},
{"$ref": "./instance-shared-A-part2-input-schema.json"}
]
}
<?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-shared-A-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>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Shared type A1",
"type": "object",
"description": "Sample paremeters for a Simple Demo with broken or bad standards",
"required": ["A"],
"additionalProperties": false,
"properties": {
"A" : {
"title": "A",
"type": "object",
"required": ["A1"],
"properties": {
"A1": {
"title": "A1",
"type": "object",
"properties": {
"string-type-a1": {
"title": "String Type A1",
"description": "Description for Type A1",
"default": "Type A1",
"type": "string"
},
"boolean-type-a1": {
"title": "Boolean Type A1",
"description": "Description for Boolean Type A1",
"default": true,
"type": "boolean"
}
}
}
}
}
}
}
\ No newline at end of file
<?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-shared-A-part1-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>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Shared type A2",
"type": "object",
"required": ["A"],
"properties": {
"A" : {
"title": "A",
"type": "object",
"required": ["A2"],
"properties": {
"A2": {
"title": "A2",
"type": "object",
"properties": {
"string-type-A2": {
"title": "String Type A2",
"description": "Description for Type A2",
"default": "Type A2",
"type": "string"
},
"boolean-type-A2": {
"title": "Boolean Type A2",
"description": "Description for Boolean Type A2",
"default": true,
"type": "boolean"
}
}
}
}
}
}
}
\ No newline at end of file
<?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-shared-A-part2-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>
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Shared B",
"type": "object",
"oneOf": [
{"$ref": "./instance-shared-B-part1-input-schema.json"},
{"$ref": "./instance-shared-B-part2-input-schema.json"}
]
}
<?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-shared-B-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>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Shared type B1",
"type": "object",
"required": ["B"],
"properties": {
"B" : {
"title": "B",
"type": "object",
"required": ["B1"],
"properties": {
"B1": {
"title": "B1",
"type": "object",
"required": ["string-type-B1"],
"properties": {
"string-type-B1": {
"title": "String Type B1",
"description": "Description for Type B1",
"default": "Type B1",
"type": "string"
},
"boolean-type-B1": {
"title": "Boolean Type B1",
"description": "Description for Boolean Type B1",
"default": true,
"type": "boolean"
}
}
}
}
}
}
}
\ No newline at end of file
<?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-shared-B-part1-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>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Shared type B2",
"type": "object",
"additionalProperties": false,
"required": ["B"],
"properties": {
"B" : {
"title": "B",
"type": "object",
"required": ["B2"],
"properties": {
"B2": {
"title": "B2",
"type": "object",
"properties": {
"string-type-B2": {
"title": "String Type B2",
"description": "Description for Type B2",
"default": "Type B2",
"type": "string"
},
"boolean-type-B2": {
"title": "Boolean Type B2",
"description": "Description for Boolean Type B2",
"default": true,
"type": "boolean"
}
}
}
}
}
}
}
\ No newline at end of file
<?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-shared-B-part2-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>
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"description": "Sample paremeters for a Simple Demo with broken or bad standards",
"oneOf": [
{"$ref": "./instance-shared-A-input-schema.json"},
{"$ref": "./instance-shared-B-input-schema.json"}
]
}
<?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-shared-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": "json-in-xml",
"software-type": {
"default": {
"title": "Default",
"description": "Default reference parameters",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
},
"default-shared": {
"title": "Shared",
"description": "Default reference parameters",
"request": "instance-shared-input-schema.json",
"response": "instance-output-schema.json",
"software-type": "default",
"shared": true,
"index": 1
}
}
}
<?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>
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