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
62e94f42
Commit
62e94f42
authored
Jun 22, 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: Get actions links are now generated as the other actions
parent
fd66fef5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/jIOWebSection_getAPIJSONHyperSchema.py
...ins/erp5_api_style/jIOWebSection_getAPIJSONHyperSchema.py
+3
-8
No files found.
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/jIOWebSection_getAPIJSONHyperSchema.py
View file @
62e94f42
...
@@ -23,17 +23,12 @@ def populateLinks(jio_type, url, action_list):
...
@@ -23,17 +23,12 @@ def populateLinks(jio_type, url, action_list):
"curl-example"
:
'curl -u user:password %s -H "Content-Type: application/json" --data @input.json'
%
(
base_url
+
url
,)
"curl-example"
:
'curl -u user:password %s -H "Content-Type: application/json" --data @input.json'
%
(
base_url
+
url
,)
})
})
return
result_list
return
result_list
data
[
"links"
]
=
data
[
"links"
]
+
[{
"jio_type"
:
"get"
,
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"get"
,
"get/"
,
context
.
ERP5Site_getAllActionListForAPIGet
())
"href"
:
"get/"
,
"targetSchema"
:
base_url
+
"get-request-schema.json"
,
"title"
:
"Get Document"
,
"method"
:
"POST"
,
"curl-example"
:
'curl -u user:password %s -H "Content-Type: application/json" --data @input.json'
%
(
base_url
+
"get/"
,)
}]
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"post"
,
"post/"
,
context
.
ERP5Site_getAllActionListForAPIPost
())
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"post"
,
"post/"
,
context
.
ERP5Site_getAllActionListForAPIPost
())
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"put"
,
"put/"
,
context
.
ERP5Site_getAllActionListForAPIPut
())
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"put"
,
"put/"
,
context
.
ERP5Site_getAllActionListForAPIPut
())
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"allDocs"
,
"allDocs/"
,
context
.
ERP5Site_getAllActionListForAPIAllDocs
())
data
[
"links"
]
=
data
[
"links"
]
+
populateLinks
(
"allDocs"
,
"allDocs/"
,
context
.
ERP5Site_getAllActionListForAPIAllDocs
())
import
json
import
json
return
json
.
dumps
(
return
json
.
dumps
(
data
,
data
,
...
...
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