Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Fix SchemaGuru does not create correct schema for array structures #81

Closed
jbeemster opened this issue Jul 6, 2015 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@jbeemster
Copy link
Contributor

For structures like: ["hello"] which is just an array with a String inside it does not create a valid JsonSchema. It attempts to annotate the value but leaves empty arrays instead.

{
  "type": "array",
  "items": {
    "type": "string",
    "format": [],
    "pattern": []
  }
}
@jbeemster jbeemster added the bug label Jul 6, 2015
@jbeemster
Copy link
Contributor Author

I think this is due to the format and pattern reduce not happening unless it is nested inside a properties structure as per: https://github.com/snowplow/schema-guru/blob/master/src/main/scala/com.snowplowanalytics/schemaguru/generators/JsonSchemaMerger.scala#L138-L139

@alexanderdean
Copy link
Contributor

@chuwy - it looks like this wasn't done in time for this release, pushing back

@alexanderdean alexanderdean changed the title SchemaGuru does not create correct schema for array structures Fix SchemaGuru does not create correct schema for array structures Aug 10, 2015
@alexanderdean
Copy link
Contributor

Looks like this hasn't been done, @chuwy please confirm...

@alexanderdean
Copy link
Contributor

I can see it in the CHANGELOG, weird...

@chuwy
Copy link
Contributor

chuwy commented Nov 17, 2015

It's done too. It has no separate commit, because it was part of refactoring. And seems I forgotten to put it in CHANGELOG. But it's done.

@alexanderdean
Copy link
Contributor

Okay closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants