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.57k stars 4.02k forks source link

I generate application with Jhipster 8.0.0-beta.2 and run with api-docs profile but doesnt appears host:port/v3/api-docs file #23264

Closed javachavez closed 1 year ago

javachavez commented 1 year ago
Overview of the issue

I generate application with Jhipster 8.0.0-beta.2 and run with api-docs profile but doesnt appears host:port/v3/api-docs file

Motivation for or Use Case

I need use swagger api

Reproduce the error
JHipster Version(s)

Jhipster 8.0.0-beta.2

JHipster configuration

jhipster info WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster. If you want to execute the locally installed generator-jhipster, run: npx jhipster

    ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
    ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
    ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝

██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v8.0.0-beta.2

Welcome to the JHipster Information Sub-Generator

establishment-catalog@0.0.0 C:\JIP\develop\BKN\establishment-catalog
`-- generator-jhipster@8.0.0-beta.1 invalid: "8.0.0-beta.2" from the root project
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "applicationType": "microservice",
  "authenticationType": "jwt",
  "baseName": "establishment-catalog",
  "buildTool": "maven",
  "cacheProvider": "no",
  "clientFramework": "no",
  "creationTimestamp": 1687288828490,
  "databaseType": "sql",
  "devDatabaseType": "oracle",
  "dtoSuffix": "DTO",
  "enableGradleEnterprise": null,
  "enableHibernateCache": false,
  "enableSwaggerCodegen": false,
  "enableTranslation": false,
  "entities": [
    "MessagePendingToSendKafka",
    "Language",
    "RoomType",
    "RoomTypeTranslation",
    "CRMClient"
  ],
  "entitySuffix": "",
  "gradleEnterpriseHost": null,
  "jhiPrefix": "jhi",
  "jhipsterVersion": "8.0.0-beta.2",
  "lastLiquibaseTimestamp": 1690361568000,
  "messageBroker": false,
  "microfrontend": false,
  "microfrontends": [],
  "nativeLanguage": "es",
  "packageFolder": "com/jumbotours/establishmentcatalog",
  "packageName": "com.jumbotours.establishmentcatalog",
  "pages": [],
  "prodDatabaseType": "oracle",
  "reactive": false,
  "searchEngine": false,
  "serverPort": "8094",
  "serverSideOptions": [],
  "serviceDiscoveryType": "eureka",
  "skipCheckLengthOfIdentifier": false,
  "skipClient": true,
  "skipFakeData": false,
  "skipUserManagement": true,
  "testFrameworks": [],
  "websocket": "no",
  "withAdminUi": false
}
Environment and Tools

openjdk version "11.0.4" 2019-07-16 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11) Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.15.1, JRE 11 Windows 10 amd64-64-Bit Compressed References 20190717_282 (JIT enabled, AOT enabled) OpenJ9 - 0f66c6431 OMR - ec782f26 JCL - fa49279450 based on jdk-11.0.4+11)

git version 2.30.1.windows.1

node: v18.16.0 npm: 9.7.1

'docker' command could not be found

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity MessagePendingToSendKafka {
  id Long required
  topic String required maxlength(50)
  entityId Long required
  key Long required
  message String required
  numAttempts Long required
  modifiedDateTime Instant required
  error String maxlength(255)
}
entity Language {
  id Long required
}
entity RoomType {
  id Long required
  code String
  maxPax Integer
  minPax Integer
  minAdults Integer
  minChildren Integer
  maxInfants Integer
  maxAdults Integer
  maxChildren Integer
  type String
  activo Boolean
  externalCode String maxlength(255)
  hotel String maxlength(255)
  idJet String minlength(1) maxlength(10)
}
entity RoomTypeTranslation {
  id Long required
  text String minlength(1) maxlength(10000)
  activo Boolean
}
entity CRMClient {
  id Long required
}
relationship OneToMany {
  Language{id} to RoomTypeTranslation{language}
  RoomType{nameTranslations} to RoomTypeTranslation{roomType}
}
relationship ManyToOne {
  RoomType{crmClient} to CRMClient
  RoomTypeTranslation{language} to Language{id}
  RoomTypeTranslation{roomType} to RoomType{nameTranslations}
}

service MessagePendingToSendKafka, Language, RoomType, RoomTypeTranslation, CRMClient with serviceClass
microservice MessagePendingToSendKafka, Language, RoomType, RoomTypeTranslation, CRMClient with establishment-catalog
clientRootFolder MessagePendingToSendKafka, Language, RoomType, RoomTypeTranslation, CRMClient with establishment-catalog

√ applying multi-step templates info Multiple customCommitTask tasks found (C:\JIP\develop\BKN\establishment-catalog#jhipster:info, jhipster:bootstrap). Using the first.

Congratulations, JHipster execution is complete! If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Sponsored with ❤️ by @oktadev.

Browsers and Operating System

All Operating System, all browsers

mshima commented 1 year ago

We use springdocs groups, to get the definitions you need to use url {host}:{port}/v3/api-docs/{group}. This is a bug only if swagger-ui frontend fails to show the definition.

javachavez commented 1 year ago

Sorry doesnt appears swagger with this instructions:

http://localhost:8094/v3/api-docs/management

======== We use springdocs groups, to get the definitions you need to use url {host}:{port}/v3/api-docs/{group}. This is a bug only if swagger-ui frontend fails to show the definition.

Originally posted by @mshima in https://github.com/jhipster/generator-jhipster/issues/23264#issuecomment-1690496432

More details: ██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ ██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ ██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝

:: JHipster 🤓 :: Running Spring Boot 3.1.1 :: Startup profile(s) dev :: :: https://www.jhipster.tech ::

2023-08-24T00:02:32.952+02:00 WARN 16048 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8761/config/establishment-catalog/dev,api-docs/main": Connection refused: no further information 2023-08-24T00:02:32.964+02:00 INFO 16048 --- [ main] c.j.e.EstablishmentCatalogApp : The following 2 profiles are active: "api-docs", "dev" 2023-08-24T00:02:35.858+02:00 WARN 16048 --- [ main] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.jumbotours.establishmentcatalog.aop.logging.LoggingAspect 2023-08-24T00:02:37.230+02:00 INFO 16048 --- [ main] c.j.e.config.WebConfigurer : Web application configuration, using profiles: api-docs 2023-08-24T00:02:37.232+02:00 INFO 16048 --- [ main] c.j.e.config.WebConfigurer : Web application fully configured 2023-08-24T00:02:37.307+02:00 DEBUG 16048 --- [ main] c.j.e.config.AsyncConfiguration : Creating Async Task Executor 2023-08-24T00:02:37.423+02:00 DEBUG 16048 --- [ main] c.j.e.config.LiquibaseConfiguration : Configuring Liquibase 2023-08-24T00:02:37.431+02:00 WARN 16048 --- [ main] com.zaxxer.hikari.HikariConfig : Hikari - idleTimeout has been set but has no effect because the pool is operating as a fixed size pool. 2023-08-24T00:02:37.899+02:00 WARN 16048 --- [-catalog-task-1] t.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup! Database is up to date, no changesets to execute 2023-08-24T00:02:39.173+02:00 DEBUG 16048 --- [-catalog-task-1] t.j.c.liquibase.AsyncSpringLiquibase : Liquibase has updated your database in 1273 ms 2023-08-24T00:02:39.198+02:00 INFO 16048 --- [ main] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.DB2Dialect 2023-08-24T00:02:39.310+02:00 WARN 16048 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding org.hibernate.cfg.AvailableSettings constant for details. 2023-08-24T00:02:39.554+02:00 WARN 16048 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding org.hibernate.cfg.AvailableSettings constant for details. 2023-08-24T00:02:39.578+02:00 WARN 16048 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding org.hibernate.cfg.AvailableSettings constant for details. 2023-08-24T00:02:40.543+02:00 INFO 16048 --- [ main] c.j.e.EstablishmentCatalogApp : HIKARIDATASOURCE Hikari 1 1 2023-08-24T00:02:41.081+02:00 WARN 16048 --- [ main] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.jumbotours.establishmentcatalog.repository.RoomTypeRepository 2023-08-24T00:02:41.752+02:00 INFO 16048 --- [ main] c.j.e.config.SenderConfig : KAFKA bootstrapServers 10.1.11.232:9094 2023-08-24T00:02:42.070+02:00 DEBUG 16048 --- [ main] c.a.JHipsterSpringDocGroupsConfiguration : Initializing JHipster OpenApi customizer 2023-08-24T00:02:42.103+02:00 INFO 16048 --- [ main] c.j.e.config.ReceiverConfig : Kafka Configured!! 2023-08-24T00:02:44.158+02:00 DEBUG 16048 --- [ main] c.a.JHipsterSpringDocGroupsConfiguration : Initializing JHipster OpenApi default group 2023-08-24T00:02:44.163+02:00 DEBUG 16048 --- [ main] c.a.JHipsterSpringDocGroupsConfiguration : Initializing JHipster OpenApi management group 2023-08-24T00:02:44.740+02:00 DEBUG 16048 --- [ main] i.m.c.u.i.logging.InternalLoggerFactory : Using SLF4J as the default logging framework 2023-08-24T00:02:45.471+02:00 WARN 16048 --- [ main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath. 2023-08-24T00:02:45.895+02:00 INFO 16048 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1 2023-08-24T00:02:45.896+02:00 INFO 16048 --- [ main] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data. 2023-08-24T00:02:45.911+02:00 INFO 16048 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1692828165910 with initial instances count: 0 2023-08-24T00:02:46.100+02:00 INFO 16048 --- [ main] org.jboss.threads : JBoss Threads version 3.5.0.Final 2023-08-24T00:02:46.624+02:00 INFO 16048 --- [ main] c.j.e.EstablishmentCatalogApp : Started EstablishmentCatalogApp in 15.817 seconds (process running for 16.596) 2023-08-24T00:02:46.633+02:00 INFO 16048 --- [ main] c.j.e.EstablishmentCatalogApp :

Application 'establishment-catalog' is running! Access URLs:
Local:      http://localhost:8094/
External:   http://192.168.76.52:8094/
Profile(s):     [api-docs, dev]

2023-08-24T00:02:46.634+02:00 INFO 16048 --- [ main] c.j.e.EstablishmentCatalogApp :


mshima commented 1 year ago

Please adjust the comment format before posting, current format it's very rude.

As I said before there is no issue here.

javachavez commented 1 year ago

But in old version when i execute a microservice in local i can access to swagger, i am triying with a gateway and i cant get it.

I test with this microservice and i can get swagger... 1- Clone in local: https://github.com/jhipster/jhipster-sample-app-microservice 2- mvnw 3- Doesnt appears:

javachavez commented 1 year ago

i need reopen this issue, please.

javachavez commented 1 year ago

Hello i get swagger y set:

                .requestMatchers("/v3/api-docs/**").permitAll()

Thanks! issue is closed well.