RogerioLSantos
Mission Specialist
Mission Specialist
  • 1,231 Views

D0378 - Source Code

Jump to solution

Hi guys,  did you try to execute this example? https://github.com/RedHatTraining/DO378-apps/tree/master/expense-restful-service on a local laptop? I tried, but the swagger-ui didn't work.

The resources yes, but when I call the swagger URL I receive the message "Resource not found" 

Labels (1)
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
viksharm
Cadet
Cadet
  • 1,185 Views

@RogerioLSantos 

Okay, I see the issue.

I see someone raised the same issue as a defect in GitHub which occur to some of the users when quarkus application start with dev mode like: mvn quarkus:dev and access swagger like this: http://localhost:8080/q/swagger-ui/.

Location of swagger api where it contains the index.html after running in quarkus:dev mode not having all the required resources to load the content. AFAIK, 404 means here that page is blank without any content.

But, if you will scroll down the page, you will see Additional endpoints section where /swagger-ui/ endpoint listed. Click on this and it will take you to the list of swagger endpoints which is actually the url which I pasted in my previous comment (http://localhost:8080/swagger-ui/). So, this will not actually block you to test.

Happy learning.

Thanks!
Vikas Sharma

View solution in original post

0 Kudos
5 Replies
vikassharma
Mission Specialist
Mission Specialist
  • 1,207 Views

Hi Rogerio,

Can you specify what URL you're trying to access the swagger?

Thanks!
Vikas Sharma

0 Kudos
vikassharma
Mission Specialist
Mission Specialist
  • 1,205 Views

Try this: http://localhost:8080/swagger-ui/

It's working for me.

Thanks!

Vikas Sharma

0 Kudos
RogerioLSantos
Mission Specialist
Mission Specialist
  • 1,189 Views

I tried this URL  http://localhost:8080/swagger-ui/  

Captura de tela de 2022-02-04 09-05-44.png

0 Kudos
viksharm
Cadet
Cadet
  • 1,186 Views

@RogerioLSantos 

Okay, I see the issue.

I see someone raised the same issue as a defect in GitHub which occur to some of the users when quarkus application start with dev mode like: mvn quarkus:dev and access swagger like this: http://localhost:8080/q/swagger-ui/.

Location of swagger api where it contains the index.html after running in quarkus:dev mode not having all the required resources to load the content. AFAIK, 404 means here that page is blank without any content.

But, if you will scroll down the page, you will see Additional endpoints section where /swagger-ui/ endpoint listed. Click on this and it will take you to the list of swagger endpoints which is actually the url which I pasted in my previous comment (http://localhost:8080/swagger-ui/). So, this will not actually block you to test.

Happy learning.

Thanks!
Vikas Sharma

0 Kudos
RogerioLSantos
Mission Specialist
Mission Specialist
  • 1,178 Views

@viksharm you are right. I found the endpoint http://localhost:8080/q/swagger-ui/ and it works. Tks for your support.

 

Captura de tela de 2022-02-04 09-39-09.png

0 Kudos
Join the discussion
You must log in to join this conversation.