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
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
e0681848
Commit
e0681848
authored
1 year ago
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open_api: py3
parent
e4767f2f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_open_api/DocumentTemplateItem/portal_components/document.erp5.OpenAPITypeInformation.py
...portal_components/document.erp5.OpenAPITypeInformation.py
+4
-1
bt5/erp5_open_api/TestTemplateItem/portal_components/test.erp5.testOpenAPIService.py
...ateItem/portal_components/test.erp5.testOpenAPIService.py
+1
-1
No files found.
bt5/erp5_open_api/DocumentTemplateItem/portal_components/document.erp5.OpenAPITypeInformation.py
View file @
e0681848
...
@@ -340,7 +340,10 @@ class OpenAPITypeInformation(ERP5TypeInformation):
...
@@ -340,7 +340,10 @@ class OpenAPITypeInformation(ERP5TypeInformation):
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
def
getSchema
(
self
):
def
getSchema
(
self
):
stream
=
io
.
BytesIO
(
self
.
getTextContent
()
or
b'{}'
)
text_content
=
self
.
getTextContent
()
or
'{}'
if
six
.
PY3
:
text_content
=
text_content
.
encode
()
stream
=
io
.
BytesIO
(
text_content
)
if
self
.
getContentType
()
==
'application/x-yaml'
:
if
self
.
getContentType
()
==
'application/x-yaml'
:
try
:
try
:
import
yaml
# pylint:disable=import-error
import
yaml
# pylint:disable=import-error
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_open_api/TestTemplateItem/portal_components/test.erp5.testOpenAPIService.py
View file @
e0681848
...
@@ -980,7 +980,7 @@ class TestOpenAPIErrorHandling(OpenAPIPetStoreTestCase):
...
@@ -980,7 +980,7 @@ class TestOpenAPIErrorHandling(OpenAPIPetStoreTestCase):
self
.
addPythonScript
(
self
.
addPythonScript
(
'TestPetStoreOpenAPI_findPetsByStatus'
,
'TestPetStoreOpenAPI_findPetsByStatus'
,
'status'
,
'status'
,
'1/0'
,
'1/
/
0'
,
)
)
response
=
self
.
publish
(
response
=
self
.
publish
(
self
.
connector
.
getPath
()
+
'/pet/findByStatus?status=available'
)
self
.
connector
.
getPath
()
+
'/pet/findByStatus?status=available'
)
...
...
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