Add optional `schema` property to `StepEntityMetadata` & `StepRelationshipMetadata`
As we move closer to specification-defined integrations, I propose adding an optional schema property to the StepEntityMetadata and StepRelationshipMetadata interfaces.
This schema can be used in:
- conversion tests (
expect(entities).toMatchGraphObjectSchema({ _class: entities.USER._class, schema: entities.USER.schema})), - Documentation (
docs/jupiterone.md, or maybe somewhere we could store more verbose documentation)
Sounds good to me. My only thought before implementing this would be, is there a way to have this happen automatically, potentially by hooking into the Polly recordings?
I'm not sure the polly recordings are the right place to put this schema validation. Those recordings will match whatever data structure the API returns, but this schema is used to match JupiterOne entities/relationships that we have constructed with that data.
I do think that schema-defined entities and relationships will open up some great opportunities to improve our testing strategies.