-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance the YangYinParser API to work with none file-based yang sources #12
Comments
Thank you. What are you expect? Inputstream?url?
…________________________________
冯冲 Feng Chong
Mobile: +86-13776612983
Email: ***@***.***
发件人:Ahmed Elhassany ***@***.***>
收件人:yang-central/yangkit ***@***.***>
抄 送:Subscribed ***@***.***>
时 间:2023-02-17 23:14:18
主 题:[yang-central/yangkit] Enhance the YangYinParser API to work with none file-based yang sources (Issue #12)
Currently, the YangYinParser provides 8 public methods for parsing YANG schemas, all of which are File or Directory based. This represents a tight coupling to the filesystem and can limit the usage of this API inside other libraries that don't save the schema on a traditional file system.
Is there any futures plans to refactor this API and decouple YangYinParser from how the yang schemas are stored?
The current, API
1. public static YangSchemaContext parse(List<File> yangFiles)
2. public static YangSchemaContext parse(File yangDir)
3. public static YangSchemaContext parse(File yangDir, YangSchemaContext context)
4. public static YangSchemaContext parse(String yangDir)
5. public static YangSchemaContext parse(String yangDir, String dependency, String capabilities)
6. public static YangSchemaContext parse(String yangDir, String capabilities)
7. public static YangSchemaContext parse(String yangDir, YangSchemaContext context)
8. public static YangSchemaContext parse(List<File> files, YangSchemaContext context)
—
Reply to this email directly, view it on GitHub<#12>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABZEQZL5UNOERICHIFMD5OTWX6IUDANCNFSM6AAAAAAU7RMUKM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Yes, |
@ahassany I have added some APIs to support parsing YANG from inputstream. expect your opinion about this. public static YangSchemaContext parse(InputStream inputStream, /** |
Hi, is this implemented already somehow? Thanks |
Yes, it has been implemented. |
can you please provide sample to implement from String ? the javadoc dont seems to be working and can't find any example |
@marcosbis I add some examples in README.md of yangkit-parser module. Is it enough for you? |
Currently, the
YangYinParser
provides 8 public methods for parsing YANG schemas, all of which are File or Directory based. This represents a tight coupling to the filesystem and can limit the usage of this API inside other libraries that don't save the schema on a traditional file system.Is there any futures plans to refactor this API and decouple
YangYinParser
from how the yang schemas are stored?The current, API
public static YangSchemaContext parse(List<File> yangFiles)
public static YangSchemaContext parse(File yangDir)
public static YangSchemaContext parse(File yangDir, YangSchemaContext context)
public static YangSchemaContext parse(String yangDir)
public static YangSchemaContext parse(String yangDir, String dependency, String capabilities)
public static YangSchemaContext parse(String yangDir, String capabilities)
public static YangSchemaContext parse(String yangDir, YangSchemaContext context)
public static YangSchemaContext parse(List<File> files, YangSchemaContext context)
The text was updated successfully, but these errors were encountered: