Ticket #1106 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Bugs related to routes arising from API refactor + removal of default routes

Reported by: rgrp Owned by: rgrp
Priority: blocker Milestone: ckan-v1.4-sprint-6
Component: ckan Keywords:
Cc: kindly Repository: ckan
Theme: none

Description

Various bugs I've been encountering:

Latter issue was masked by existence of 'default' routes:

   map.connect('/{controller}', action='index')
   map.connect('/:controller/{action}')
   map.connect('/{controller}/{action}/{id}')

Having these is, I think, bad practice as it is better to be explicit and we should therefore remove asap.

In addition I think we should be cautious about 'default' routes in core such as:

    map.connect('/api/rest/:register', controller='api', action='list',
        conditions=dict(method=['GET'])
        )

As it makes it harder for extensions to introduce their own APIs (here one could perhaps add something at /api/rest/{my-object} but only by using before_map rather than after_map).

Change History

comment:1 Changed 3 years ago by rgrp

  • Status changed from new to closed
  • Resolution set to fixed

fixed in branch:defect-1106-bugs-with-routing.

Note: See TracTickets for help on using tickets.