From 0b9977256a69d7753b057c11f8c32527814c145b Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 25 Apr 2023 14:15:34 +0200 Subject: [PATCH] fix(proto): add device ID --- nrfGuide/NRFGuideMessage.ts | 5 +++++ nrfGuide/proto.spec.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/nrfGuide/NRFGuideMessage.ts b/nrfGuide/NRFGuideMessage.ts index 5469cdc2..3b763781 100644 --- a/nrfGuide/NRFGuideMessage.ts +++ b/nrfGuide/NRFGuideMessage.ts @@ -286,6 +286,11 @@ const AirHumidity = Type.Object({ export const DeviceIdentity = Type.Object({ '@context': Type.Literal(Context.deviceIdentity.toString()), + id: Type.String({ + minLength: 1, + description: 'the device ID', + examples: ['nrf-352656108602296'], + }), model: Type.String({ minLength: 1, description: 'the device model', diff --git a/nrfGuide/proto.spec.ts b/nrfGuide/proto.spec.ts index e44d0684..bd623da7 100644 --- a/nrfGuide/proto.spec.ts +++ b/nrfGuide/proto.spec.ts @@ -17,6 +17,7 @@ describe('nRF Guide messages', () => { it('should validate a device identity message', () => { const deviceIdentityMessage: Static = { '@context': 'https://github.com/bifravst/nRF-Guide-proto/deviceIdentity', + id: 'nrf-352656108602296', model: 'PCA20035+solar', } expect(validPassthrough(deviceIdentityMessage)).toMatchObject(