Patrick Newcombe
11/13/2024, 3:26 PMPatrick Newcombe
11/13/2024, 3:38 PMGiven a valid device exists...
â—¦ deviceId in path: ff2cc060-dd83-4126-b6bf-192a2e3ca033
• Given a trad single-register electricity device
â—¦ deviceId in path: example-device-id
We now return { deviceId } in the provider-state callback, but it seems a consumer can't know what named values exist in this JsonMap, so it's reliant on a very specific back-and-forth.
We ultimately want consumers to be able to self-serveYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Patrick Newcombe
11/13/2024, 4:48 PMYou can use provider state callbacksYea, we're using provider state callbacks in our POC, and it's working like a charm (although docs and examples were a little tough to follow for js)
internal documentation... you could maybe add a section for providers to register states names they will supportThat's my stand-in option, but it's a shame to need to host this away from the broker, which is otherwise the font of such knowledge
[consumers] are on a separate workflowYea, that's right. They publish as part of their CI pipeline. We (producers) validate as part of ours. Presently we have a lot of consumers writing their tests in advance as we all work towards delivery (against the pre-agreed api spec)
Patrick Newcombe
11/13/2024, 4:50 PM[null] default state handler and throw an error... this would provide adequate incentive to use supported states? Feels a little nuclear though 😅Patrick Newcombe
11/13/2024, 4:53 PM