Skip to content

Failing to recognize format property for schema #461

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
fjtirado opened this issue Nov 8, 2024 · 0 comments · Fixed by #464
Closed

Failing to recognize format property for schema #461

fjtirado opened this issue Nov 8, 2024 · 0 comments · Fixed by #464
Assignees

Comments

@fjtirado
Copy link
Collaborator

fjtirado commented Nov 8, 2024

What happened:
Following definition

document:
  dsl: 1.0.0-alpha2
  namespace: examples
  name: http-query-params
  version: 1.0.0-alpha2
input:
  schema:
    format: json
    document:
      type: object
      required:
        - searchQuery
      properties:
        searchQuery:
          type: string
do:
  - searchStarWarsCharacters:
      call: http
      with:
        method: get
        endpoint: https://swapi.dev/api/people/
        query:
          search: ${.searchQuery}

fails to deserializer with exception

com.fasterxml.jackson.databind.JsonMappingException: 
Problem deserializing class io.serverlessworkflow.api.types.Schema
 at [Source: (BufferedInputStream); line: 16, column: 1] (through reference chain: io.serverlessworkflow.api.types.Workflow["input"]->io.serverlessworkflow.api.types.Input["schema"])
......
Suppressed: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "format" (class io.serverlessworkflow.api.types.SchemaInline), not marked as ignorable (one known property: "document"])
 at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.serverlessworkflow.api.types.SchemaInline["format"])
		at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
		at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1153)
		at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2241)
		at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1821)
		at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1799)
		at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
		at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
		at io.serverlessworkflow.serialization.BeanDeserializerWithValidation.deserialize(BeanDeserializerWithValidation.java:47)
		at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342)
		at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4893)
		at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3036)
		at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:3500)
		at io.serverlessworkflow.serialization.DeserializeHelper.deserializeOneOf(DeserializeHelper.java:35)
		... 69 more
	Suppressed: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "format" (class io.serverlessworkflow.api.types.SchemaExternal), not marked as ignorable (one known property: "resource"])
 at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.serverlessworkflow.api.types.SchemaExternal["format"])

What you expected to happen:

How to reproduce it:

Anything else we need to know?:
As a workaroung, format can be removed.

Environment:

  • Specification version used:
@fjtirado fjtirado self-assigned this Nov 8, 2024
@fjtirado fjtirado changed the title Failint to recognize format property for schema Failing to recognize format property for schema Nov 8, 2024
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 11, 2024
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 11, 2024
…ommon part

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 11, 2024
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 12, 2024
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 12, 2024
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 12, 2024
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 12, 2024
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit to fjtirado/sdk-java that referenced this issue Nov 12, 2024
Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
fjtirado added a commit that referenced this issue Nov 12, 2024
[Fix #461] oneOf options must inherit union class common part
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant