Skip to content
  • David Pape's avatar
    Resolve "Restructure URL patterns" · 35a04ec7
    David Pape authored
    * Word order in search URLs
    
    * Remove typo; reformat
    
    * Apply 1 suggestion(s) to 1 file(s)
    
    * Mention API routers in integrate-new-module doc
    
    * {Best → Good} Practices
    
    * Add missing trailing slash in URL
    
    * Update CHANGELOG
    
    * Consolidate names of different Digital Object APIs
    
    * Add docs on URL conventions
    
    * Remove unused /project/dropdown-project-list/
    
    * Replace underscores in URLs with dashes
    
    * Gate API with gate/ rather than gate_
    
    * SMB API with smb/ rather than smb_
    
    * Remove empty line
    
    * Move TODOs into GitLab
    
    * Remove get_api_root(s); fix tests
    
    * Move api-new/ to api/
    
    * Establish conventions for URL patterns
    
    These are based on what was already there; just more thorough. ;-)
    
    In "application" URLs:
    
    - "objects" name in singular
    - list views: `/project/<pk>/<object>/list/`
    - detail views: `/project/<pk>/<object>/<pk>/`
    - update views: `/project/<pk>/<object>/<pk>/update/`
    - search views: `/search/<object>`
    
    In API routers:
    
    - plural prefix
    - plural basenames
    
    Exceptions to this are made where:
    
    - the singular version of a word is not as common/expected, e.g.
      - `/user/settings/`
    - the plural version of a word is not as common/expected, e.g.
      - `/api/auth/...`
      - `/api/sharelatex/...`
      - `/api/version_control/...`
    - the object described is a "singleton"
      - `/api/maintenance_message/`
    
    Other reasonable exceptions might exist.
    
    * Move core API router into api-new/
    
    * Rearrange API URLs under api-new/
    
    This does not include heliport.core yet.
    
    * Rearrange application URLs
    35a04ec7