Project

General

Profile

Bug #4750

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

Added by David Davis about 8 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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" 

History

#1 Updated by Mike McCune about 8 years ago

  • Triaged set to Yes

#2 Updated by Mike McCune about 8 years ago

  • Triaged deleted (Yes)

#3 Updated by Mike McCune about 8 years ago

  • Assignee set to David Davis
  • Triaged set to Yes

#4 Updated by Eric Helms over 6 years ago

  • Status changed from New to Resolved

V1 API has been removed

#5 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF