singer-io / singer-python

Writes the Singer format from Python
https://singer.io
Apache License 2.0
542 stars 130 forks source link

Resolve references in anyOf schema keys. #93

Closed joshtemple closed 5 years ago

joshtemple commented 5 years ago

I found that the resolve_schema_references method doesn't expand JSON schema references in anyOf blocks. I added a new SchemaKey to make sure we recursively expand those $ref blocks.

Are there other keys we should also think about (e.g. allOf, oneOf)? Is there a more generalized approach used elsewhere in Singer for navigating the tree we should consider?

KAllan357 commented 5 years ago

I think a better approach might be to figure out exactly how the RefResolver in jsonschema works.

In the meantime I think this change makes sense and we can continue to add additional support on an as needed basis.

KAllan357 commented 5 years ago

Thanks :+1:

KAllan357 commented 5 years ago

Released in v5.4.1