jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.61k stars 4.03k forks source link

Unable to access microservice via swagger #26543

Closed eapriansyah closed 4 months ago

eapriansyah commented 5 months ago
Overview of the issue

Cannot access microservices via swagger. The use cases are default React FE, Default GW, microservice with DB and microservice without DB. Service Discovery using Eureka

Appears in Jhipster Registry but not in Swagger definition

image

image

Motivation for or Use Case

Didn't happen before 8.5.0.

Reproduce the error

Install four applications by default using local docker. Access the swagger screen. Service definition not found.

Related issues
Suggest a Fix
JHipster Version(s)

8.5.0, 8.6.0

JHipster configuration
gw@0.0.1-SNAPSHOT D:\apps\projects\nappl\ntest\nfe
`-- generator-jhipster@8.4.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "gateway",
    "authenticationType": "oauth2",
    "baseName": "gw",
    "buildTool": "maven",
    "cacheProvider": "redis",
    "clientFramework": "react",
    "clientTestFrameworks": [],
    "clientTheme": "none",
    "creationTimestamp": 1708182900239,
    "databaseType": "no",
    "devDatabaseType": "no",
    "devServerPort": 9060,
    "enableGradleEnterprise": null,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [],
    "feignClient": false,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.4.0",
    "languages": [
      "en",
      "id"
    ],
    "messageBroker": false,
    "nativeLanguage": "en",
    "packageName": "id.atiila",
    "prodDatabaseType": "no",
    "reactive": true,
    "searchEngine": false,
    "serverPort": "8110",
    "serverSideOptions": [],
    "serviceDiscoveryType": "eureka",
    "skipServer": true,
    "skipUserManagement": false,
    "testFrameworks": [],
    "websocket": false
  }
}
Environment and Tools

java version "21.0.1" 2023-10-17 Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

git version 2.33.0.windows.2

node: v20.11.1 npm: 10.2.4

Docker version 26.0.0, build 2ae903e

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions


gw@0.0.0 D:\apps\projects\nappl\ntest\ngw
`-- generator-jhipster@8.6.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "gateway",
    "authenticationType": "oauth2",
    "baseName": "gw",
    "buildTool": "maven",
    "cacheProvider": "redis",
    "creationTimestamp": 1708182900239,
    "databaseType": "no",
    "devDatabaseType": "no",
    "enableGradleEnterprise": null,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [],
    "feignClient": false,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.6.0",
    "languages": [
      "en",
      "id"
    ],
    "messageBroker": false,
    "nativeLanguage": "en",
    "packageName": "id.atiila",
    "prodDatabaseType": "no",
    "reactive": true,
    "searchEngine": false,
    "serverPort": "8110",
    "serverSideOptions": [],
    "serviceDiscoveryType": "eureka",
    "skipClient": true,
    "skipUserManagement": true,
    "syncUserWithIdp": false,
    "testFrameworks": [],
    "websocket": false
  }
}
Environment and Tools

java version "21.0.1" 2023-10-17 Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

git version 2.33.0.windows.2

node: v20.11.1 npm: 10.2.4

Docker version 26.0.0, build 2ae903e

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions


service-los@0.0.0 D:\apps\projects\nappl\ntest\service-nlos
`-- generator-jhipster@8.6.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "microservice",
    "authenticationType": "oauth2",
    "baseName": "serviceLos",
    "buildTool": "maven",
    "cacheProvider": "redis",
    "creationTimestamp": 1708185015680,
    "databaseType": "no",
    "devDatabaseType": "no",
    "enableGradleEnterprise": null,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [],
    "feignClient": true,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.6.0",
    "languages": [
      "en",
      "id"
    ],
    "messageBroker": false,
    "nativeLanguage": "en",
    "packageName": "id.atiila",
    "prodDatabaseType": "no",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8741",
    "serverSideOptions": [],
    "serviceDiscoveryType": "eureka",
    "skipClient": true,
    "skipUserManagement": true,
    "syncUserWithIdp": false,
    "testFrameworks": [],
    "websocket": false
  }
}
Environment and Tools

java version "21.0.1" 2023-10-17 Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

git version 2.33.0.windows.2

node: v20.11.1 npm: 10.2.4

Docker version 26.0.0, build 2ae903e

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions


central@0.0.0 D:\apps\projects\nappl\ntest\ncentral
`-- generator-jhipster@8.6.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "microservice",
    "authenticationType": "oauth2",
    "baseName": "central",
    "buildTool": "maven",
    "cacheProvider": "redis",
    "creationTimestamp": 1711377672657,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "enableGradleEnterprise": null,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [],
    "feignClient": true,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.6.0",
    "languages": [
      "en",
      "id"
    ],
    "lastLiquibaseTimestamp": 1711380522000,
    "messageBroker": false,
    "nativeLanguage": "en",
    "packageName": "id.atiila",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8111",
    "serverSideOptions": [],
    "serviceDiscoveryType": "eureka",
    "skipClient": true,
    "skipUserManagement": true,
    "syncUserWithIdp": false,
    "testFrameworks": [],
    "websocket": false
  }
}
Environment and Tools

java version "21.0.1" 2023-10-17 Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

git version 2.33.0.windows.2

node: v20.11.1 npm: 10.2.4

Docker version 26.0.0, build 2ae903e

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
mshima commented 5 months ago

Swagger endpoints are scanned at runtime by the UI. So check your browser console and network history, it may have information about the error.

eapriansyah commented 5 months ago

Sorry, late response.

The browser is in incognito mode. Results when logged in, image

Gateway screen image

Admin Docs screen. image

The following problems were detected..

image