Conversation
mdelaurentis
left a comment
There was a problem hiding this comment.
Code looks good. Please see the one comment on additionalProperties.
What does it look like to the user when the tap provides a schema that fails validation? I would suggest adding a test for that case. You can use the assertRaisesRegex context manager, as documented here: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRaisesRegex.
Like:
with self.assertRaisesRegex(ValueError, "Some pattern you want the message to match):
do(some_stuff)
singer/catalog.py
Outdated
|
|
||
| CATALOG_SCHEMA = {'type': 'object', | ||
| 'required': ['streams'], | ||
| 'properties': { |
There was a problem hiding this comment.
I think you might want to add "additionalProperties": false here and in the other nested object in this schema. If you don't the validator will allow objects with other properties. I guess it depends on how strict we want to be in this validation. @cmerrick what are your thoughts on that?
|
@nick-mccoy tests are failing. It's a pretty trivial issue, just pylint complaining about whitespace. |
…is set to UTC for time_extracted
…perties Adding time_extracted and bookmark_properties
…y-in-schema-message-init move bookmark property handling from write_schema into SchemaMessage __init__
Changing SchemaMessage so that bookmark_properties is always a list
Add stream_alias to Catalog.to_dict
Add metadata assignment to Catalog.from_dict
changing strftime format string
Added write_catalog function
Added write_catalog function