-
-
Notifications
You must be signed in to change notification settings - Fork 348
[18.0] [MIG] migrate base_rest #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Allow to specify a description into the services that will be used into the openapi documentation. It's not possible to use the docstring put on the service component as description since this information is lost when the final class is generated once the registery is loaded
By default in case of SessionExpiredException, Odoo return the login page with HTTP Status 200. For REST services we must return the real exception IOW 401 Unauthorize
Into the openapi documentation, declare 'id' as an integer path parameter
In HTTP GET methods, the paramters are not provided as a json document. The parameters are http query parameters. Therefore we need to translate the jsonschema defined for services available via HTTP GET into an openapi definition of the query paramters.
To avoid to redefine the generic routes in all our RestController, the routes was defined in the RestController base classe. Unfortunately even if the path into the routes was modified into the class factrory the definition of the generic routs was the same for all the Controllers inheriting from RestController. To avoid to share the definitions of these generic methods, we override the class factory into the metaclass and generate a new definition of these methods for each classes inheriting from RestController. In the same time we must also remove the RestConroller from the controller since it's an abstract controller.
In Py3 a function becomes a method only once the class def is instanciated.
…ng parser expect test
When navigating from one spec to an other, the page url is updated to include the name of the displayed page as paramter. This change takes into account this parameter when generating the swagger page to reopen the page with the selected spec open by default. In the same time, this change avoid a stacktrace when the api-docs page is called with paramters
… log level is DEBUG
Using the log level to enable the stack trace into the response is too dangerous. We must avoid to mix log level and development mode
e1f898a
to
b5d2d21
Compare
76c3f43
to
3d5982b
Compare
3d5982b
to
c7f050b
Compare
b4d880c
to
7c939bc
Compare
/ocabot migration base_rest |
Reminder to fwd port #358 (to be checked w/ oca-port). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tech review, functional review and manual tests 🟢
Thank you!
@lmignon one remark about the deprecation 😉
@lmignon great, thanks! We can merge if good for you 😉 |
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
for sure 😁 |
Congratulations, your PR was merged at 2b21061. Thanks a lot for contributing to OCA. ❤️ |
No description provided.