Note: This PR has a lot of commits because I tried so many different things to get the settings before finding a way I was satisfied with.
Description of the issue/feature this PR addresses
Provide a route for querying general settings of a running instance through the JSON API.
Current behavior before PR
There is not a route that allows to query the JSON API for general settings.
Desired behavior after PR is merged
It is possible to obtained the general settings with the routes:
/settings, which will return all the settings.
/settings/<key>, which will return only the settings associated to that key.
Currently the availabe settings that can be queried are those that are defined under plone.app.controlpanel and implement an interface in the form of ISomethingSchema. The returned settings will be those associated to the schema ISomethingSchema With these restrictions the supported keywords are:
mail
calendar
ram
language
editing
usergroups
search
filter
maintenance
markup
naviagtion
security
site
skins
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.
Coverage remained the same at ?% when pulling 844c9cdddd687ebc0fdb30a0e92987210b273595 on juangallostra:settings-import into 9d576bff3ca2c31a33ccebfec77d2c82614f76ca on senaite:master.
Superseeds: #10 Related PR: https://github.com/senaite/senaite.sync/pull/12
Note: This PR has a lot of commits because I tried so many different things to get the settings before finding a way I was satisfied with.
Description of the issue/feature this PR addresses
Provide a route for querying general settings of a running instance through the JSON API.
Current behavior before PR
There is not a route that allows to query the JSON API for general settings.
Desired behavior after PR is merged
It is possible to obtained the general settings with the routes:
/settings
, which will return all the settings./settings/<key>
, which will return only the settings associated to that key.Currently the availabe settings that can be queried are those that are defined under
plone.app.controlpanel
and implement an interface in the form ofISomethingSchema
. The returned settings will be those associated to the schemaISomethingSchema
With these restrictions the supported keywords are:-- I confirm I have tested this PR thoroughly and coded it according to PEP8 and Plone's Python styleguide standards.