is there anyway in wso2 data services server register service exposes resource 2 methods same base url, 1 resources , other 1 specific resource. example:
- [http get] academics/courses: returns courses
- [http get] academics/courses/9789: returns course code 9789
for tried following configuration:
<data ...> ... <resource method="get" path="academics/courses"> <call-query href="getallcoursesquery"/> </resource> <resource method="get" path="academics/courses/{code}"> <call-query href="getcoursebycodequery"> <with-param name="coursecode" query-param="code"/> </call-query> </resource> ... </data> the problem when invoke method returns courses, error occurs indicating parameter missing, looks trying call method returns one.
in documentation suggested way use singular/plural this, think not best / correct way of doing this.
any ideia?
i'm afraid, limitation of dss @ moment, , cannot use same base url call 2 different queries, looking @ parameters. , mentioned, other approach use different resource paths map queries.
in upcoming release of dss, v3.1.0, functionality looking supported.
cheers, anjana.
Comments
Post a Comment