Skip to content

Commit 17f11d6

Browse files
committed
fix(model-server): use double dashes for command line parameters
Single dashes are usually only used for the short single letter name of a parameter. Single dash parameters are now deprecated and shouldn't be used.
1 parent 7d6a968 commit 17f11d6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

model-server/src/main/kotlin/org/modelix/model/server/CmdLineArgs.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,42 @@ import java.io.File
88
import java.util.LinkedList
99

1010
internal class CmdLineArgs {
11-
@Parameter(names = ["-secret"], description = "Path to the secretfile", converter = FileConverter::class)
11+
@Parameter(names = ["-secret", "--secret"], description = "Path to the secretfile", converter = FileConverter::class)
1212
var secretFile = File("/secrets/modelsecret/modelsecret.txt")
1313

1414
@Parameter(
15-
names = ["-jdbcconf"],
15+
names = ["-jdbcconf", "--jdbcconf"],
1616
description = "Path to the JDBC configuration file",
1717
converter = FileConverter::class,
1818
)
1919
var jdbcConfFile: File? = null
2020

21-
@Parameter(names = ["-inmemory"], description = "Use in-memory storage", converter = BooleanConverter::class)
21+
@Parameter(names = ["-inmemory", "--inmemory"], description = "Use in-memory storage", converter = BooleanConverter::class)
2222
var inmemory = false
2323

2424
@Parameter(names = ["--local-persistence"], description = "Use ignite with local disk persistence", converter = BooleanConverter::class)
2525
var localPersistence = false
2626

27-
@Parameter(names = ["-dumpout"], description = "Dump in memory storage", converter = StringConverter::class)
27+
@Parameter(names = ["-dumpout", "--dumpout"], description = "Dump in memory storage", converter = StringConverter::class)
2828
var dumpOutName: String? = null
2929

30-
@Parameter(names = ["-dumpin"], description = "Read dump in memory storage", converter = StringConverter::class)
30+
@Parameter(names = ["-dumpin", "--dumpin"], description = "Read dump in memory storage", converter = StringConverter::class)
3131
var dumpInName: String? = null
3232

33-
@Parameter(names = ["-port"], description = "Set port", converter = IntegerConverter::class)
33+
@Parameter(names = ["-port", "--port"], description = "Set port", converter = IntegerConverter::class)
3434
var port: Int? = null
3535

36-
@Parameter(names = ["-set"], description = "Set values", arity = 2)
36+
@Parameter(names = ["-set", "--set"], description = "Set values", arity = 2)
3737
var setValues: List<String> = LinkedList<String>()
3838

3939
@Parameter(
40-
names = ["-schemainit"],
40+
names = ["-schemainit", "--schemainit"],
4141
description = "Initialize the schema, if necessary",
4242
converter = BooleanConverter::class,
4343
)
4444
var schemaInit = false
4545

46-
@Parameter(names = ["-noswagger"], description = "Disables SwaggerUI at endpoint '/swagger'", converter = BooleanConverter::class)
46+
@Parameter(names = ["-noswagger", "--noswagger"], description = "Disables SwaggerUI at endpoint '/swagger'", converter = BooleanConverter::class)
4747
var noSwaggerUi: Boolean = false
4848

4949
@Parameter(names = ["-h", "--help"], help = true)

0 commit comments

Comments
 (0)