Closed tangobravo62 closed 3 years ago
Discussion 2020-06-22: We go with alternative (3) and remove the enum declarations from the RAML files, replacing them by strings, optionally constrained by pattern definitions, which only accept "S3", "POSIX", "ALLUXIO" and "OTHER". Furthermore the StorageType enum shall be factored out from the ProductFile class and put as a class of its own in the psm-common module (package de.dlr.proseo.model.enum).
Implemented. RAML spec of storage types changed to:
type: string
description: The type of the storage
pattern: ^(S3|ALLUXIO|POSIX|OTHER)$
New Enum StorageType in package de.dlr.proseo.model.enums
implemented as the one definition of storage types.
The storage type enum for S3 Object Storage should be named "S3" according to the initial data model design. However due to the implementation of the springmvc-raml-plugin, which relies on the Apache Commons StringUtils method splitByCharacterTypeCamelCase(String str), specifying an enum value "S3" in the RAML specification creates an enum constant "S_3". This leads to inconsistencies in the code.
It has to be decided, which of the following resolution approaches shall be applied:
Apparently a fourth alternative, namely to configure springmvc-raml-plugin in such a way that it creates enums for "S3" as "S3", does not seem to be feasible, as there is no appropriate configuration option available.