Issue Details (XML | Word | Printable)

Key: WADL-32
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: gdavison
Reporter: nexj
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
wadl

Parent resources and headers inherited in contradiction to the spec

Created: 07/Jul/10 06:44 AM   Updated: 16/Mar/12 03:21 PM   Resolved: 16/Mar/12 03:21 PM
Component/s: www
Affects Version/s: current
Fix Version/s: current

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 32
Tags:
Participants: gdavison and nexj


 Description  « Hide

Parent resources and headers inherited in contradiction to the spec.

Patch:
— wadl-core/src/main/java/org/jvnet/ws/wadl2java/ast/ResourceNode.java Sun Jan
18 23:14:16 1970
+++ wadl-core/src/main/java/org/jvnet/ws/wadl2java/ast/ResourceNode.java Sun Jan
18 23:14:16 1970
@@ -195,8 +195,7 @@
public List<Param> getQueryParams() { ArrayList<Param> completeList = new ArrayList<Param>(); completeList.addAll(getPathSegment().getQueryParameters()); - if (getParentResource() != null) - completeList.addAll(getParentResource().getQueryParams()); + // The spec explicitly forbids inheritance of query parameters @see "Resource" section return completeList; }

@@ -207,8 +206,7 @@
public List<Param> getHeaderParams() { ArrayList<Param> completeList = new ArrayList<Param>(); completeList.addAll(getPathSegment().getHeaderParameters()); - if (getParentResource() != null) - completeList.addAll(getParentResource().getHeaderParams()); + // The spec explicitly forbids inheritance of header parameters @see "Resource" section return completeList; }



gdavison added a comment - 09/Mar/12 09:40 AM

The WADL spec explicitly exclude this in section 2.6, http://www.w3.org/Submission/wadl/#x3-120002.6

"Zero or more resource elements that describe sub-resources. Such sub-resources inherit matrix and template parameters from the parent resource since their URI is relative to that of the parent resource but they do not inherit query or header parameters specified globally for the parent resource."


gdavison added a comment - 16/Mar/12 03:21 PM

Now consistent with the specification.

http://java.net/projects/wadl/sources/svn/revision/327