org.mule.common.metadata.MetaDataGenerationException: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"}

MuleSoft JIRA | Stefan Cordes | 7 months ago
  1. 0

    When specify a "date" as "type" in a JSON Schema mule cannot parse it: {noformat} org.mule.common.metadata.MetaDataGenerationException: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"} at org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:70) at org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:76) at org.mule.tooling.rest.consumer.datasense.RetrieveRamlMetadataRunnable.resolveOutputMetadata(RetrieveRamlMetadataRunnable.java:282) at org.mule.tooling.rest.consumer.datasense.RetrieveRamlMetadataRunnable.run(RetrieveRamlMetadataRunnable.java:89) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) Caused by: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"} at org.mule.common.metadata.parser.json.SchemaEnv.evaluate(SchemaEnv.java:149) at org.mule.common.metadata.parser.json.JSONObjectType.<init>(JSONObjectType.java:82) at org.mule.common.metadata.parser.json.SchemaEnv.evaluate(SchemaEnv.java:142) at org.mule.common.metadata.parser.json.JSONArrayType.<init>(JSONArrayType.java:28) at org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:36) ... 4 more {noformat} Obviously "date" is missing in JSONTypeUtils: {noformat} static { typeMapping.put(JSONType.Everything.class, DataType.UNKNOWN); typeMapping.put(JSONType.BooleanType.class, DataType.BOOLEAN); typeMapping.put(JSONType.DoubleType.class, DataType.DOUBLE); typeMapping.put(JSONType.Empty.class, DataType.VOID); typeMapping.put(JSONType.IntegerType.class, DataType.INTEGER); typeMapping.put(JSONType.StringType.class, DataType.STRING); typeMapping.put(JSONType.NumberType.class, DataType.NUMBER); } {noformat}

    MuleSoft JIRA | 7 months ago | Stefan Cordes
    org.mule.common.metadata.MetaDataGenerationException: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"}
  2. 0

    When specify a "date" as "type" in a JSON Schema mule cannot parse it: {noformat} org.mule.common.metadata.MetaDataGenerationException: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"} at org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:70) at org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:76) at org.mule.tooling.rest.consumer.datasense.RetrieveRamlMetadataRunnable.resolveOutputMetadata(RetrieveRamlMetadataRunnable.java:282) at org.mule.tooling.rest.consumer.datasense.RetrieveRamlMetadataRunnable.run(RetrieveRamlMetadataRunnable.java:89) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) Caused by: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"} at org.mule.common.metadata.parser.json.SchemaEnv.evaluate(SchemaEnv.java:149) at org.mule.common.metadata.parser.json.JSONObjectType.<init>(JSONObjectType.java:82) at org.mule.common.metadata.parser.json.SchemaEnv.evaluate(SchemaEnv.java:142) at org.mule.common.metadata.parser.json.JSONArrayType.<init>(JSONArrayType.java:28) at org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:36) ... 4 more {noformat} Obviously "date" is missing in JSONTypeUtils: {noformat} static { typeMapping.put(JSONType.Everything.class, DataType.UNKNOWN); typeMapping.put(JSONType.BooleanType.class, DataType.BOOLEAN); typeMapping.put(JSONType.DoubleType.class, DataType.DOUBLE); typeMapping.put(JSONType.Empty.class, DataType.VOID); typeMapping.put(JSONType.IntegerType.class, DataType.INTEGER); typeMapping.put(JSONType.StringType.class, DataType.STRING); typeMapping.put(JSONType.NumberType.class, DataType.NUMBER); } {noformat}

    MuleSoft JIRA | 7 months ago | Stefan Cordes
    org.mule.common.metadata.MetaDataGenerationException: org.mule.common.metadata.parser.json.SchemaException: Unrecognized schema type date in {"type":"date"}

    Root Cause Analysis

    1. org.mule.common.metadata.parser.json.SchemaException

      Unrecognized schema type date in {"type":"date"}

      at org.mule.common.metadata.parser.json.SchemaEnv.evaluate()
    2. org.mule.common
      JSONArrayType.<init>
      1. org.mule.common.metadata.parser.json.SchemaEnv.evaluate(SchemaEnv.java:149)
      2. org.mule.common.metadata.parser.json.JSONObjectType.<init>(JSONObjectType.java:82)
      3. org.mule.common.metadata.parser.json.SchemaEnv.evaluate(SchemaEnv.java:142)
      4. org.mule.common.metadata.parser.json.JSONArrayType.<init>(JSONArrayType.java:28)
      4 frames
    3. Mule ESB Metadata shared APIs
      JSONSchemaMetadataModelFactory.buildModel
      1. org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:36)
      2. org.mule.common.metadata.JSONSchemaMetadataModelFactory.buildModel(JSONSchemaMetadataModelFactory.java:76)
      2 frames
    4. org.mule.tooling
      RetrieveRamlMetadataRunnable.run
      1. org.mule.tooling.rest.consumer.datasense.RetrieveRamlMetadataRunnable.resolveOutputMetadata(RetrieveRamlMetadataRunnable.java:282)
      2. org.mule.tooling.rest.consumer.datasense.RetrieveRamlMetadataRunnable.run(RetrieveRamlMetadataRunnable.java:89)
      2 frames
    5. JFace
      ModalContext$ModalContextThread.run
      1. org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      1 frame