You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "etienne canaud (JIRA)" <ji...@apache.org> on 2012/11/15 10:40:12 UTC

[jira] [Created] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

etienne canaud created WINK-372:
-----------------------------------

             Summary: Support for WADL Doc text content when using @WADLDoc annotation in Resource class
                 Key: WINK-372
                 URL: https://issues.apache.org/jira/browse/WINK-372
             Project: Wink
          Issue Type: Improvement
          Components: Server
    Affects Versions: 1.1.2, 1.1.3, 1.2
            Reporter: etienne canaud
            Priority: Trivial


Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).

It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."

However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.

You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:

{code:title= WADLGenerator.java|borderStyle=solid}

Doc getDocument(WADLDoc desc) {
        Doc d = new Doc();
        d.setTitle(desc.value());
        return d;
    }

{code}

This improvement could be implemented in (at least) two different ways:

1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).

2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.

Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 

I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507721#comment-13507721 ] 

Hudson commented on WINK-372:
-----------------------------

Integrated in Wink-Trunk-JDK1.5 #489 (See [https://builds.apache.org/job/Wink-Trunk-JDK1.5/489/])
    WINK-372 - Add Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Patch provided by Etienne Canaud (Revision 1415865)

     Result = FAILURE
lresende : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1415865
Files : 
* /incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/wadl/WADLDoc.java
* /incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/wadl/WADLGenerator.java
* /incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/wadl/WADLGeneratorTest.java

                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Assignee: Luciano Resende
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java, Wink-WadlDocContent.patch
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Etienne Canaud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498528#comment-13498528 ] 

Etienne Canaud commented on WINK-372:
-------------------------------------

Good pick on backward compatibility. 
One option is to keep the "value" element for the Doc title, and add an optional "content" element:

{code:title=WADLDoc.java|borderStyle=solid}
public @interface WADLDoc {
    String value();
    String content() default "";
}
{code}

Pros: Backward compatible with @WADLDoc("...") and @WADLDoc(value="...").
Cons: If both title and content are specified, the title has to be defined with the "value" element name, which is not very intuitive when reading code: @WADLDoc(value = "some title", content = "some content")

Any proposal for a better solution?
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Priority: Trivial
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Etienne Canaud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507122#comment-13507122 ] 

Etienne Canaud commented on WINK-372:
-------------------------------------

I did implement the feature.

I attached modified files (WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java). 
Since my code style templates in Eclipse might not match the guidelines of this project, some reformatting on modified code could be needed.

Quick summary of changes:

WADLDoc.java: Added "content" element with default "" value as described above.

WADLGenerator.java: modified #getDocument(WADLDoc desc) to add content.

WADLGeneratorTest.java: Edited Resource1 class to add content to one of the WADLDoc annotation, and added test for annotation with content element and annotation without content element in #testWADLDocResource1().

