Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
35bc58b7
Commit
35bc58b7
authored
Apr 20, 2022
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Mar 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: Add Generic callable to return document as JSON Text
parent
6e2814fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
0 deletions
+129
-0
bt5/erp5_api_style/PathTemplateItem/portal_callables/Base_asJSONTextFromJSON.xml
...TemplateItem/portal_callables/Base_asJSONTextFromJSON.xml
+65
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/Base_asJSONText.py
...mplateItem/portal_skins/erp5_api_style/Base_asJSONText.py
+1
-0
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/Base_asJSONText.xml
...plateItem/portal_skins/erp5_api_style/Base_asJSONText.xml
+62
-0
bt5/erp5_api_style/bt/template_path_list
bt5/erp5_api_style/bt/template_path_list
+1
-0
No files found.
bt5/erp5_api_style/PathTemplateItem/portal_callables/Base_asJSONTextFromJSON.xml
0 → 100644
View file @
35bc58b7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"JSON Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
after_method_id
</string>
</key>
<value>
<string>
Base_asJSONText
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/json
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
Base_asJSONTextFromJSON
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_asJSONTextFromJSON
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
JSON Form
</string>
</value>
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
{\n
"$schema": "http://json-schema.org/draft-07/schema#",\n
"$id": "get-request-schema.json",\n
"title": "Get: Get Object Data",\n
"description": "Schema used for jIO Get Method Data. This method is used to retrieve the data of an existing object.",\n
"properties": {\n
"id": {\n
"title": "ID",\n
"type": "string",\n
"description": "Unique Id of the object. This ID is defined by KD Portal. It is not editable."\n
}\n
},\n
"required": ["id"]\n
}
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
01
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/Base_asJSONText.py
0 → 100644
View file @
35bc58b7
return
context
.
asJSONText
()
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/Base_asJSONText.xml
0 → 100644
View file @
35bc58b7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
data_dict, form_reference
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_asJSONText
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_api_style/bt/template_path_list
View file @
35bc58b7
portal_callables/Base_asJSONTextFromJSON
web_page_module/api-style_alldocs-response-schema.json
web_page_module/gadget_erp5_page_jio_api_action_html
web_page_module/gadget_erp5_page_jio_api_action_js
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment