Project

General

Profile

Actions

Bug #21582

closed

Installing Katello plugin breaks api v1

Added by Timo Goebel over 6 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
easy
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Installing Katello in an existing Foreman install, breaks the way the APIv1 results look:

Query:
curl https://foreman.example.com/api/v1/hosts

Without Katello:
[{"host":{"name":"host.example.com","id":23294,"hostgroup_id":null,"operatingsystem_id":45}}]

With Katello:
[{"name":"host.example.com","id":23294,"hostgroup_id":null,"operatingsystem_id":45}]

This is really bad. Installing a plugin should never, ever change the way the API results look.

The root cause for this is:
https://github.com/Katello/katello/blob/6aca54157e579d6312a9e4a49609df0ffa1685b1/config/initializers/rabl_init.rb#L13-L18

Actions

Also available in: Atom PDF