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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
0527daa8
Commit
0527daa8
authored
Mar 18, 2024
by
Titouan Soulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_json_form: fix Content-Type and Cache-Control
parent
025baa4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
bt5/erp5_json_form/ModuleComponentTemplateItem/portal_components/document.erp5.JSONForm.py
...tTemplateItem/portal_components/document.erp5.JSONForm.py
+5
-4
No files found.
bt5/erp5_json_form/ModuleComponentTemplateItem/portal_components/document.erp5.JSONForm.py
View file @
0527daa8
...
@@ -103,29 +103,30 @@ class JSONForm(JSONType, TextDocument):
...
@@ -103,29 +103,30 @@ class JSONForm(JSONType, TextDocument):
control
.
append
(
"max-age=3600"
)
control
.
append
(
"max-age=3600"
)
control
.
append
(
"private"
)
control
.
append
(
"private"
)
REQUEST
.
RESPONSE
.
setHeader
(
"Cache-control"
,
", "
.
join
(
control
))
REQUEST
.
RESPONSE
.
setHeader
(
"Cache-control"
,
", "
.
join
(
control
))
REQUEST
.
RESPONSE
.
setHeader
(
"Content-Type"
,
"application/json"
)
return
json
.
dumps
(
schema
,
indent
=
2
).
encode
()
return
json
.
dumps
(
schema
,
indent
=
2
).
encode
()
security
.
declarePublic
(
"getOutputJSONSchema"
)
security
.
declarePublic
(
"getOutputJSONSchema"
)
@
UnrestrictedMethod
@
UnrestrictedMethod
def
getOutputJSONSchema
(
self
,
REQUEST
=
None
):
def
getOutputJSONSchema
(
self
):
"""
"""
Method to retrieve the expected JSON Schema for JSON input
Method to retrieve the expected JSON Schema for JSON input
"""
"""
return
self
.
returnSchema
(
return
self
.
returnSchema
(
self
.
getOutputSchema
(),
self
.
getOutputSchema
(),
"/getOutputJSONSchema"
,
"/getOutputJSONSchema"
,
REQUEST
self
.
REQUEST
)
)
security
.
declarePublic
(
"getInputJSONSchema"
)
security
.
declarePublic
(
"getInputJSONSchema"
)
@
UnrestrictedMethod
@
UnrestrictedMethod
def
getInputJSONSchema
(
self
,
REQUEST
=
None
):
def
getInputJSONSchema
(
self
):
"""
"""
Method to retrieve the expected JSON Schema for JSON output
Method to retrieve the expected JSON Schema for JSON output
"""
"""
return
self
.
returnSchema
(
return
self
.
returnSchema
(
self
.
getTextContent
(),
self
.
getTextContent
(),
"/getInputJSONSchema"
,
"/getInputJSONSchema"
,
REQUEST
self
.
REQUEST
)
)
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