Generator-jhipster: Jhipster-jdl : --skip-client not working?

Created on 20 Mar 2018  路  2Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

Client side code generated although --skip-client option is set.

Motivation for or Use Case

Need to generate entity without any front end code.

Reproduce the error

Used the below JH code.

entity Location {
    streetAddress String,
    postalCode String,
    city String,
    stateProvince String
}
`jhipster import-jdl D:\Downloads\jhipster-jdl.jh --skip-client` This generated HTML files. create src\main\webapp\app\entities\location\location.component.html create src\main\webapp\app\entities\location\location-detail.component.html create src\main\webapp\app\entities\location\location-dialog.component.html create src\main\webapp\app\entities\location\location-delete-dialog.component.html ##### **Related issues** Issue #5471 ##### **Suggest a Fix** Not sure of a fix as I'm getting started with JHipster. ##### **JHipster Version(s)** JHipster Generator v4.14.1 ##### **JHipster configuration** 位 jhipster info Using JHipster version installed locally in current project's node_modules Executing jhipster:info Options: Welcome to the JHipster Information Sub-Generator ##### **JHipster Version(s)**
[email protected] E:\1_MyApp\MyApp
`-- [email protected]

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.myappdomain.MyApp"
    },
    "jhipsterVersion": "4.14.1",
    "baseName": "MyApp",
    "packageName": "com.myappdomain.MyApp",
    "packageFolder": "com/myappdomain/MyApp",
    "serverPort": "8080",
    "authenticationType": "session",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "mysql",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "enableSwaggerCodegen": false,
    "rememberMeKey": "replaced-by-jhipster-info",
    "clientFramework": "angularX",
    "useSass": true,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": false
  }
}

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


JDL entity definitions

/**
 * not an ignored comment
 */
entity Location (location) {
  streetAddress String,
  postalCode String,
  city String,
  stateProvince String
}
/**
 * The Employee entity.
 */
entity Employee (employee) {
  /**
   * The firstname attribute.
   */
  firstName String,
  lastName String,
  email String,
  phoneNumber String,
  hireDate Instant,
  salary Long,
  commissionPct Long
}



Environment and Tools

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

git version 2.7.2.windows.1

node: v8.10.0

npm: 5.7.1

bower: 1.8.0

gulp:
[13:58:40] CLI version 3.9.1

yeoman: 2.0.1

yarn: 1.5.1

Docker version 17.09.0-ce, build afdb6d4

docker-compose version 1.16.1, build 6d1ac219

Congratulations, JHipster execution is complete!

Entity configuration(s) entityName.json files generated in the .jhipster directory

{
"fluentMethods": true,
"relationships": [],
"fields": [
{
"fieldName": "streetAddress",
"fieldType": "String"
},
{
"fieldName": "postalCode",
"fieldType": "String"
},
{
"fieldName": "city",
"fieldType": "String"
},
{
"fieldName": "stateProvince",
"fieldType": "String"
}
],
"changelogDate": "20180320081420",
"javadoc": "not an ignored comment",
"entityTableName": "location",
"dto": "no",
"pagination": "no",
"service": "no",
"jpaMetamodelFiltering": false
}

Browsers and Operating System


On Chrome

  • [x] Checking this box is mandatory (this is just to show you read everything)

Most helpful comment

Declaring as below worked for me.

entity Jhi_user {
    id String,
    login String,
    city String,
    stateProvince String,
}
skipClient Jhi_user

All 2 comments

From import-jdl generator code, the skip client option must be set per entity: https://github.com/jhipster/generator-jhipster/blob/master/generators/import-jdl/index.js?utf8=%E2%9C%93#L146

So, it must be used in JDL file itself, see doc about unary d茅finitions: https://www.jhipster.tech/jdl/#optiondeclaration

Declaring as below worked for me.

entity Jhi_user {
    id String,
    login String,
    city String,
    stateProvince String,
}
skipClient Jhi_user
Was this page helpful?
0 / 5 - 0 ratings

Related issues

SudharakaP picture SudharakaP  路  3Comments

Steven-Garcia picture Steven-Garcia  路  3Comments

shivroy121 picture shivroy121  路  3Comments

frantzynicolas picture frantzynicolas  路  3Comments

edvjacek picture edvjacek  路  3Comments