Skip to content

Commit

Permalink
refactor(schemas): 🏗️ added device type trust schema, and corrected s…
Browse files Browse the repository at this point in the history
…chema ids for device_trust and manufacturer_trust
  • Loading branch information
AshleySetter committed Aug 15, 2024
1 parent 2ed3008 commit 2d3a333
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/schemas/src/device_trust.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
$schema: https://json-schema.org/draft/2020-12/schema
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/allow_to_connect.v.1.0.0.schema.yaml
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/device_trust.v.1.0.0.schema.yaml
title: device trust
description: A giving of trust from an authorising user to a device to connect to the network
type: object
properties:
device_id:
description: id of the device receiving connection rights
description: id of the device receiving trust
type: string
authoriser_id:
description: id of the authorising user
type: string
created_at:
description: timestamp at which connection rights were given in milliseconds
description: timestamp at which trust was granted in milliseconds
type: integer
required:
- device_id
Expand Down
19 changes: 19 additions & 0 deletions packages/schemas/src/device_type_trust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$schema: https://json-schema.org/draft/2020-12/schema
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/device_type_trust.v.1.0.0.schema.yaml
title: device trust
description: A giving of trust from an authorising user to a device type
type: object
properties:
device_type_id:
description: id of the device type receiving trust
type: string
authoriser_id:
description: id of the authorising user
type: string
created_at:
description: timestamp at which trust was granted in milliseconds
type: integer
required:
- device_type_id
- authoriser_id
- created_at
4 changes: 2 additions & 2 deletions packages/schemas/src/manufacturer_trust.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$schema: https://json-schema.org/draft/2020-12/schema
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/trust.v.1.0.0.schema.yaml
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/manufacturer_trust.v.1.0.0.schema.yaml
title: manufacturer trust
description: A trust relationship between a user and manufacturer
type: object
Expand All @@ -11,7 +11,7 @@ properties:
description: id of the manufacturer
type: string
created_at:
description: timestamp at which trust was created in milliseconds
description: timestamp at which trust was granted in milliseconds
type: integer
required:
- user_id
Expand Down

0 comments on commit 2d3a333

Please sign in to comment.