[openstreetmap/openstreetmap-website] Use an xml builder to generate the capabilities response (#2108)
Andy Allan
notifications at github.com
Wed Jan 9 14:14:16 UTC 2019
This PR uses an xml builder template to create the API capabilities response, rather than building the xml response 'by hand' in the controller. This makes the code easier to read, as well as more closely following the MVC conventions.
It also refactors the other builder-based XML responses to use the same set of root attributes (i.e. adding copyright, attribution and license attributes) as the other XML responses.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/2108
-- Commit Summary --
* Use full list of osm xml root attributes in builder templates
* Use a builder view for the capabilities call
-- File Changes --
M app/controllers/api_controller.rb (45)
A app/views/api/capabilities.builder (22)
M app/views/api/permissions.builder (2)
M app/views/notes/index.xml.builder (2)
M app/views/notes/show.xml.builder (2)
M app/views/users/api_read.builder (2)
M app/views/users/api_users.builder (2)
M lib/osm.rb (16)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/2108.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2108.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190109/34697021/attachment.html>
More information about the rails-dev
mailing list