Closed sdj38 closed 6 years ago
Actually it is already supported path handle builder have a parameter to include module name for example com.mrv.yangtools.codegen.impl.path.rfc8040.PathHandlerBuilder#useModuleName it is not directly supported from CLI but you can see an example of how to configure path builder from code here: https://github.com/bartoszm/yang2swagger/blob/master/examples/build-standalone/src/main/java/com/mrv/yangtools/example/YamlGenerator.java
@sdj38 Do you know how to use build in feature and we can close this pull request? if not please let me know - I will show you how to use it and probably update documentation ;)
Thanks for letting me know about the path builder. I will just use that thanks. I will close this PR.
In case someone comes across this, there is now a -use-namespaces
flag (mentioned in the README) that adds the namespace without the need to edit anything, so try that first.
I noticed that the paths for .../operations/ in the RFC spec require the module name before the operation name. For example instead of
/restconf/operations/reset
if 'reset' was inside a 'system' module it should look like this/restconf/operations/system:reset
more details can be found here. https://tools.ietf.org/html/rfc8040#section-3.6