-
Notifications
You must be signed in to change notification settings - Fork 897
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
Render links with compressed ids #15659
Render links with compressed ids #15659
Conversation
d4b3b5b
to
297ca7a
Compare
@@ -195,7 +199,7 @@ | |||
expect do | |||
run_post("#{service_orders_url("cart")}/service_requests", | |||
:action => :add, | |||
:resources => [{:service_template_href => service_templates_url(service_template.id)}]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not have been changed, keeping inbound post as is.
looks good, the one POST to change to same input, also where specs redefine compressed url's in the expectation, might be nice to declare those similarly to their uncompressed counterparts, i.e. vm1_url and vm1_compress_url. |
297ca7a
to
71a4054
Compare
we also need the href_slugs compressed for consistency, I think both methods in lib/api/utils.rb need updating. |
bf9cd15
to
46828d9
Compare
@abellotti took care of those concerns, but I think the might be nice part I'll leave for a follow up? With a big change like this I think I prefer seeing what changed directly even if it makes things a bit more verbose |
Thanks @imtayadeway for the update. can I bother you for one additional test in spec/lib/api/utils_spec.rb so we test fetching with resource_search_by_href_slug with both id and compressed id ? |
46828d9
to
195530a
Compare
Checked commits imtayadeway/manageiq@4b46873~...195530a with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/controllers/api/base_controller/renderer.rb
|
Thanks @imtayadeway for updating this. 🎼 I'll go ahead and merge this. Let's sync up you, myself and @jntullo once in the repo regarding the nice part. We can take a single spec example that uses both ways (let defined *_url for requests and generated compressed url for the responses) and find a consistent/elegant signature for both before we update them all. Thanks. |
@miq-bot add-label api, enhancement
@miq-bot assign @abellotti