Result is that the annotation
@WADLDoc(value = "service title", content = "this is the service resource description")
will result in XML element
<doc title="service title">this is the service resource description</doc>

                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Priority: Trivial
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Etienne Canaud (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Etienne Canaud updated WINK-372:
--------------------------------

    Attachment: Wink-WadlDocContent.patch

Diff of the modifications. 
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Priority: Trivial
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java, Wink-WadlDocContent.patch
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Etienne Canaud (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Etienne Canaud updated WINK-372:
--------------------------------

    Attachment: WADLGeneratorTest.java
                WADLGenerator.java
                WADLDoc.java

Modified files. Summary of changes is in comment from Nov 30th.
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Priority: Trivial
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Luciano Resende (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498332#comment-13498332 ] 

Luciano Resende commented on WINK-372:
--------------------------------------

+1 for option 1. 

What about backward compatibility with code that already uses value for the current behavior ?
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Priority: Trivial
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Etienne Canaud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507122#comment-13507122 ] 

Etienne Canaud edited comment on WINK-372 at 11/30/12 6:03 AM:
---------------------------------------------------------------

I did implement the feature.

I attached modified files (WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java). 
Since my code style templates in Eclipse might not match the guidelines of this project, some reformatting on modified code could be needed.

Quick summary of changes:

WADLDoc.java: Added "content" element with default "" value as described above.

WADLGenerator.java: modified #getDocument(WADLDoc desc) to add content.

WADLGeneratorTest.java: Edited Resource1 class to add content to one of the WADLDoc annotation, and added test for annotation with content element and annotation without content element in #testWADLDocResource1().

Now, the annotation
@WADLDoc(value = "service title", content = "this is the service resource description")
will result in XML element
<doc title="service title">this is the service resource description</doc>

                
      was (Author: etiennec):
    I did implement the feature.

I attached modified files (WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java). 
Since my code style templates in Eclipse might not match the guidelines of this project, some reformatting on modified code could be needed.

Quick summary of changes:

WADLDoc.java: Added "content" element with default "" value as described above.

WADLGenerator.java: modified #getDocument(WADLDoc desc) to add content.

WADLGeneratorTest.java: Edited Resource1 class to add content to one of the WADLDoc annotation, and added test for annotation with content element and annotation without content element in #testWADLDocResource1().

Result is that the annotation
@WADLDoc(value = "service title", content = "this is the service resource description")
will result in XML element
<doc title="service title">this is the service resource description</doc>

                  
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Priority: Trivial
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java, Wink-WadlDocContent.patch
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Luciano Resende (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507904#comment-13507904 ] 

Luciano Resende commented on WINK-372:
--------------------------------------

The build seems to be ok locally, I need to investigate what is causing this truncated issue in CI build.
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Assignee: Luciano Resende
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java, Wink-WadlDocContent.patch
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Etienne Canaud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507903#comment-13507903 ] 

Etienne Canaud commented on WINK-372:
-------------------------------------

Failure seems unrelated with Patch contents:

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to load hudson.maven.reporters.Messages
Truncated class file
[INFO] ------------------------------------------------------------------------

Please confirm if there's anything I can do to help pass the build.
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Assignee: Luciano Resende
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java, Wink-WadlDocContent.patch
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WINK-372) Support for WADL Doc text content when using @WADLDoc annotation in Resource class

Posted by "Luciano Resende (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luciano Resende resolved WINK-372.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3
         Assignee: Luciano Resende

Patch applied, thanks.
                
> Support for WADL Doc text content when using @WADLDoc annotation in Resource class
> ----------------------------------------------------------------------------------
>
>                 Key: WINK-372
>                 URL: https://issues.apache.org/jira/browse/WINK-372
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1.2, 1.1.3, 1.2
>            Reporter: Etienne Canaud
>            Assignee: Luciano Resende
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: WADLDoc.java, WADLGenerator.java, WADLGeneratorTest.java, Wink-WadlDocContent.patch
>
>
> Support for WADL was added in Wink 1.1.2 in Wink #313 (https://issues.apache.org/jira/browse/WINK-313).
> It is stated that "You can document your resources, params, and request entities with @ WADLDoc to add some description."
> However, after some tests and a quick peek at the source code, it seems that the @ WADLDoc annotation only takes one string parameter (value), and this string will end up in the "title" of the WADL Doc element, while the content of the Doc will remain empty and can't be assigned using annotations.
> You can refer to line 768 of WADLGenerator.java, where there is no sign of the Doc content being set:
> {code:title= WADLGenerator.java|borderStyle=solid}
> Doc getDocument(WADLDoc desc) {
>         Doc d = new Doc();
>         d.setTitle(desc.value());
>         return d;
>     }
> {code}
> This improvement could be implemented in (at least) two different ways:
> 1) Add one element to WADLDoc annotation (i.e. instead of only value(), have title() and content()).
> 2) Rename WADLDoc annotation to WADLDocTitle and create a new WADLDocContent annotation, each having a single value() element. Both annotations would be used to create the Doc object when generating WADL.
> Doc content is supposed to be mixed content (i.e. it can hold some sub-elements) and my improvement request is only a half-baked implementation where only text content would be supported. 
> I could eventually work on a patch once the implementation details are specified if this improvement gets approved - still, changes should be pretty straightforward.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira