Closed andytrujillorivero closed 10 months ago
@mshima Do you recall fixing something like this recently? I saw this error in native mode.
@mraible fails to load the swagger ui or just the log? The discovery logic was moved from the server to the client. The error on the console is normal because it try and catch. I’ve added error handling at https://github.com/jhipster/generator-jhipster/issues/17531, I suppose it’s not related to discovery process.
The failure to show the api may be related to the openapi generator not been updated to oas3 https://github.com/jhipster/generator-jhipster/issues/17790.
PS: Would be nice to drop the discovery process in favor of spring-doc advertising to service discovery it’s api groups. Maybe be a good candidate for https://github.com/jhipster/generator-jhipster/issues/17641
We need to simply ignore consul. Something like this, should do the job:
Hi Community,
this issue is not new or at least this behavior has shown before: https://github.com/jhipster/generator-jhipster/issues/17531 https://github.com/jhipster/generator-jhipster/issues/17489
Although both issues have been closed, for me it was never resolved until I tried JHipster Registry Release v7.3.0 as of today.
Regards Henry
@andytrujillorivero Can you please provide the steps to reproduce this issue. Does it still happen with JHipster 7.7?
Thank you all for your comments on this issue! @pascalgrimaud's suggestion prevents the error to be shown, but still no gateway endpoints are listed in swagger. @mraible, I upgraded to JHispter 7.7 and tried again same steps from initial post (new gateway app, consul, OAuth 2.0, Postgres...). I got same result when trying to list gateway API endpoints in swagger: "No API definition provided". Microservices endpoints do list correctly in swagger. Same behavior using JHipster Registry 7.3.0.
BTW, JHipster is a great project. Congratulations!!
This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days
Overview of the issue
After upgrading a JHipster gateway project from version 7.1.0 to 7.6.0, endpoints in swagger page are not properly listed. Using Consul discovery service. Console shows an error trying to reach
GET "/services/consul/management/jhiopenapigroups"
endpoint. Same result with a new project, created from scratch.Motivation for or Use Case
This did not happen before. Microservices endpoints do list OK in swagger, but not gateway ones. Error is shown in console with every access to administration's API page.
Reproduce the error
1- Generate a new JHipster gateway application with these options:
2- Start docker images 3- Log in at localhost:8080 with JHipster's default Keycloak admin credentials 4- Go to Administration / API in top right menu. 5- Check for errors in gateway logs, and browser console.
Related issues
Probably related, although it is for JHipster Registry and monolitic application: https://github.com/jhipster/generator-jhipster/issues/17531
Suggest a Fix
Handle access to
GET "/services/consul/management/jhiopenapigroups"
JHipster Version(s)
7.6.0
JHipster configuration
yo-rc.json
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
macOS 11.4
Safari 14.1.1
Firefox 96.0.3
[x] Checking this box is mandatory (this is just to show you read everything)