wadl
  1. wadl
  2. WADL-32

Parent resources and headers inherited in contradiction to the spec

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: current
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      32

      Description

      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; }

        Activity

        Hide
        gdavison added a comment -

        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."

        Show
        gdavison added a comment - 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."
        Hide
        gdavison added a comment -

        Now consistent with the specification.

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

        Show
        gdavison added a comment - Now consistent with the specification. http://java.net/projects/wadl/sources/svn/revision/327

          People

          • Assignee:
            gdavison
            Reporter:
            nexj
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: