-
Notifications
You must be signed in to change notification settings - Fork 107
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
Doesn't choice and case statement in YANG result in oneof fields in proto? #948
Labels
Milestone
Comments
Hi Baalajee, your proposal makes sense. It would be a breaking change but it conforms to YANG's specs better. The entrypoint to changing this would be here: Lines 267 to 286 in f6d9cff
Since we're maintaining ygot on a best-effort basis, I can't give any estimates on when this can be done, but you're welcome to contribute and I'd be happy to give hints and code review. |
Doing this behind a flag would solve the backwards incompatibility issues
at least initially. Some care needs to be taken with what the naming of the
`oneof` is -- but this does seem reasonable. It wasn't something I focused
on when implementing this because OpenConfig doesn't use `choice`/`case`.
I'm also open to helping review a contribution here.
r.
…On Thu, Jan 11, 2024 at 10:45 AM Wen Bo Li ***@***.***> wrote:
Hi Baalajee, your proposal makes sense. It would be a breaking change but
it conforms to YANG's specs better.
The entrypoint to changing this would be here:
https://github.com/openconfig/ygot/blob/f6d9cff4bdcf98553af92a5fef4932cdbc9e8444/genutil/common.go#L267-L286
Since we're maintaining ygot on a best-effort basis, I can't give any
estimates on when this can be done, but you're welcome to contribute and
I'd be happy to give hints and code review.
—
Reply to this email directly, view it on GitHub
<#948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABE43VOVAOW2MLANR7RG5GDYOAXONAVCNFSM6AAAAABBWU72VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBXG42TONJWG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
robjs VRTS
*TZ:* Pacific (America/Los_Angeles) *Desk:* SFO-SPE
Please do not feel obligated to reply outside your working hours!
*What is now proved was once only imagined - William Blake.*
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input YANG file:
Output proto file:
Should the generated proto be?
The text was updated successfully, but these errors were encountered: