public final class V11AllowableValuesMigrator extends java.lang.Object implements SwaggerMigrator
allowableValues into a 1.2 enum
allowableValues is an object which has at least one valueType member, whose value is a JSON String. If this string is "LIST", then it is replaced by an enum, as in:
{
"allowableValues": {
"valueType": "LIST",
"values": [ "a", "b", "c" ]
}
}
which will become:
{
"enum": [ "a", "b", "c" ]
}
Another possible value is "range[]", however this migrator does
not handle this case (yet?).
| Constructor and Description |
|---|
V11AllowableValuesMigrator() |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
migrate(com.fasterxml.jackson.databind.JsonNode input)
Migrate a JSON input
|
@Nonnull
public com.fasterxml.jackson.databind.JsonNode migrate(@Nonnull
com.fasterxml.jackson.databind.JsonNode input)
throws SwaggerMigrationException
SwaggerMigratormigrate in interface SwaggerMigratorinput - the input nodeSwaggerMigrationException - migration failedCopyright © 2019. All Rights Reserved.