For anyone wondering - the answer was to use the following: > > pathPrefix( > PathMatchers > .segment(PATH_V1) > .slash(PATH_ORDERS) > .slash(PATH_PARAM_UUID), > orderId -> pathPrefix( > PathMatchers > .segment(PATH_MAJOR_VERSION) > .slash(PATH_PARAM_MAJOR_VERSION) > .slash(PATH_MINOR_VERSION) > .slash(PATH_PARAM_MINOR_VERSION)
This only made sense to me after someone happened to randomly show me their Spray API from a while back :) Having never used Spray in Scala I've found it quite difficult to guess what you can do where. Thanks kindly, Daniel Stoner On 24 May 2016 at 14:50, Daniel Stoner <[email protected]> wrote: > PathDirectives has path(PathMatcher1... and path(PathMatcher2... but no > path(PathMatcher3 or onwards. > > I get that there has to be a limit at some point for people who want 52 > variables in their URLs - but Is there some alternative way I am supposed > to write the equivalent of this code which matches a URL > of the form v1/orders/<uuid>/major/<integer>/minor/<integer> > > path( >> PathMatchers >> .segment(PATH_V1) >> .slash(PATH_ORDERS) >> .slash(PATH_PARAM_UUID) >> .slash(PATH_MAJOR_VERSION) >> .slash(PATH_PARAM_MAJOR_VERSION) >> .slash(PATH_MINOR_VERSION) >> .slash(PATH_PARAM_MINOR_VERSION), >> (orderId, majorVersion, minorVersion)-> doSomeBusinessThing > > > > Thanks in advance! > Daniel Stoner > > -- > Daniel Stoner | Senior Software Engineer UtopiaIT | Ocado Technology > [email protected] | Ext 7969 | www.ocadotechnology.com > > -- Daniel Stoner | Senior Software Engineer UtopiaIT | Ocado Technology [email protected] | Ext 7969 | www.ocadotechnology.com -- Notice: This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Fetch and Sizzle are trading names of Speciality Stores Limited, a member of the Ocado Group. References to the “Ocado Group” are to Ocado Group plc (registered in England and Wales with number 7098618) and its subsidiary undertakings (as that expression is defined in the Companies Act 2006) from time to time. The registered office of Ocado Group plc is Titan Court, 3 Bishops Square, Hatfield Business Park, Hatfield, Herts. AL10 9NE. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
