You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Attila Doroszlai <ad...@hortonworks.com> on 2017/04/13 13:48:54 UTC

Review Request 58356: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58356/
-----------------------------------------------------------

Review request for Ambari, Bal�zs Bence S�ri, Jaimin Jetly, Jayush Luniya, Oliver Szabo, Sumit Mohanty, and Sebastian Toader.


Bugs: AMBARI-20735
    https://issues.apache.org/jira/browse/AMBARI-20735


Repository: ambari


Description
-------

Created checkstyle check to ensure either @ApiOperation or @ApiIgnore is present on all REST API methods


Diffs
-----

  ambari-server/checkstyle.xml bf7698dddd760ac8ddba1d692bcd448c19d939dc 
  ambari-server/pom.xml fbc2b9fd129dca0828624fe76e33616b6919f429 
  ambari-server/src/main/assemblies/server.xml 27835265f78a3a7aed37eaa544e25679eee8b400 
  utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java PRE-CREATION 
  utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java PRE-CREATION 
  utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java PRE-CREATION 
  utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java PRE-CREATION 


Diff: https://reviews.apache.org/r/58356/diff/1/


Testing
-------

Includes unit test for the new check.
Also ran the check on ambari-server: produces 315 errors.


Thanks,

Attila Doroszlai


Re: Review Request 58356: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

Posted by Jayush Luniya <jl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58356/#review171939
-----------------------------------------------------------


Ship it!




Ship It!

- Jayush Luniya


On April 13, 2017, 3:44 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58356/
> -----------------------------------------------------------
> 
> (Updated April 13, 2017, 3:44 p.m.)
> 
> 
> Review request for Ambari, Bal�zs Bence S�ri, Jaimin Jetly, Jayush Luniya, Oliver Szabo, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-20735
>     https://issues.apache.org/jira/browse/AMBARI-20735
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Created checkstyle check to ensure either @ApiOperation or @ApiIgnore is present on all REST API methods
> 
> 
> Diffs
> -----
> 
>   ambari-server/checkstyle.xml bf7698dddd760ac8ddba1d692bcd448c19d939dc 
>   ambari-server/pom.xml fbc2b9fd129dca0828624fe76e33616b6919f429 
>   ambari-server/src/main/assemblies/server.xml 27835265f78a3a7aed37eaa544e25679eee8b400 
>   utility/checkstyle.xml PRE-CREATION 
>   utility/pom.xml 6f602068ca863fd99d537b88462487d9f28e9c6d 
>   utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java PRE-CREATION 
>   utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java PRE-CREATION 
>   utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java 14d74867b81d58a35e732940ccb16f02d4e9b317 
>   utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java PRE-CREATION 
>   utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/58356/diff/2/
> 
> 
> Testing
> -------
> 
> Includes unit test for the new check.
> Also ran the check on ambari-server: produces 315 errors.
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>


Re: Review Request 58356: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

Posted by Jaimin Jetly <ja...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58356/#review171884
-----------------------------------------------------------


Ship it!




Ship It!

- Jaimin Jetly


On April 13, 2017, 3:44 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58356/
> -----------------------------------------------------------
> 
> (Updated April 13, 2017, 3:44 p.m.)
> 
> 
> Review request for Ambari, Bal�zs Bence S�ri, Jaimin Jetly, Jayush Luniya, Oliver Szabo, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-20735
>     https://issues.apache.org/jira/browse/AMBARI-20735
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Created checkstyle check to ensure either @ApiOperation or @ApiIgnore is present on all REST API methods
> 
> 
> Diffs
> -----
> 
>   ambari-server/checkstyle.xml bf7698dddd760ac8ddba1d692bcd448c19d939dc 
>   ambari-server/pom.xml fbc2b9fd129dca0828624fe76e33616b6919f429 
>   ambari-server/src/main/assemblies/server.xml 27835265f78a3a7aed37eaa544e25679eee8b400 
>   utility/checkstyle.xml PRE-CREATION 
>   utility/pom.xml 6f602068ca863fd99d537b88462487d9f28e9c6d 
>   utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java PRE-CREATION 
>   utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java PRE-CREATION 
>   utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java 14d74867b81d58a35e732940ccb16f02d4e9b317 
>   utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java PRE-CREATION 
>   utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/58356/diff/2/
> 
> 
> Testing
> -------
> 
> Includes unit test for the new check.
> Also ran the check on ambari-server: produces 315 errors.
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>


Re: Review Request 58356: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

Posted by Sebastian Toader <st...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58356/#review171882
-----------------------------------------------------------


Ship it!




Ship It!

- Sebastian Toader


On April 13, 2017, 5:44 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58356/
> -----------------------------------------------------------
> 
> (Updated April 13, 2017, 5:44 p.m.)
> 
> 
> Review request for Ambari, Bal�zs Bence S�ri, Jaimin Jetly, Jayush Luniya, Oliver Szabo, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-20735
>     https://issues.apache.org/jira/browse/AMBARI-20735
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Created checkstyle check to ensure either @ApiOperation or @ApiIgnore is present on all REST API methods
> 
> 
> Diffs
> -----
> 
>   ambari-server/checkstyle.xml bf7698dddd760ac8ddba1d692bcd448c19d939dc 
>   ambari-server/pom.xml fbc2b9fd129dca0828624fe76e33616b6919f429 
>   ambari-server/src/main/assemblies/server.xml 27835265f78a3a7aed37eaa544e25679eee8b400 
>   utility/checkstyle.xml PRE-CREATION 
>   utility/pom.xml 6f602068ca863fd99d537b88462487d9f28e9c6d 
>   utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java PRE-CREATION 
>   utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java PRE-CREATION 
>   utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java 14d74867b81d58a35e732940ccb16f02d4e9b317 
>   utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java PRE-CREATION 
>   utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/58356/diff/2/
> 
> 
> Testing
> -------
> 
> Includes unit test for the new check.
> Also ran the check on ambari-server: produces 315 errors.
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>


Re: Review Request 58356: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

Posted by Attila Doroszlai <ad...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58356/
-----------------------------------------------------------

(Updated April 13, 2017, 5:44 p.m.)


Review request for Ambari, Bal�zs Bence S�ri, Jaimin Jetly, Jayush Luniya, Oliver Szabo, Sumit Mohanty, and Sebastian Toader.


Changes
-------

* Use `ImmutableSet.of` as suggested
* Remove unused imports
* Apply style checks to `utility` module


Bugs: AMBARI-20735
    https://issues.apache.org/jira/browse/AMBARI-20735


Repository: ambari


Description
-------

Created checkstyle check to ensure either @ApiOperation or @ApiIgnore is present on all REST API methods


Diffs (updated)
-----

  ambari-server/checkstyle.xml bf7698dddd760ac8ddba1d692bcd448c19d939dc 
  ambari-server/pom.xml fbc2b9fd129dca0828624fe76e33616b6919f429 
  ambari-server/src/main/assemblies/server.xml 27835265f78a3a7aed37eaa544e25679eee8b400 
  utility/checkstyle.xml PRE-CREATION 
  utility/pom.xml 6f602068ca863fd99d537b88462487d9f28e9c6d 
  utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java PRE-CREATION 
  utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java PRE-CREATION 
  utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java 14d74867b81d58a35e732940ccb16f02d4e9b317 
  utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java PRE-CREATION 
  utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java PRE-CREATION 


Diff: https://reviews.apache.org/r/58356/diff/2/

Changes: https://reviews.apache.org/r/58356/diff/1-2/


Testing
-------

Includes unit test for the new check.
Also ran the check on ambari-server: produces 315 errors.


Thanks,

Attila Doroszlai


Re: Review Request 58356: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

Posted by Sebastian Toader <st...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58356/#review171877
-----------------------------------------------------------




utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java
Lines 36 (patched)
<https://reviews.apache.org/r/58356/#comment244875>

    You could use here ImmutableSet.of()


- Sebastian Toader


On April 13, 2017, 3:48 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58356/
> -----------------------------------------------------------
> 
> (Updated April 13, 2017, 3:48 p.m.)
> 
> 
> Review request for Ambari, Bal�zs Bence S�ri, Jaimin Jetly, Jayush Luniya, Oliver Szabo, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-20735
>     https://issues.apache.org/jira/browse/AMBARI-20735
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Created checkstyle check to ensure either @ApiOperation or @ApiIgnore is present on all REST API methods
> 
> 
> Diffs
> -----
> 
>   ambari-server/checkstyle.xml bf7698dddd760ac8ddba1d692bcd448c19d939dc 
>   ambari-server/pom.xml fbc2b9fd129dca0828624fe76e33616b6919f429 
>   ambari-server/src/main/assemblies/server.xml 27835265f78a3a7aed37eaa544e25679eee8b400 
>   utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java PRE-CREATION 
>   utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java PRE-CREATION 
>   utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java PRE-CREATION 
>   utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/58356/diff/1/
> 
> 
> Testing
> -------
> 
> Includes unit test for the new check.
> Also ran the check on ambari-server: produces 315 errors.
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>