Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: jaxrs
    • Labels:
      None
    • Environment:

      Any

      Description

      By scanning javax.ws.rs.* annotation it should be relatively easy for RESTeasy to generate WADL resource in run-time.

      https://wadl.dev.java.net/
      http://en.wikipedia.org/wiki/Web_Application_Description_Language

        Gliffy Diagrams

          Activity

          Hide
          carlosecardoso Carlos Cardoso added a comment -

          Another #vote for wadl generation. We are using at this time WildFly 8 with RestEasy. We have REST services and that we have to document and make available to the community. It was very important that this implementation was made. Thank you

          Show
          carlosecardoso Carlos Cardoso added a comment - Another #vote for wadl generation. We are using at this time WildFly 8 with RestEasy. We have REST services and that we have to document and make available to the community. It was very important that this implementation was made. Thank you
          Hide
          martin.goulet Martin Goulet added a comment -

          +1 in the vote bucket!

          Show
          martin.goulet Martin Goulet added a comment - +1 in the vote bucket!
          Hide
          stuart_wildcat Stuart Smith added a comment -

          Another vote for this issue. This is the #1 issue (by a long shot) from the community in terms of votes and in terms of # of people watching. It would be great if RESTEasy could add the #1 requested feature of users.

          I understand there is a big debate over if having WADL is too formal for REST services or if you are doing REST "right" by having it. Why make this decision for users? Provide the feature and both camps can use it or not use it as they see fit.

          For me, the thing that tips the balance in favor of having this feature is the support of testing tools to read the WADL of a REST service and be able to stub out at least a starting point for test cases. Not needing to build test cases from complete scratch is a huge benefit.

          Show
          stuart_wildcat Stuart Smith added a comment - Another vote for this issue. This is the #1 issue (by a long shot) from the community in terms of votes and in terms of # of people watching. It would be great if RESTEasy could add the #1 requested feature of users. I understand there is a big debate over if having WADL is too formal for REST services or if you are doing REST "right" by having it. Why make this decision for users? Provide the feature and both camps can use it or not use it as they see fit. For me, the thing that tips the balance in favor of having this feature is the support of testing tools to read the WADL of a REST service and be able to stub out at least a starting point for test cases. Not needing to build test cases from complete scratch is a huge benefit.
          Hide
          machine_messiah Yuri Bondarenko added a comment -

          +1 vote

          Show
          machine_messiah Yuri Bondarenko added a comment - +1 vote
          Hide
          weinanli Weinan Li added a comment -

          Actually we can learn from Jersey how to implement this.

          In Jersey it registers a wadl resource by default: https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlResource.java#L72

          It uses JAXB Marshaller to convert WADL classes to XML: https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlResource.java#L116

          The WADL classes (https://github.com/jersey/jersey/tree/master/core-server/src/main/java/com/sun/research/ws/wadl) are generated from WADL xsd: http://www.w3.org/Submission/wadl/wadl.xsd

          To support the WadlResource, there is an WadlBuilder: https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlBuilder.java

          The whole implementation is not too big: https://github.com/jersey/jersey/tree/master/core-server/src/main/java/org/glassfish/jersey/server/wadl

          But it needs time to implement similar functions in RESTEasy. I'll try to find some time to start an initial draft implementation for RESTEasy anyway.

          Show
          weinanli Weinan Li added a comment - Actually we can learn from Jersey how to implement this. In Jersey it registers a wadl resource by default: https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlResource.java#L72 It uses JAXB Marshaller to convert WADL classes to XML: https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlResource.java#L116 The WADL classes ( https://github.com/jersey/jersey/tree/master/core-server/src/main/java/com/sun/research/ws/wadl ) are generated from WADL xsd: http://www.w3.org/Submission/wadl/wadl.xsd To support the WadlResource, there is an WadlBuilder: https://github.com/jersey/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlBuilder.java The whole implementation is not too big: https://github.com/jersey/jersey/tree/master/core-server/src/main/java/org/glassfish/jersey/server/wadl But it needs time to implement similar functions in RESTEasy. I'll try to find some time to start an initial draft implementation for RESTEasy anyway.

            People

            • Assignee:
              weinanli Weinan Li
              Reporter:
              yuriy_zubarev Yuriy ZUbarev
            • Votes:
              128 Vote for this issue
              Watchers:
              82 Start watching this issue

              Dates

              • Created:
                Updated:

                Development