Amartus / yang2swagger

Yang to swagger generator
Eclipse Public License 1.0
32 stars 21 forks source link

Schema Mount support #45

Open kaja-mohideen opened 4 years ago

kaja-mohideen commented 4 years ago

1/ Recognise the ietf-yang-schema-mount - mount point extension in yang module. 2/ Allow specifying a module as mounted in a mount-point defined by other module in same generation/execution.

bartoszm commented 2 years ago

@kaja-mohideen if you still interested in this feature? could you give me a minimal example of how output should look like for given input ?

kaja-mohideen commented 2 years ago

Yes. I'm interested in this feature. demo-mount.zip

In the attached zip, I have provided a minimal yang model "list-manager" that provides a mountpoint where entry-type-1 and entry-type-2 can be mounted in runtime by a NETCONF / RESTCONF Server.

Since yang2swagger has no support for that now, I have commented 2 lines in list-manager.yang (Line 6 and 46) that imports and declares the mount-point.

To demonstrate how the data structure should be, I have defined the contents of entry-type-1 and entry-type-2 modules inside a grouping and used "uses" in list-manager. See the generated swagger.yaml.

Once this feature is implemented