You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try to parse a spec with a 'nullable' attribute, it throws an error.
How to Reproduce
Given a spec with the following message schema:
messages:
product:
name: producttitle: An inventory productsummary: Product representing items in inventorycontentType: application/jsonpayload:
type: objectproperties:
name:
description: Every product has a nametype: stringinventory:
description: Count of items in inventorytype: numbernullable: trueid:
description: Unique identifier of the producttype: number
Note: The inventory property has a 'nullable' attribute.
When we try to parse the spec :
val specFilePath ="path to spec file"val specFileContents =File(specFilePath).readText()
val asyncAPISpec=ObjectMapper(YAMLFactory()).readValue(specFileContents, AsyncAPI::class.java)
It throws this error:
com.fasterxml.jackson.databind.JsonMappingException: "nullable" is not valid extension property (through reference chain: com.asyncapi.v2._6_0.model.channel.message.Message["payload"]->com.asyncapi.v2.schema.Schema["properties"]->java.util.LinkedHashMap["inventory"]->com.asyncapi.v2.schema.Schema["nullable"])
at com.fasterxml.jackson.databind.deser.SettableAnyProperty._throwAsIOE(SettableAnyProperty.java:246)
at com.fasterxml.jackson.databind.deser.SettableAnyProperty.set(SettableAnyProperty.java:209)
at com.fasterxml.jackson.databind.deser.SettableAnyProperty.deserializeAndSet(SettableAnyProperty.java:179)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1765)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:623)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:449)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:32)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342)
The text was updated successfully, but these errors were encountered:
Description
When we try to parse a spec with a 'nullable' attribute, it throws an error.
How to Reproduce
Given a spec with the following message schema:
Note: The inventory property has a 'nullable' attribute.
When we try to parse the spec :
It throws this error:
The text was updated successfully, but these errors were encountered: