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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
821b6a86
Commit
821b6a86
authored
2 years ago
by
Cédric Le Ninivin
Committed by
Titouan Soulard
2 months ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: Get actions links are now generated as the other actions
parent
2a36803b
Changes
1
Show 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 @
821b6a86
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
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