Parse error while using custom binary annotation in JDL with numeric parameter:
SyntaxError: Error: MismatchedTokenException: Expecting token of type --> NAME <-- but found --> '2' <--
at line: 8, column: 39
at callApiMethod (lib\readers\jdl_reader.js:32:813)
at parse (lib\readers\jdl_reader.js:32:84)
at Object.parseFromFiles (lib\readers\jdl_reader.js:24:191)
at parseFiles (lib\jdl\jdl_importer.js:46:582)
at createImporterFromFiles (lib\jdl\jdl_importer.js:28:313)
at Context.<anonymous> (test\spec\jdl\jdl_importer.spec.js:1044:26)
at processImmediate (internal/timers.js:439:21)
Motivation for or Use Case
Sometimes you need numeric parameters, e.g. an order. It's not even possible to use '2' instead of 2 as a workaround.
Reproduce the error
Modified entity A from annotations.jdl test case, replacing value2 by 2 and also (another test case) value3 by '3'
@service(serviceClass)
@dto(mapstruct)
@skipClient
@myCustomUnaryOption
@myCustomBinaryOption(customValue)
@myCustomBinaryOption(customValue)
entity A {
@id @multiValue(value1) @multiValue(2) @multiValue('3') name String
noAnnotation String
}
Related issues
Suggest a Fix
JHipster Version(s)
6.5.1 but reproduced by modifying test case of jhipster-core master
JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
[X] Checking this box is mandatory (this is just to show you read everything)
Overview of the issue
Parse error while using custom binary annotation in JDL with numeric parameter:
Motivation for or Use Case
Sometimes you need numeric parameters, e.g. an order. It's not even possible to use
'2'
instead of2
as a workaround.Reproduce the error
Modified entity A from
annotations.jdl
test case, replacingvalue2
by2
and also (another test case)value3
by'3'
Related issues
Suggest a Fix
JHipster Version(s)
6.5.1 but reproduced by modifying test case of jhipster-core master
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System