Project

General

Profile

Actions

Bug #4750

closed

Can't use the url helpers in katello to get links for v2 api

Added by David Davis about 10 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Here's an example:

[32] foreman »  Katello::Engine.routes.url_helpers.api_activation_keys_path(:api_version => "v2")                                                                                                                                             
=> "/katello/api/activation_keys" 
[33] foreman »  Katello::Engine.routes.url_helpers.api_activation_keys_path(:api_version => "v1")                                                                                                                                             
=> "/katello/api/v1/activation_keys" 

Note that without v2, the link goes to the v1 api. I think this is because we're using the same namespace (api) both in v1 and v2 files. In foreman, this is working correctly. I think this is just because maybe it has a different load order or something:

[43] foreman »  Rails.application.routes.url_helpers.api_hostgroups_path(:apiv => "v2")                                                                                                                                                       
=> "/api/v2/hostgroups" 
[44] foreman »  Rails.application.routes.url_helpers.api_hostgroups_path(:apiv => "v1")                                                                                                                                                       
=> "/api/hostgroups" 
Actions #1

Updated by Mike McCune about 10 years ago

  • Triaged set to Yes
Actions #2

Updated by Mike McCune about 10 years ago

  • Triaged deleted (Yes)
Actions #3

Updated by Mike McCune about 10 years ago

  • Assignee set to David Davis
  • Triaged set to Yes
Actions #4

Updated by Eric Helms over 8 years ago

  • Status changed from New to Resolved

V1 API has been removed

Actions #5

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release set to 166
Actions

Also available in: Atom PDF