如何告诉 JHipster JDL 启用 'API first development'?

how to tell JHipster JDL to enable 'API first development'?

当我手动生成 JHipster 应用程序时,系统会询问我是否要采用 'API first' 方法(例如:您想使用哪些其他技术?> API 首先使用 OpenAPI-generator)

开发

如果想用 JDL 文件创建应用程序,我该如何做?例如:

application {
  config {
    baseName myapp
    applicationType monolith
    devDatabaseType mysql
    prodDatabaseType mysql
    buildTool maven
    clientFramework react
    enableTranslation true
    nativeLanguage en
    languages [en, de]
    enableOpenApi true <-- What is the correct way to enable OpenAPI?
  }
  entities *
}

感谢@gaël-marziou 我找到了它:enableSwaggerCodegen true

jhipster export-jdl export.jh
cat export.jh

application {
  config {
    applicationType monolith
    authenticationType jwt
    baseName dummy
    blueprints []
    buildTool maven
    cacheProvider no
    clientFramework angularX
    clientPackageManager npm
    clientTheme flatly
    clientThemeVariant dark
    creationTimestamp 1616332818045
    databaseType sql
    devDatabaseType postgresql
    dtoSuffix DTO
    enableHibernateCache false
    enableSwaggerCodegen true <-- this is it
    enableTranslation true
    jhiPrefix jhi
    jhipsterVersion "7.0.0"
    jwtSecretKey "xxxxxxx"
    languages [en]
    messageBroker false
    nativeLanguage en
    otherModules []
    packageName com.mycompany.myapp
    prodDatabaseType postgresql
    reactive false
    searchEngine false
    serverPort 8080
    serviceDiscoveryType eureka
    skipClient false
    skipServer false
    skipUserManagement false
    testFrameworks []
    websocket false
    withAdminUi true
  }
}