[MDSAL-6] Classes should be generated for typedef and grouping of same name Created: 04/Mar/14  Updated: 09/Mar/18  Resolved: 10/Mar/17

Status: Resolved
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Tony Tkacik Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


Issue Links:
Blocks
blocks MDSAL-40 Milestone: Implement Binding Specific... Resolved
Duplicate
duplicates MDSAL-1 Binding Specification: Grouping, data... Resolved

 Description   

When using sal code generator with yang maven plugin on a yang file with typedef and grouping sharing the same name, no warning is produced and only the code for typedef is generated.

example yang file content:

typedef network-topology-ref

{ type instance-identifier; ... }

grouping network-topology-ref {
leaf network-topology-ref

{ type network-topology-ref; mandatory true; ... }

}

This should result in generating one class representing typedef network-topology-ref and one interface representing grouping.

This will require new binding specification.



 Comments   
Comment by Jozef Gloncak [ 24/Mar/14 ]

Current state:
In project binding-java-api-generator in GeneratorJavaFile class in method generateTypeToJavaFile() there is validation which checks whether the file with same name isn't preset. If it is so the warn is logged to logger.

It needs to be specified how should be this name conflict solved (specific folder, specific name...)

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