openconfig / goyang

YANG parser and compiler to produce Go language objects
Apache License 2.0
218 stars 83 forks source link

enum values are not exported in rawSchema JSON Fixes #227 #229

Closed SeanCondon closed 2 years ago

SeanCondon commented 2 years ago

Making ToInt and ToString public on the EnumType

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

SeanCondon commented 2 years ago

retest this please

robshakir commented 2 years ago

LGTM, thanks for the contribution - please could you re-push to the branch, it seems that the CI didn't run to test this.

We should add a TODO to have something that tests the expected JSON output for these types if they are to become a public API. @wenovus and I will discuss this and we can figure out the right thing to do.

SeanCondon commented 2 years ago

Thanks Rob. @wenovus - are you OK with this change?

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 84.008% when pulling 0d8e3c7505802d827ec67c57454095d97ef31537 on SeanCondon:scEnumsInSchema into 99352f03fad2f94e5fea414dfb83c9c3bb6c28e3 on openconfig:master.

SeanCondon commented 2 years ago

@wenovus - re the "github action workflow isn't running" - I added a specific unit test for the Enum JSON serialization to push the patch again, but the tests are still not run. I think this action may have been broken for a while, because when I run go test ./... on the master branch, I can see there are some failures there in relation to Decimal arithmetic which are unrelated to this change

wenovus commented 2 years ago

@wenovus - re the "github action workflow isn't running" - I added a specific unit test for the Enum JSON serialization to push the patch again, but the tests are still not run. I think this action may have been broken for a while, because when I run go test ./... on the master branch, I can see there are some failures there in relation to Decimal arithmetic which are unrelated to this change

The checks look to be running now (9 successful checks), are you seeing/expecting something else on your end? I just ran go test ./... locally on master and it looks to be passing.

SeanCondon commented 2 years ago

@wenovus - I think I had an environment problem - tests are passing for me now. I can wait for the next release, so please go ahead and merge. Thanks for review