Error when exporting Async API when the securityType is X509
Closed this issue · 0 comments
Description:
When the securityType is X509 in metadata.yaml file which gets imported to Service catalogue, it gives the following exception.
[2021-02-25 01:28:56,854] ERROR - ServiceEntryMappingUtil One or more parameters contain disallowed values com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type
org.wso2.carbon.apimgt.api.model.ServiceEntry$SecurityTypefrom String "X509": value not one of declared Enum instance names: [NONE, OAUTH2, DIGEST, BASIC] at [Source: (File); line: 2, column: 15] (through reference chain: org.wso2.carbon.apimgt.api.model.ServiceEntry["securityType"]) at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:1549) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:911) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:255) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:179) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4014) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2903) ~[jackson-databind-2.9.9.3.jar:2.9.9.2] at org.wso2.carbon.apimgt.rest.api.service.catalog.utils.ServiceEntryMappingUtil.fromFileToServiceEntry(ServiceEntryMappingUtil.java:76) [classes/:?] at org.wso2.carbon.apimgt.rest.api.service.catalog.utils.Md5HashGenerator.validateInputParams(Md5HashGenerator.java:85) [classes/:?] at org.wso2.carbon.apimgt.rest.api.service.catalog.utils.Md5HashGenerator.generateHash(Md5HashGenerator.java:61) [classes/:?] at org.wso2.carbon.apimgt.rest.api.service.catalog.impl.ServicesApiServiceImpl.importService(ServicesApiServiceImpl.java:212) [classes/:?] at org.wso2.carbon.apimgt.rest.api.service.catalog.ServicesApi.importService(ServicesApi.java:172) [classes/:?]
In Async API security spec, there are several security types including X509.
Is it possible to add it as a security type in code