Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for v2 API and ping controller #3438

Closed
wants to merge 9 commits into from
Closed

updates for v2 API and ping controller #3438

wants to merge 9 commits into from

Conversation

komidore64
Copy link
Contributor

  • wrapped single-object responses with a root-node
  • make single-object response root-node optional
  • read http param for root-node name
  • ping action
  • other ping controller actions for v2

will be included in a separate PR that contains collection responses

  • wrapped collection responses with a root-node
  • collection response metadata

def respond_for_show(options = {})
respond_with_template_resource(options[:template] || 'show', controller_name, options)
end
COLLECTION_ROOT = "results"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why set the collection root here instead of directly in the template?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no particular reason. i can move.

@komidore64
Copy link
Contributor Author

going to use layouts instead of templates inside of templates.

layouts shouldn't break tests

these files were moved:
app/views/api/v2/common/collection_resource.json.rabl --> app/views/katello/api/v2/common/collection_resource.json.rabl
app/views/api/v2/common/single_resource.json.rabl --> app/views/katello/api/v2/common/single_resource.json.rabl
also included is optional root-node for single resource responses

Conflicts:
	app/controllers/katello/api/v2/api_controller.rb
@komidore64
Copy link
Contributor Author

closing due to merge of engine branch into master

PR continued in #3462.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants