You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "sullis (via GitHub)" <gi...@apache.org> on 2024/03/29 14:41:10 UTC

[PR] validate swagger endpoints [pinot]

sullis opened a new pull request, #12750:
URL: https://github.com/apache/pinot/pull/12750

   - validate swagger json endpoint
   - validate swagger yaml endpoint
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] validate swagger endpoints [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #12750:
URL: https://github.com/apache/pinot/pull/12750#discussion_r1547318510


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/AdminConsoleIntegrationTest.java:
##########
@@ -90,4 +91,29 @@ public void testApiHelp()
     response = sendGetRequest(serverBaseApiUrl + "/api");
     Assert.assertEquals(response, expected);
   }
+
+  @Test(dataProvider = "endpointBase")
+  public void testSwaggerYaml(final String description, final String endpointBase)
+      throws Exception {
+    String response = sendGetRequest(endpointBase + "/swagger.yaml");
+    Assert.assertTrue(response.startsWith("---\nswagger: \"2.0\""));
+  }
+
+  @Test(dataProvider = "endpointBase")
+  public void testSwaggerJson(final String description, final String endpointBase)
+      throws Exception {
+    String response = sendGetRequest(endpointBase + "/swagger.json");
+    Assert.assertTrue(response.startsWith("{\"swagger\":\"2.0\""));
+    Assert.assertTrue(response.endsWith("}"));
+  }
+
+  @DataProvider
+  public Object[][] endpointBase() {
+    return new Object[][]{

Review Comment:
   (format) Please reformat this part



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] validate swagger endpoints [pinot]

Posted by "sullis (via GitHub)" <gi...@apache.org>.
sullis commented on PR #12750:
URL: https://github.com/apache/pinot/pull/12750#issuecomment-2033257882

   ready to merge 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] validate swagger endpoints [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #12750:
URL: https://github.com/apache/pinot/pull/12750


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] validate swagger endpoints [pinot]

Posted by "sullis (via GitHub)" <gi...@apache.org>.
sullis commented on code in PR #12750:
URL: https://github.com/apache/pinot/pull/12750#discussion_r1547698734


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/AdminConsoleIntegrationTest.java:
##########
@@ -90,4 +91,29 @@ public void testApiHelp()
     response = sendGetRequest(serverBaseApiUrl + "/api");
     Assert.assertEquals(response, expected);
   }
+
+  @Test(dataProvider = "endpointBase")
+  public void testSwaggerYaml(final String description, final String endpointBase)
+      throws Exception {
+    String response = sendGetRequest(endpointBase + "/swagger.yaml");
+    Assert.assertTrue(response.startsWith("---\nswagger: \"2.0\""));
+  }
+
+  @Test(dataProvider = "endpointBase")
+  public void testSwaggerJson(final String description, final String endpointBase)
+      throws Exception {
+    String response = sendGetRequest(endpointBase + "/swagger.json");
+    Assert.assertTrue(response.startsWith("{\"swagger\":\"2.0\""));
+    Assert.assertTrue(response.endsWith("}"));
+  }
+
+  @DataProvider
+  public Object[][] endpointBase() {
+    return new Object[][]{

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] validate swagger endpoints [pinot]

Posted by "sullis (via GitHub)" <gi...@apache.org>.
sullis commented on PR #12750:
URL: https://github.com/apache/pinot/pull/12750#issuecomment-2036006298

   @Jackie-Jiang ready to merge 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] validate swagger endpoints [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #12750:
URL: https://github.com/apache/pinot/pull/12750#issuecomment-2030951981

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/12750?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 34.41%. Comparing base [(`59551e4`)](https://app.codecov.io/gh/apache/pinot/commit/59551e45224f1535c4863fd577622b37366ccc97?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`fd001c5`)](https://app.codecov.io/gh/apache/pinot/pull/12750?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 192 commits behind head on master.
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #12750       +/-   ##
   =============================================
   - Coverage     61.75%   34.41%   -27.34%     
   + Complexity      207        6      -201     
   =============================================
     Files          2436     2388       -48     
     Lines        133233   131101     -2132     
     Branches      20636    20272      -364     
   =============================================
   - Hits          82274    45121    -37153     
   - Misses        44911    82640    +37729     
   + Partials       6048     3340     -2708     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <ø> (-0.01%)` | :arrow_down: |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <ø> (-0.01%)` | :arrow_down: |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (-61.71%)` | :arrow_down: |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.41% <ø> (-27.21%)` | :arrow_down: |
   | [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.41% <ø> (-27.34%)` | :arrow_down: |
   | [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (-27.73%)` | :arrow_down: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.41% <ø> (-27.34%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `45.97% <ø> (-15.77%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `45.97% <ø> (-0.92%)` | :arrow_down: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/12750/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/12750?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org