github swagger-samples - not finding swagger.json file












0















I posted the following question in the Swagger Google groups but have not gotten a response there.



=====================================================



Do swagger-samples generate swagger.json?



I'm guessing that the point of the swagger-samples example programs are to provide small REST implementations in which the swagger.json file is generated and you can view that using the SwaggerUI program. If not please tell me because I'm trying to learn how to annotate my JAX-RS based application and generate the OpenAPI spec so it can be viewed in the SwaggerUI.



I've run two examples: java-jersey2 and java-jersey-jaxrs.



Both compile and run fine (with Java 8). I use the command documented which is:



mvn package -Dlog4j.configuration=file:./conf/log4j.properties jetty:run



I open my browser to http://localhost:8002 and see the dialog box (see attached file) and that's it. I'm not sure where to go from there.



I've tried entering different values in the input fields, but the Explore link does nothing but refresh the page. I examined the javascript on the page to know this.



Separately, I've learned how the SwaggerUI works. I've also manually created a swagger.json file for one of the rest endpoints and verified it works using SwaggerUI but haven't (yet) figured out how to get the OpenAPI spec (aka swagger.json) file created from the annotations, so I'm getting to understand the pieces.



So two questions:




  1. Do these samples generate a Swagger.json file? If so where is it (I searched and didn't find it).


  2. If not, what are the next steps to generate that swagger.json file so that I could point to it in a SwaggerUI instance I'm running.



=====================================================



I can see that I'm not alone in my quest to create a swagger.json file using the open source solutions. Here are some other questions and resources that I've used:




  • Swagger and swagger.json location - is asking a similar question.


  • Swagger is not generating swagger.json


  • Getting Started with Swagger - Where I started to learn about swagger.


  • Swagger Core Jersey 2.X Project Setup - This is what I initially tried to get working. This may still be the best way to go (for what I'm trying to do). NOTE: In my case I'm trying to get the Jersey2 with swagger working using the swagger-maven-plugin but my question is really about the samples and are they supposed to work that way I explained.











share|improve this question



























    0















    I posted the following question in the Swagger Google groups but have not gotten a response there.



    =====================================================



    Do swagger-samples generate swagger.json?



    I'm guessing that the point of the swagger-samples example programs are to provide small REST implementations in which the swagger.json file is generated and you can view that using the SwaggerUI program. If not please tell me because I'm trying to learn how to annotate my JAX-RS based application and generate the OpenAPI spec so it can be viewed in the SwaggerUI.



    I've run two examples: java-jersey2 and java-jersey-jaxrs.



    Both compile and run fine (with Java 8). I use the command documented which is:



    mvn package -Dlog4j.configuration=file:./conf/log4j.properties jetty:run



    I open my browser to http://localhost:8002 and see the dialog box (see attached file) and that's it. I'm not sure where to go from there.



    I've tried entering different values in the input fields, but the Explore link does nothing but refresh the page. I examined the javascript on the page to know this.



    Separately, I've learned how the SwaggerUI works. I've also manually created a swagger.json file for one of the rest endpoints and verified it works using SwaggerUI but haven't (yet) figured out how to get the OpenAPI spec (aka swagger.json) file created from the annotations, so I'm getting to understand the pieces.



    So two questions:




    1. Do these samples generate a Swagger.json file? If so where is it (I searched and didn't find it).


    2. If not, what are the next steps to generate that swagger.json file so that I could point to it in a SwaggerUI instance I'm running.



    =====================================================



    I can see that I'm not alone in my quest to create a swagger.json file using the open source solutions. Here are some other questions and resources that I've used:




    • Swagger and swagger.json location - is asking a similar question.


    • Swagger is not generating swagger.json


    • Getting Started with Swagger - Where I started to learn about swagger.


    • Swagger Core Jersey 2.X Project Setup - This is what I initially tried to get working. This may still be the best way to go (for what I'm trying to do). NOTE: In my case I'm trying to get the Jersey2 with swagger working using the swagger-maven-plugin but my question is really about the samples and are they supposed to work that way I explained.











    share|improve this question

























      0












      0








      0








      I posted the following question in the Swagger Google groups but have not gotten a response there.



      =====================================================



      Do swagger-samples generate swagger.json?



      I'm guessing that the point of the swagger-samples example programs are to provide small REST implementations in which the swagger.json file is generated and you can view that using the SwaggerUI program. If not please tell me because I'm trying to learn how to annotate my JAX-RS based application and generate the OpenAPI spec so it can be viewed in the SwaggerUI.



      I've run two examples: java-jersey2 and java-jersey-jaxrs.



      Both compile and run fine (with Java 8). I use the command documented which is:



      mvn package -Dlog4j.configuration=file:./conf/log4j.properties jetty:run



      I open my browser to http://localhost:8002 and see the dialog box (see attached file) and that's it. I'm not sure where to go from there.



      I've tried entering different values in the input fields, but the Explore link does nothing but refresh the page. I examined the javascript on the page to know this.



      Separately, I've learned how the SwaggerUI works. I've also manually created a swagger.json file for one of the rest endpoints and verified it works using SwaggerUI but haven't (yet) figured out how to get the OpenAPI spec (aka swagger.json) file created from the annotations, so I'm getting to understand the pieces.



      So two questions:




      1. Do these samples generate a Swagger.json file? If so where is it (I searched and didn't find it).


      2. If not, what are the next steps to generate that swagger.json file so that I could point to it in a SwaggerUI instance I'm running.



      =====================================================



      I can see that I'm not alone in my quest to create a swagger.json file using the open source solutions. Here are some other questions and resources that I've used:




      • Swagger and swagger.json location - is asking a similar question.


      • Swagger is not generating swagger.json


      • Getting Started with Swagger - Where I started to learn about swagger.


      • Swagger Core Jersey 2.X Project Setup - This is what I initially tried to get working. This may still be the best way to go (for what I'm trying to do). NOTE: In my case I'm trying to get the Jersey2 with swagger working using the swagger-maven-plugin but my question is really about the samples and are they supposed to work that way I explained.











      share|improve this question














      I posted the following question in the Swagger Google groups but have not gotten a response there.



      =====================================================



      Do swagger-samples generate swagger.json?



      I'm guessing that the point of the swagger-samples example programs are to provide small REST implementations in which the swagger.json file is generated and you can view that using the SwaggerUI program. If not please tell me because I'm trying to learn how to annotate my JAX-RS based application and generate the OpenAPI spec so it can be viewed in the SwaggerUI.



      I've run two examples: java-jersey2 and java-jersey-jaxrs.



      Both compile and run fine (with Java 8). I use the command documented which is:



      mvn package -Dlog4j.configuration=file:./conf/log4j.properties jetty:run



      I open my browser to http://localhost:8002 and see the dialog box (see attached file) and that's it. I'm not sure where to go from there.



      I've tried entering different values in the input fields, but the Explore link does nothing but refresh the page. I examined the javascript on the page to know this.



      Separately, I've learned how the SwaggerUI works. I've also manually created a swagger.json file for one of the rest endpoints and verified it works using SwaggerUI but haven't (yet) figured out how to get the OpenAPI spec (aka swagger.json) file created from the annotations, so I'm getting to understand the pieces.



      So two questions:




      1. Do these samples generate a Swagger.json file? If so where is it (I searched and didn't find it).


      2. If not, what are the next steps to generate that swagger.json file so that I could point to it in a SwaggerUI instance I'm running.



      =====================================================



      I can see that I'm not alone in my quest to create a swagger.json file using the open source solutions. Here are some other questions and resources that I've used:




      • Swagger and swagger.json location - is asking a similar question.


      • Swagger is not generating swagger.json


      • Getting Started with Swagger - Where I started to learn about swagger.


      • Swagger Core Jersey 2.X Project Setup - This is what I initially tried to get working. This may still be the best way to go (for what I'm trying to do). NOTE: In my case I'm trying to get the Jersey2 with swagger working using the swagger-maven-plugin but my question is really about the samples and are they supposed to work that way I explained.








      swagger swagger-ui






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 '18 at 17:41









      PatSPatS

      79631122




      79631122
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53398608%2fgithub-swagger-samples-not-finding-swagger-json-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53398608%2fgithub-swagger-samples-not-finding-swagger-json-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          'app-layout' is not a known element: how to share Component with different Modules

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          WPF add header to Image with URL pettitions [duplicate]