Closed mbredif closed 7 years ago
not really, it's more simple, i fixed it with 2de93b2
Not sure, with your fix, the platform_id
in the request uri (/platforms/<platform_id>/configs
) is not used at all...
The endpoint should not then be /configs
rather than /platforms/<platform_id>/configs
?
you're right, i've touched the wrong parameter... but we don't need platform_id as it stands in the URL -> branch updated
Now platform
shows up in /platforms/configs/<config_id>
but not in /platforms/<platform_id>/configs
The discrepancy comes from the marshalling in the latter case but not in the former
Do you want to shadow the platform as it is already passed by the user in the query or not ? My guess is you want to marshall in any case, and that you need to add the platform id to the model if you want to expose it.
no confusion for me, this is not the same endpoint, why do you need the platform id in /platforms/{id}/configs/ ? As you said, you have it in the request.
Ok, I got it. you'd rather minimize communication (do not return the platform id if it was known as part of the query) rather than uniform return values for endpoints returning configs (/platforms/configs/<config_id>
and /platforms/<platform_id>/configs
). Thanks for explaining !
@ldgeo, is that the correct way to fix #6 ?