Skip to content

Commit

Permalink
69 - first implementation of relationships (#70)
Browse files Browse the repository at this point in the history
* 69 - first implementation of relationships

* 69 - changes in entities

* 69 - changes in direction. From ENUM -> boolean

* 69 - remove relationship_type from GraphRelationship object

* 69 - rename field_list -> fields_list, relationship_list -> relationships_list, source_dataset_field_oddrn -> source_dataset_field_oddrns_list, target_dataset_field_oddrn -> target_dataset_field_oddrns_list
  • Loading branch information
Vladysl authored Jan 10, 2024
1 parent bcee706 commit 6d7c498
Showing 1 changed file with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion specification/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,70 @@ components:
rows_number:
type: integer
format: int64
field_list:
fields_list:
type: array
items:
$ref: '#/components/schemas/DataSetField'
relationships_list:
type: array
items:
$ref: '#/components/schemas/Relationship'
required:
- field_list

Relationship:
allOf:
- $ref: '#/components/schemas/BaseObject'
- type: object
properties:
source_dataset_oddrn:
type: string
target_dataset_oddrn:
type: string
erd_relationship:
$ref: '#/components/schemas/ERDRelationship'
graph_relationship:
$ref: '#/components/schemas/GraphRelationship'
required:
- source_dataset_oddrn
- target_dataset_oddrn

ERDRelationship:
type: object
properties:
source_dataset_field_oddrns_list:
type: array
items:
type: string
target_dataset_field_oddrns_list:
type: array
items:
type: string
is_identifying:
type: boolean
cardinality:
$ref: '#/components/schemas/CardinalityType'
required:
- source_dataset_field_oddrns_list
- target_dataset_field_oddrns_list

GraphRelationship:
type: object
properties:
is_directed:
type: boolean
attributes:
type: object
additionalProperties: true

CardinalityType:
type: string
enum:
- ONE_TO_ZERO_ONE_OR_MORE
- ONE_TO_ONE_OR_MORE
- ONE_TO_ZERO_OR_ONE
- ONE_TO_EXACTLY_ONE

DataSetStatistics:
type: object
properties:
Expand Down

0 comments on commit 6d7c498

Please sign in to comment.