I have a requirement to design this spec using RAML:
Resource: quantity
Method: GET
URL: {orderId}/{itemId}/quantity
Objective is to pass orderId and itemId in the URI and get quantity. I am designing it this way:
/{orderId}/{itemId}/quantity:
get:
Is it a best practice to design resource this way or there have a better way?
Something like this will be a bit more RESTful by providing the relationship between your orders and items as collections and individual data:
quantity
should be a field in the response body.