Do not use SchemaNode in yang-data (YANGTOOLS-1244)

[YANGTOOLS-1528] Create a yang-data-api equivalent of TypeDefinition Created: 24/Jul/23  Updated: 18/Jan/24

Status: Confirmed
Project: yangtools
Component/s: codecs, data-api, data-util
Affects Version/s: None
Fix Version/s: 14.0.0, 13.0.2

Type: Sub-task Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

yang.model.api.TypeDefinition has a problem, which is its inherent tie-in with yang-data-api representation – via its getDefaultValue() method. It also implies SchemaNode in its hierarchy, which is largely unused in yang-data-api users interacting with TypeDefinition.

Define a new interface, yang.data.api.type.NormalizedType, which will expose the same information as yang.model.api.TypeDefinition. The interface hierarchy should capture the base YANG types, such there is a yang.data.api.type.Uint8Type, etc. mirroring yang.model.api.type. Note the base interface should not be generic.

Return this type from DataSchemaContext.SimpleValue#type().


Generated at Wed Feb 07 20:56:25 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.