-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDL Enum comment error #14869
Comments
This issue is stale because it has been open 30 days with no activity. |
Keep open |
For enum types, the javadocs are currently completely ignored while generating the files and a default javadoc is added as seen here :- Lines 21 to 23 in 0f42fb5
As javadocs are now allowed after #15202, they can be added in the generated files as well (at enum type and item level). For the open-api I am not sure if the comments can be added at
@MathieuAA Shall we add the javadocs in generated file, and any suggestions for swagger comments? |
For swagger comments, I guess the regular comments can be used. |
And the javadocs should already be present :( |
Working on the javadocs part first, will try to submit a PR soon. |
This issue is stale because it has been open 30 days with no activity. |
Trim trailing spaces from JDL parser Related to jhipster#14869
Overview of the issue
error occure at generating code for JDL enum with comment /** */ in enum body
e.g.
enum myEnum { V1 /** value1 */, V2 /**value2 */, V3 }
error at JDL import:
error: Syntax error message:
MismatchedTokenException: Found an invalid token '/** value1 /', at line: 125 and column: 9.
Please make sure your JDL content does not use invalid characters, keywords or options.
Error during import-jdl: Error: MismatchedTokenException: Found an invalid token '/* value1 */', at line: 125 and column: 9.
Please make sure your JDL content does not use invalid characters, keywords or options.
Motivation for or Use Case
We design enum names short like abbreviation because it is DB table column, but want to provide comment in order to explain the meaning.
This comment should be exported also to swagger to provide the information to API users.
Reproduce the error
error occurs always
Related issues
Suggest a Fix
JHipster Version(s)
"jhipsterVersion": "7.0.0-beta.1",
JHipster configuration
{
"generator-jhipster": {
"promptValues": {
"packageName": "ev",
"nativeLanguage": "sk"
},
"jhipsterVersion": "7.0.0-beta.1",
"applicationType": "microservice",
"baseName": "evidencia",
"packageName": "shr.ev",
"packageFolder": "shr/ev",
"serverPort": "8090",
"authenticationType": "oauth2",
"cacheProvider": "hazelcast",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": ...
"embeddableLaunchScript": false,
"creationTimestamp": 1580462360848,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"clientPackageManager": "npm",
"nativeLanguage": "sk",
"languages": ["sk", "en"],
"blueprints": [],
"skipClient": true,
"skipUserManagement": true,
"entities": [
.....
],
"skipServer": false,
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"pages": [],
"reactive": false,
"clientFramework": "angularX",
"clientTheme": "none",
"clientThemeVariant": "",
"withAdminUi": true,
"lastLiquibaseTimestamp": 1619103677000
}
}
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
The text was updated successfully, but these errors were encountered: