Repository: openconfig/ygot
Pull request #359 (2020-03-18 13:52:20)

Add initial mapping of proto messages to gNMI paths.
This is the start of a set of PRs to put together functionality to map from a ygot-generated protobuf to <path,value> pairs. This is to support efficient encoding on the wire for large datasets, and implementations that use protobuf as transport, whilst using ygot-generated Go internally.

```
 * (M) proto/{yext,ywrapper}
  - Regenerate protos using new versions of protoc-gen-go to take
    advantage of new protobuf/protoreflect APIs.
 * (M) ygot/*
  - Add initial functions to map from input proto to <path, value>
    pairs. Currently handles basic types.
  - Add example proto for tests.
```

coveralls: 
[![Coverage Status](https://coveralls.io/builds/29488111/badge)](https://coveralls.io/builds/29488111)

Coverage increased (+0.03%) to 90.737% when pulling **25ce84a860a4dc90ec9fdc13b06c67f82dd7a867 on protoyang** into **6daf745bd5f14eda714e98cec83884e5b3954898 on master**.

wenovus: resolves #325 

Patch:
diff --git a/.travis.yml b/.travis.yml
index 7c42310..f502d83 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,12 +4,13 @@ go:
         - 1.13.x
         - 1.14.x
         - master
+env: GO111MODULE=on
 before_install:
         - ./scripts/install_protobuf.sh
         - export PATH=$PATH:$HOME/protobuf/bin:$GOPATH/bin
 install:
         - go get -u golang.org/x/tools/cmd/goimports
-        - go get -u github.com/golang/protobuf/protoc-gen-go
+        - go get -u google.golang.org/protobuf/cmd/protoc-gen-go
         - make install
 script:
         - go test ./...
diff --git a/Gopkg.lock b/Gopkg.lock
deleted file mode 100644
index a6ddeed..0000000
--- a/Gopkg.lock
+++ /dev/null
@@ -1,69 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
-  branch = "master"
-  name = "github.com/golang/glog"
-  packages = ["."]
-  revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"
-
-[[projects]]
-  branch = "master"
-  name = "github.com/golang/protobuf"
-  packages = ["proto","protoc-gen-go/descriptor","ptypes/any"]
-  revision = "ab9f9a6dab164b7d1246e0e688b0ab7b94d8553e"
-
-[[projects]]
-  branch = "master"
-  name = "github.com/kylelemons/godebug"
-  packages = ["diff","pretty"]
-  revision = "d65d576e9348f5982d7f6d83682b694e731a45c6"
-
-[[projects]]
-  branch = "master"
-  name = "github.com/openconfig/gnmi"
-  packages = ["ctree","errlist","proto/gnmi","value"]
-  revision = "d1e6f297652918f9b65c77f36bbd644b21a9fc0b"
-
-[[projects]]
-  branch = "master"
-  name = "github.com/openconfig/goyang"
-  packages = ["pkg/indent","pkg/yang"]
-  revision = "c3ce856084b58eb1aedacb4086e748732485c832"
-
-[[projects]]
-  name = "github.com/pmezard/go-difflib"
-  packages = ["difflib"]
-  revision = "792786c7400a136282c1664665ae0a8db921c6c2"
-  version = "v1.0.0"
-
-[[projects]]
-  branch = "master"
-  name = "golang.org/x/net"
-  packages = ["context","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"]
-  revision = "57efc9c3d9f91fb3277f8da1cff370539c4d3dc5"
-
-[[projects]]
-  branch = "master"
-  name = "golang.org/x/text"
-  packages = ["internal/gen","internal/triegen","internal/ucd","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"]
-  revision = "ac87088df8ef557f1e32cd00ed0b6fbc3f7ddafb"
-
-[[projects]]
-  branch = "master"
-  name = "google.golang.org/genproto"
-  packages = ["googleapis/rpc/status"]
-  revision = "ee236bd376b077c7a89f260c026c4735b195e459"
-
-[[projects]]
-  name = "google.golang.org/grpc"
-  packages = [".","codes","connectivity","credentials","grpclb/grpc_lb_v1","grpclog","internal","keepalive","metadata","naming","peer","stats","status","tap","transport"]
-  revision = "b3ddf786825de56a4178401b7e174ee332173b66"
-  version = "v1.5.2"
-
-[solve-meta]
-  analyzer-name = "dep"
-  analyzer-version = 1
-  inputs-digest = "92f7d7c41a7fb2906886a4ea1cae5a4400acba6b7a8724bfc0489211a7f09a2c"
-  solver-name = "gps-cdcl"
-  solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
deleted file mode 100644
index 8616bbb..0000000
--- a/Gopkg.toml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# Gopkg.toml example
-#
-# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-#   name = "github.com/user/project"
-#   version = "1.0.0"
-#
-# [[constraint]]
-#   name = "github.com/user/project2"
-#   branch = "dev"
-#   source = "github.com/myfork/project2"
-#
-# [[override]]
-#  name = "github.com/x/y"
-#  version = "2.4.0"
-
-
-[[constraint]]
-  branch = "master"
-  name = "github.com/golang/glog"
-
-[[constraint]]
-  branch = "master"
-  name = "github.com/golang/protobuf"
-
-[[constraint]]
-  branch = "master"
-  name = "github.com/kylelemons/godebug"
-
-[[constraint]]
-  branch = "master"
-  name = "github.com/openconfig/gnmi"
-
-[[constraint]]
-  branch = "master"
-  name = "github.com/openconfig/goyang"
-
-[[constraint]]
-  name = "github.com/pmezard/go-difflib"
-  version = "1.0.0"
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..13f5bb2
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,16 @@
+module github.com/openconfig/ygot
+
+go 1.14
+
+require (
+	github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
+	github.com/golang/protobuf v1.4.0-rc.4
+	github.com/google/go-cmp v0.4.0
+	github.com/kylelemons/godebug v1.1.0
+	github.com/openconfig/gnmi v0.0.0-20200307010808-e7106f7f5493
+	github.com/openconfig/goyang v0.0.0-20200309174518-a00bece872fc
+	github.com/pmezard/go-difflib v1.0.0
+	google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c
+	google.golang.org/grpc v1.28.0
+	google.golang.org/protobuf v1.20.1
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..b5fdbdb
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,88 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4 h1:+EOh4OY6tjM6ZueeUKinl1f0U2820HzQOuf1iqMnsks=
+github.com/golang/protobuf v1.4.0-rc.4/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
+github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
+github.com/openconfig/gnmi v0.0.0-20200307010808-e7106f7f5493 h1:e/znXbq+Yiws97a4lJYlUeRw9OGxT2q27L4aMUb0GuM=
+github.com/openconfig/gnmi v0.0.0-20200307010808-e7106f7f5493/go.mod h1:jMSUQIR4z9WTtM58/QBHbElXAwbUnomFdty1aund1uY=
+github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU=
+github.com/openconfig/goyang v0.0.0-20200309174518-a00bece872fc h1:W6XYKuH3mxF5WFhsSQOPPN9DRDba1xz9lbUbQR3uHkg=
+github.com/openconfig/goyang v0.0.0-20200309174518-a00bece872fc/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU=
+github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c h1:5aI3/f/3eCZps9xwoEnmgfDJDhMbnJpfqeGpjVNgVEI=
+google.golang.org/genproto v0.0.0-20200319113533-08878b785e9c/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
+google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.20.1 h1:ESRXHgpUBG5D2I5mmsQIyYxB/tQIZfSZ8wLyFDf/N/U=
+google.golang.org/protobuf v1.20.1/go.mod h1:KqelGeouBkcbcuB3HCk4/YH2tmNLk6YSWA5LIWeI/lY=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/proto/yext/yext.pb.go b/proto/yext/yext.pb.go
index 635dace..56414f9 100644
--- a/proto/yext/yext.pb.go
+++ b/proto/yext/yext.pb.go
@@ -1,69 +1,147 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: github.com/openconfig/ygot/proto/yext/yext.proto
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 
-/*
-Package yext is a generated protocol buffer package.
+// yext extends the Protobuf FieldOptions to add allow new options to be
+// set storing characteristics of the YANG schema from which a protobuf
+// is generated.
 
-It is generated from these files:
-	github.com/openconfig/ygot/proto/yext/yext.proto
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.20.1-devel
+// 	protoc        v3.11.4
+// source: github.com/openconfig/ygot/proto/yext/yext.proto
 
-It has these top-level messages:
-*/
 package yext
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
+import (
+	proto "github.com/golang/protobuf/proto"
+	descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+)
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+// This is a compile-time assertion that a sufficiently up-to-date version
+// of the legacy proto package is being used.
+const _ = proto.ProtoPackageIsVersion4
 
-var E_Schemapath = &proto.ExtensionDesc{
-	ExtendedType:  (*google_protobuf.FieldOptions)(nil),
-	ExtensionType: (*string)(nil),
-	Field:         1040,
-	Name:          "yext.schemapath",
-	Tag:           "bytes,1040,opt,name=schemapath",
-	Filename:      "github.com/openconfig/ygot/proto/yext/yext.proto",
+var file_github_com_openconfig_ygot_proto_yext_yext_proto_extTypes = []protoimpl.ExtensionInfo{
+	{
+		ExtendedType:  (*descriptor.FieldOptions)(nil),
+		ExtensionType: (*string)(nil),
+		Field:         1040,
+		Name:          "yext.schemapath",
+		Tag:           "bytes,1040,opt,name=schemapath",
+		Filename:      "github.com/openconfig/ygot/proto/yext/yext.proto",
+	},
+	{
+		ExtendedType:  (*descriptor.EnumValueOptions)(nil),
+		ExtensionType: (*string)(nil),
+		Field:         1040,
+		Name:          "yext.yang_name",
+		Tag:           "bytes,1040,opt,name=yang_name",
+		Filename:      "github.com/openconfig/ygot/proto/yext/yext.proto",
+	},
 }
 
-var E_YangName = &proto.ExtensionDesc{
-	ExtendedType:  (*google_protobuf.EnumValueOptions)(nil),
-	ExtensionType: (*string)(nil),
-	Field:         1040,
-	Name:          "yext.yang_name",
-	Tag:           "bytes,1040,opt,name=yang_name,json=yangName",
-	Filename:      "github.com/openconfig/ygot/proto/yext/yext.proto",
-}
+// Extension fields to descriptor.FieldOptions.
+var (
+	// schemapath stores the schema path to the field within the YANG schema.
+	// The path stored is absolute if the entity is at the root of the schema
+	// tree. In the case that it is not (i.e., it is an entity that has a parent
+	// which is not a module, the path supplied is the relative path to the
+	// parent of the entity). The field number for this extension is reserved
+	// in the global protobuf registry.
+	//
+	// optional string schemapath = 1040;
+	E_Schemapath = &file_github_com_openconfig_ygot_proto_yext_yext_proto_extTypes[0]
+)
 
-func init() {
-	proto.RegisterExtension(E_Schemapath)
-	proto.RegisterExtension(E_YangName)
+// Extension fields to descriptor.EnumValueOptions.
+var (
+	// yang_name stores the original YANG name of the enumerated value, for
+	// serialisation to a string. The field number for this extension is
+	// reserved in the global protobuf registry.
+	//
+	// optional string yang_name = 1040;
+	E_YangName = &file_github_com_openconfig_ygot_proto_yext_yext_proto_extTypes[1]
+)
+
+var File_github_com_openconfig_ygot_proto_yext_yext_proto protoreflect.FileDescriptor
+
+var file_github_com_openconfig_ygot_proto_yext_yext_proto_rawDesc = []byte{
+	0x0a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65,
+	0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x12, 0x04, 0x79, 0x65, 0x78, 0x74, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+	0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+	0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x0a, 0x73, 0x63,
+	0x68, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
+	0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x90, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+	0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x3f, 0x0a, 0x09, 0x79, 0x61,
+	0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61,
+	0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x90, 0x08, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x79, 0x61, 0x6e, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67,
+	0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f,
+	0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
+	0x79, 0x65, 0x78, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
-func init() { proto.RegisterFile("github.com/openconfig/ygot/proto/yext/yext.proto", fileDescriptor0) }
+var file_github_com_openconfig_ygot_proto_yext_yext_proto_goTypes = []interface{}{
+	(*descriptor.FieldOptions)(nil),     // 0: google.protobuf.FieldOptions
+	(*descriptor.EnumValueOptions)(nil), // 1: google.protobuf.EnumValueOptions
+}
+var file_github_com_openconfig_ygot_proto_yext_yext_proto_depIdxs = []int32{
+	0, // 0: yext.schemapath:extendee -> google.protobuf.FieldOptions
+	1, // 1: yext.yang_name:extendee -> google.protobuf.EnumValueOptions
+	2, // [2:2] is the sub-list for method output_type
+	2, // [2:2] is the sub-list for method input_type
+	2, // [2:2] is the sub-list for extension type_name
+	0, // [0:2] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
 
-var fileDescriptor0 = []byte{
-	// 181 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0xcc, 0xb1, 0x0a, 0xc2, 0x30,
-	0x10, 0x80, 0x61, 0x04, 0x91, 0x36, 0x63, 0x27, 0x11, 0x84, 0xba, 0x39, 0x25, 0x82, 0x5b, 0x07,
-	0x9d, 0x74, 0x54, 0x70, 0x70, 0x95, 0x34, 0xbd, 0xa6, 0x81, 0x26, 0x17, 0xda, 0x0b, 0xd8, 0xb7,
-	0xf0, 0x91, 0xa5, 0x0d, 0x82, 0xe8, 0x72, 0xdc, 0xc1, 0xff, 0x1d, 0xdb, 0x69, 0x43, 0x4d, 0x28,
-	0xb9, 0x42, 0x2b, 0xd0, 0x83, 0x53, 0xe8, 0x6a, 0xa3, 0xc5, 0xa0, 0x91, 0x84, 0xef, 0x90, 0x50,
-	0x0c, 0xf0, 0xa4, 0x69, 0xf0, 0xe9, 0xce, 0xe6, 0xe3, 0xbe, 0xca, 0x35, 0xa2, 0x6e, 0x21, 0x36,
-	0x65, 0xa8, 0x45, 0x05, 0xbd, 0xea, 0x8c, 0x27, 0xec, 0x62, 0x57, 0x1c, 0x18, 0xeb, 0x55, 0x03,
-	0x56, 0x7a, 0x49, 0x4d, 0xb6, 0xe6, 0x11, 0xf0, 0x0f, 0xe0, 0x67, 0x03, 0x6d, 0x75, 0xf5, 0x64,
-	0xd0, 0xf5, 0xcb, 0x57, 0x92, 0xcf, 0xb6, 0xe9, 0xed, 0x4b, 0x14, 0x47, 0x96, 0x0e, 0xd2, 0xe9,
-	0x87, 0x93, 0x16, 0xb2, 0xcd, 0x1f, 0x3f, 0xb9, 0x60, 0xef, 0xb2, 0x0d, 0xf0, 0xf3, 0x22, 0x19,
-	0xd1, 0x45, 0x5a, 0x28, 0x17, 0x53, 0xbb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x80, 0x8f, 0xa8,
-	0x80, 0xe3, 0x00, 0x00, 0x00,
+func init() { file_github_com_openconfig_ygot_proto_yext_yext_proto_init() }
+func file_github_com_openconfig_ygot_proto_yext_yext_proto_init() {
+	if File_github_com_openconfig_ygot_proto_yext_yext_proto != nil {
+		return
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_github_com_openconfig_ygot_proto_yext_yext_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   0,
+			NumExtensions: 2,
+			NumServices:   0,
+		},
+		GoTypes:           file_github_com_openconfig_ygot_proto_yext_yext_proto_goTypes,
+		DependencyIndexes: file_github_com_openconfig_ygot_proto_yext_yext_proto_depIdxs,
+		ExtensionInfos:    file_github_com_openconfig_ygot_proto_yext_yext_proto_extTypes,
+	}.Build()
+	File_github_com_openconfig_ygot_proto_yext_yext_proto = out.File
+	file_github_com_openconfig_ygot_proto_yext_yext_proto_rawDesc = nil
+	file_github_com_openconfig_ygot_proto_yext_yext_proto_goTypes = nil
+	file_github_com_openconfig_ygot_proto_yext_yext_proto_depIdxs = nil
 }
diff --git a/proto/yext/yext.proto b/proto/yext/yext.proto
index ae51488..c1ae222 100644
--- a/proto/yext/yext.proto
+++ b/proto/yext/yext.proto
@@ -21,6 +21,8 @@ import "google/protobuf/descriptor.proto";
 
 package yext;
 
+option go_package = "github.com/openconfig/ygot/proto/yext";
+
 extend google.protobuf.FieldOptions {
   // schemapath stores the schema path to the field within the YANG schema.
   // The path stored is absolute if the entity is at the root of the schema
diff --git a/proto/ywrapper/ywrapper.pb.go b/proto/ywrapper/ywrapper.pb.go
index 0b167dd..43d6a09 100644
--- a/proto/ywrapper/ywrapper.pb.go
+++ b/proto/ywrapper/ywrapper.pb.go
@@ -1,51 +1,95 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
 
-/*
-Package ywrapper is a generated protocol buffer package.
+// ywrapper is a set of wrapper protobuf messages that can be used
+// with a protobuf that is automatically generated from a YANG schema.
+// The messages are used for scalar fields such that unset fields can
+// be distinguished from those that take a generated language's default
+// value.
 
-It is generated from these files:
-	github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.20.1-devel
+// 	protoc        v3.11.4
+// source: github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto
 
-It has these top-level messages:
-	BytesValue
-	BoolValue
-	Decimal64Value
-	IntValue
-	StringValue
-	UintValue
-*/
 package ywrapper
 
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+	proto "github.com/golang/protobuf/proto"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+// This is a compile-time assertion that a sufficiently up-to-date version
+// of the legacy proto package is being used.
+const _ = proto.ProtoPackageIsVersion4
 
 // BytesValue is used to store a value which is a byte array, particularly
 // the YANG binary type.
 type BytesValue struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
 }
 
-func (m *BytesValue) Reset()                    { *m = BytesValue{} }
-func (m *BytesValue) String() string            { return proto.CompactTextString(m) }
-func (*BytesValue) ProtoMessage()               {}
-func (*BytesValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (x *BytesValue) Reset() {
+	*x = BytesValue{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BytesValue) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
 
-func (m *BytesValue) GetValue() []byte {
-	if m != nil {
-		return m.Value
+func (*BytesValue) ProtoMessage() {}
+
+func (x *BytesValue) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BytesValue.ProtoReflect.Descriptor instead.
+func (*BytesValue) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *BytesValue) GetValue() []byte {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
@@ -53,17 +97,48 @@ func (m *BytesValue) GetValue() []byte {
 // BoolValue is used to store a value which is a boolean, particularly the
 // YANG bool and empty types.
 type BoolValue struct {
-	Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *BoolValue) Reset() {
+	*x = BoolValue{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BoolValue) String() string {
+	return protoimpl.X.MessageStringOf(x)
 }
 
-func (m *BoolValue) Reset()                    { *m = BoolValue{} }
-func (m *BoolValue) String() string            { return proto.CompactTextString(m) }
-func (*BoolValue) ProtoMessage()               {}
-func (*BoolValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
+func (*BoolValue) ProtoMessage() {}
 
-func (m *BoolValue) GetValue() bool {
-	if m != nil {
-		return m.Value
+func (x *BoolValue) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BoolValue.ProtoReflect.Descriptor instead.
+func (*BoolValue) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *BoolValue) GetValue() bool {
+	if x != nil {
+		return x.Value
 	}
 	return false
 }
@@ -72,25 +147,56 @@ func (m *BoolValue) GetValue() bool {
 // a digits field, and a precision field. The precision indicates the number
 // of digits that occur after the decimal point in the digits field.
 type Decimal64Value struct {
-	Digits    int64  `protobuf:"varint,1,opt,name=digits" json:"digits,omitempty"`
-	Precision uint32 `protobuf:"varint,2,opt,name=precision" json:"precision,omitempty"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Digits    int64  `protobuf:"varint,1,opt,name=digits,proto3" json:"digits,omitempty"`
+	Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"`
+}
+
+func (x *Decimal64Value) Reset() {
+	*x = Decimal64Value{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Decimal64Value) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Decimal64Value) ProtoMessage() {}
+
+func (x *Decimal64Value) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
 }
 
-func (m *Decimal64Value) Reset()                    { *m = Decimal64Value{} }
-func (m *Decimal64Value) String() string            { return proto.CompactTextString(m) }
-func (*Decimal64Value) ProtoMessage()               {}
-func (*Decimal64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
+// Deprecated: Use Decimal64Value.ProtoReflect.Descriptor instead.
+func (*Decimal64Value) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP(), []int{2}
+}
 
-func (m *Decimal64Value) GetDigits() int64 {
-	if m != nil {
-		return m.Digits
+func (x *Decimal64Value) GetDigits() int64 {
+	if x != nil {
+		return x.Digits
 	}
 	return 0
 }
 
-func (m *Decimal64Value) GetPrecision() uint32 {
-	if m != nil {
-		return m.Precision
+func (x *Decimal64Value) GetPrecision() uint32 {
+	if x != nil {
+		return x.Precision
 	}
 	return 0
 }
@@ -98,17 +204,48 @@ func (m *Decimal64Value) GetPrecision() uint32 {
 // IntValue stores a value which a signed integer, particularly the YANG
 // int8, int16, int32, and int64 types.
 type IntValue struct {
-	Value int64 `protobuf:"zigzag64,1,opt,name=value" json:"value,omitempty"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Value int64 `protobuf:"zigzag64,1,opt,name=value,proto3" json:"value,omitempty"`
 }
 
-func (m *IntValue) Reset()                    { *m = IntValue{} }
-func (m *IntValue) String() string            { return proto.CompactTextString(m) }
-func (*IntValue) ProtoMessage()               {}
-func (*IntValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
+func (x *IntValue) Reset() {
+	*x = IntValue{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
 
-func (m *IntValue) GetValue() int64 {
-	if m != nil {
-		return m.Value
+func (x *IntValue) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IntValue) ProtoMessage() {}
+
+func (x *IntValue) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use IntValue.ProtoReflect.Descriptor instead.
+func (*IntValue) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *IntValue) GetValue() int64 {
+	if x != nil {
+		return x.Value
 	}
 	return 0
 }
@@ -116,17 +253,48 @@ func (m *IntValue) GetValue() int64 {
 // StringValue stores a value which is a string, particularly the YANG
 // string type.
 type StringValue struct {
-	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *StringValue) Reset() {
+	*x = StringValue{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *StringValue) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringValue) ProtoMessage() {}
+
+func (x *StringValue) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
 }
 
-func (m *StringValue) Reset()                    { *m = StringValue{} }
-func (m *StringValue) String() string            { return proto.CompactTextString(m) }
-func (*StringValue) ProtoMessage()               {}
-func (*StringValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
+// Deprecated: Use StringValue.ProtoReflect.Descriptor instead.
+func (*StringValue) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP(), []int{4}
+}
 
-func (m *StringValue) GetValue() string {
-	if m != nil {
-		return m.Value
+func (x *StringValue) GetValue() string {
+	if x != nil {
+		return x.Value
 	}
 	return ""
 }
@@ -134,48 +302,205 @@ func (m *StringValue) GetValue() string {
 // UintVal is used to store a value which an unsigned integer, particularly
 // the YANG uint8, uint16, uint32 and uint64 types.
 type UintValue struct {
-	Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *UintValue) Reset() {
+	*x = UintValue{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UintValue) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UintValue) ProtoMessage() {}
+
+func (x *UintValue) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
 }
 
-func (m *UintValue) Reset()                    { *m = UintValue{} }
-func (m *UintValue) String() string            { return proto.CompactTextString(m) }
-func (*UintValue) ProtoMessage()               {}
-func (*UintValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
+// Deprecated: Use UintValue.ProtoReflect.Descriptor instead.
+func (*UintValue) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP(), []int{5}
+}
 
-func (m *UintValue) GetValue() uint64 {
-	if m != nil {
-		return m.Value
+func (x *UintValue) GetValue() uint64 {
+	if x != nil {
+		return x.Value
 	}
 	return 0
 }
 
-func init() {
-	proto.RegisterType((*BytesValue)(nil), "ywrapper.BytesValue")
-	proto.RegisterType((*BoolValue)(nil), "ywrapper.BoolValue")
-	proto.RegisterType((*Decimal64Value)(nil), "ywrapper.Decimal64Value")
-	proto.RegisterType((*IntValue)(nil), "ywrapper.IntValue")
-	proto.RegisterType((*StringValue)(nil), "ywrapper.StringValue")
-	proto.RegisterType((*UintValue)(nil), "ywrapper.UintValue")
-}
-
-func init() {
-	proto.RegisterFile("github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto", fileDescriptor0)
-}
-
-var fileDescriptor0 = []byte{
-	// 209 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
-	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x2f, 0x48, 0xcd, 0x4b, 0xce, 0xcf, 0x4b, 0xcb,
-	0x4c, 0xd7, 0xaf, 0x4c, 0xcf, 0x2f, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xaf, 0x2c, 0x2f,
-	0x4a, 0x2c, 0x28, 0x48, 0x2d, 0x82, 0x33, 0xf4, 0xc0, 0xe2, 0x42, 0x1c, 0x30, 0xbe, 0x92, 0x12,
-	0x17, 0x97, 0x53, 0x65, 0x49, 0x6a, 0x71, 0x58, 0x62, 0x4e, 0x69, 0xaa, 0x90, 0x08, 0x17, 0x6b,
-	0x19, 0x88, 0x21, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0xe1, 0x28, 0x29, 0x72, 0x71, 0x3a,
-	0xe5, 0xe7, 0xe7, 0x60, 0x51, 0xc2, 0x01, 0x53, 0xe2, 0xc6, 0xc5, 0xe7, 0x92, 0x9a, 0x9c, 0x99,
-	0x9b, 0x98, 0x63, 0x66, 0x02, 0x51, 0x27, 0xc6, 0xc5, 0x96, 0x92, 0x99, 0x9e, 0x59, 0x52, 0x0c,
-	0x56, 0xc8, 0x1c, 0x04, 0xe5, 0x09, 0xc9, 0x70, 0x71, 0x16, 0x14, 0xa5, 0x26, 0x67, 0x16, 0x67,
-	0xe6, 0xe7, 0x49, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x06, 0x21, 0x04, 0x94, 0x14, 0xb8, 0x38, 0x3c,
-	0xf3, 0x4a, 0xb0, 0xd8, 0x24, 0x04, 0xb3, 0x49, 0x99, 0x8b, 0x3b, 0xb8, 0xa4, 0x28, 0x33, 0x2f,
-	0x1d, 0x8b, 0x22, 0x4e, 0x24, 0x17, 0x87, 0x66, 0x62, 0x35, 0x87, 0x05, 0xaa, 0x24, 0x89, 0x0d,
-	0x1c, 0x12, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x13, 0x9f, 0xa4, 0x45, 0x01, 0x00,
-	0x00,
+var File_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto protoreflect.FileDescriptor
+
+var file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDesc = []byte{
+	0x0a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65,
+	0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x79, 0x77, 0x72, 0x61,
+	0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x79, 0x77, 0x72, 0x61,
+	0x70, 0x70, 0x65, 0x72, 0x22, 0x22, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c,
+	0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x46, 0x0a, 0x0e, 0x44,
+	0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a,
+	0x06, 0x64, 0x69, 0x67, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64,
+	0x69, 0x67, 0x69, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69,
+	0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73,
+	0x69, 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+	0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05,
+	0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56,
+	0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x09, 0x55, 0x69,
+	0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2b, 0x5a,
+	0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
+	0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
+}
+
+var (
+	file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescOnce sync.Once
+	file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescData = file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDesc
+)
+
+func file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescGZIP() []byte {
+	file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescOnce.Do(func() {
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescData)
+	})
+	return file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDescData
+}
+
+var file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_goTypes = []interface{}{
+	(*BytesValue)(nil),     // 0: ywrapper.BytesValue
+	(*BoolValue)(nil),      // 1: ywrapper.BoolValue
+	(*Decimal64Value)(nil), // 2: ywrapper.Decimal64Value
+	(*IntValue)(nil),       // 3: ywrapper.IntValue
+	(*StringValue)(nil),    // 4: ywrapper.StringValue
+	(*UintValue)(nil),      // 5: ywrapper.UintValue
+}
+var file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_init() }
+func file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_init() {
+	if File_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BytesValue); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BoolValue); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Decimal64Value); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*IntValue); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*StringValue); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UintValue); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   6,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_goTypes,
+		DependencyIndexes: file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_depIdxs,
+		MessageInfos:      file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_msgTypes,
+	}.Build()
+	File_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto = out.File
+	file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_rawDesc = nil
+	file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_goTypes = nil
+	file_github_com_openconfig_ygot_proto_ywrapper_ywrapper_proto_depIdxs = nil
 }
diff --git a/proto/ywrapper/ywrapper.proto b/proto/ywrapper/ywrapper.proto
index a3d2816..664c580 100644
--- a/proto/ywrapper/ywrapper.proto
+++ b/proto/ywrapper/ywrapper.proto
@@ -21,6 +21,8 @@ syntax = "proto3";
 
 package ywrapper;
 
+option go_package = "github.com/openconfig/ygot/proto/ywrapper";
+
 // Wrapper messages are defined to be the most permissive type for the
 // mapped type. Protobuf FieldOptions should be examined to determine the
 // schema information for the field.
diff --git a/ygot/proto.go b/ygot/proto.go
new file mode 100644
index 0000000..8bafb4b
--- /dev/null
+++ b/ygot/proto.go
@@ -0,0 +1,63 @@
+package ygot
+
+import (
+	"fmt"
+	"strings"
+
+	"google.golang.org/protobuf/proto"
+	"google.golang.org/protobuf/reflect/protoreflect"
+	"google.golang.org/protobuf/types/descriptorpb"
+
+	yextpb "github.com/openconfig/ygot/proto/yext"
+	wpb "github.com/openconfig/ygot/proto/ywrapper"
+)
+
+// pathsFromProto returns, from a populated proto, a map between the YANG schema
+// path (as specified in the yext.schemapath extension) and the value populated in
+// the message.
+func pathsFromProto(p proto.Message) (map[string]interface{}, error) {
+	m := p.ProtoReflect()
+	pp := map[string]interface{}{}
+	var rangeErr error
+	m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool {
+		po := fd.Options().(*descriptorpb.FieldOptions)
+		if ex := proto.GetExtension(po, yextpb.E_Schemapath).(string); ex != "" {
+			// Set to scalar value by default -- we extract the value from the
+			// wrapper message, or child messages if required.
+			val := v.Interface()
+			if fd.Kind() == protoreflect.MessageKind {
+				switch t := v.Message().Interface().(type) {
+				case *wpb.BoolValue:
+					val = t.GetValue()
+				case *wpb.BytesValue:
+					val = t.GetValue()
+				case *wpb.Decimal64Value:
+					rangeErr = fmt.Errorf("unhandled type, decimal64")
+					return false
+				case *wpb.IntValue:
+					val = t.GetValue()
+				case *wpb.StringValue:
+					val = t.GetValue()
+				case *wpb.UintValue:
+					val = t.GetValue()
+				case proto.Message:
+					rangeErr = fmt.Errorf("unknown type as field value, type: %T, value: %v", ex, ex)
+					return false
+				}
+			}
+
+			// Handle cases where there is >1 path specified for a field based on
+			// path compression.
+			for _, path := range strings.Split(ex, "|") {
+				pp[path] = val
+			}
+		}
+		return true
+	})
+
+	if rangeErr != nil {
+		return nil, rangeErr
+	}
+
+	return pp, nil
+}


Test patch:
diff --git a/ygot/proto_test.go b/ygot/proto_test.go
new file mode 100644
index 0000000..ca21785
--- /dev/null
+++ b/ygot/proto_test.go
@@ -0,0 +1,80 @@
+package ygot
+
+import (
+	"testing"
+
+	"github.com/google/go-cmp/cmp"
+	"github.com/openconfig/gnmi/errdiff"
+	"google.golang.org/protobuf/proto"
+
+	wpb "github.com/openconfig/ygot/proto/ywrapper"
+	epb "github.com/openconfig/ygot/ygot/testdata/exschemapath"
+)
+
+func TestPathsFromProto(t *testing.T) {
+	tests := []struct {
+		desc             string
+		inMsg            proto.Message
+		wantPaths        map[string]interface{}
+		wantErrSubstring string
+	}{{
+		desc: "simple proto with a single populated path",
+		inMsg: &epb.Interface{
+			Description: &wpb.StringValue{Value: "hello"},
+		},
+		wantPaths: map[string]interface{}{
+			"/interfaces/interface/config/description": "hello",
+		},
+	}, {
+		desc: "example message - supported fields",
+		inMsg: &epb.ExampleMessage{
+			Bo: &wpb.BoolValue{Value: true},
+			By: &wpb.BytesValue{Value: []byte{1, 2, 3, 4}},
+			// De is currently unsupported, needs parsing of decimal64 values.
+			In:  &wpb.IntValue{Value: 42},
+			Str: &wpb.StringValue{Value: "hello"},
+			Ui:  &wpb.UintValue{Value: 42},
+		},
+		wantPaths: map[string]interface{}{
+			"/bool":   true,
+			"/bytes":  []byte{1, 2, 3, 4},
+			"/int":    int64(42),
+			"/string": "hello",
+			"/uint":   uint64(42),
+		},
+	}, {
+		desc: "child messages currently unsupported",
+		inMsg: &epb.ExampleMessage{
+			Ex: &epb.ExampleMessageChild{},
+		},
+		wantErrSubstring: "unknown type as field value",
+	}, {
+		desc: "decimal64 messages currently unsupported",
+		inMsg: &epb.ExampleMessage{
+			De: &wpb.Decimal64Value{Digits: 1234, Precision: 1},
+		},
+		wantErrSubstring: "unhandled type, decimal64",
+	}, {
+		desc: "multiple paths specified",
+		inMsg: &epb.Root_InterfaceKey{
+			Name: "value",
+		},
+		wantPaths: map[string]interface{}{
+			"/interfaces/interface/config/name": "value",
+			"/interfaces/interface/name":        "value",
+		},
+	}}
+
+	for _, tt := range tests {
+		t.Run(tt.desc, func(t *testing.T) {
+			got, err := pathsFromProto(tt.inMsg)
+			if diff := errdiff.Substring(err, tt.wantErrSubstring); diff != "" {
+				t.Fatalf("did not get expected error, %s", diff)
+			}
+
+			if diff := cmp.Diff(got, tt.wantPaths, cmp.Comparer(proto.Equal)); diff != "" {
+				t.Fatalf("did not get expected results, diff(-got,+want):\n%s", diff)
+			}
+		})
+	}
+}
diff --git a/ygot/testdata/exschemapath/exschemapath.pb.go b/ygot/testdata/exschemapath/exschemapath.pb.go
new file mode 100644
index 0000000..efdd067
--- /dev/null
+++ b/ygot/testdata/exschemapath/exschemapath.pb.go
@@ -0,0 +1,603 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.20.0-devel
+// 	protoc        v3.11.4
+// source: github.com/openconfig/ygot/ygot/testdata/exschemapath/exschemapath.proto
+
+package exschemapath
+
+import (
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/openconfig/ygot/proto/yext"
+	ywrapper "github.com/openconfig/ygot/proto/ywrapper"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// This is a compile-time assertion that a sufficiently up-to-date version
+// of the legacy proto package is being used.
+const _ = proto.ProtoPackageIsVersion4
+
+type Root struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	System    *System              `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"`
+	Interface []*Root_InterfaceKey `protobuf:"bytes,422482938,rep,name=interface,proto3" json:"interface,omitempty"`
+}
+
+func (x *Root) Reset() {
+	*x = Root{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Root) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Root) ProtoMessage() {}
+
+func (x *Root) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Root.ProtoReflect.Descriptor instead.
+func (*Root) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Root) GetSystem() *System {
+	if x != nil {
+		return x.System
+	}
+	return nil
+}
+
+func (x *Root) GetInterface() []*Root_InterfaceKey {
+	if x != nil {
+		return x.Interface
+	}
+	return nil
+}
+
+type Interface struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Description *ywrapper.StringValue `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *Interface) Reset() {
+	*x = Interface{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Interface) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Interface) ProtoMessage() {}
+
+func (x *Interface) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Interface.ProtoReflect.Descriptor instead.
+func (*Interface) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Interface) GetDescription() *ywrapper.StringValue {
+	if x != nil {
+		return x.Description
+	}
+	return nil
+}
+
+type System struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Hostname *ywrapper.StringValue `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
+}
+
+func (x *System) Reset() {
+	*x = System{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *System) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*System) ProtoMessage() {}
+
+func (x *System) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use System.ProtoReflect.Descriptor instead.
+func (*System) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *System) GetHostname() *ywrapper.StringValue {
+	if x != nil {
+		return x.Hostname
+	}
+	return nil
+}
+
+type ExampleMessage struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Bo  *ywrapper.BoolValue      `protobuf:"bytes,1,opt,name=bo,proto3" json:"bo,omitempty"`
+	By  *ywrapper.BytesValue     `protobuf:"bytes,2,opt,name=by,proto3" json:"by,omitempty"`
+	De  *ywrapper.Decimal64Value `protobuf:"bytes,3,opt,name=de,proto3" json:"de,omitempty"`
+	In  *ywrapper.IntValue       `protobuf:"bytes,4,opt,name=in,proto3" json:"in,omitempty"`
+	Str *ywrapper.StringValue    `protobuf:"bytes,5,opt,name=str,proto3" json:"str,omitempty"`
+	Ui  *ywrapper.UintValue      `protobuf:"bytes,6,opt,name=ui,proto3" json:"ui,omitempty"`
+	Ex  *ExampleMessageChild     `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex,omitempty"`
+}
+
+func (x *ExampleMessage) Reset() {
+	*x = ExampleMessage{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ExampleMessage) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExampleMessage) ProtoMessage() {}
+
+func (x *ExampleMessage) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExampleMessage.ProtoReflect.Descriptor instead.
+func (*ExampleMessage) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ExampleMessage) GetBo() *ywrapper.BoolValue {
+	if x != nil {
+		return x.Bo
+	}
+	return nil
+}
+
+func (x *ExampleMessage) GetBy() *ywrapper.BytesValue {
+	if x != nil {
+		return x.By
+	}
+	return nil
+}
+
+func (x *ExampleMessage) GetDe() *ywrapper.Decimal64Value {
+	if x != nil {
+		return x.De
+	}
+	return nil
+}
+
+func (x *ExampleMessage) GetIn() *ywrapper.IntValue {
+	if x != nil {
+		return x.In
+	}
+	return nil
+}
+
+func (x *ExampleMessage) GetStr() *ywrapper.StringValue {
+	if x != nil {
+		return x.Str
+	}
+	return nil
+}
+
+func (x *ExampleMessage) GetUi() *ywrapper.UintValue {
+	if x != nil {
+		return x.Ui
+	}
+	return nil
+}
+
+func (x *ExampleMessage) GetEx() *ExampleMessageChild {
+	if x != nil {
+		return x.Ex
+	}
+	return nil
+}
+
+type ExampleMessageChild struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Str *ywrapper.StringValue `protobuf:"bytes,1,opt,name=str,proto3" json:"str,omitempty"`
+}
+
+func (x *ExampleMessageChild) Reset() {
+	*x = ExampleMessageChild{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ExampleMessageChild) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExampleMessageChild) ProtoMessage() {}
+
+func (x *ExampleMessageChild) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExampleMessageChild.ProtoReflect.Descriptor instead.
+func (*ExampleMessageChild) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ExampleMessageChild) GetStr() *ywrapper.StringValue {
+	if x != nil {
+		return x.Str
+	}
+	return nil
+}
+
+type Root_InterfaceKey struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name      string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Interface *Interface `protobuf:"bytes,2,opt,name=interface,proto3" json:"interface,omitempty"`
+}
+
+func (x *Root_InterfaceKey) Reset() {
+	*x = Root_InterfaceKey{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Root_InterfaceKey) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Root_InterfaceKey) ProtoMessage() {}
+
+func (x *Root_InterfaceKey) ProtoReflect() protoreflect.Message {
+	mi := &file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Root_InterfaceKey.ProtoReflect.Descriptor instead.
+func (*Root_InterfaceKey) Descriptor() ([]byte, []int) {
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *Root_InterfaceKey) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *Root_InterfaceKey) GetInterface() *Interface {
+	if x != nil {
+		return x.Interface
+	}
+	return nil
+}
+
+var File_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto protoreflect.FileDescriptor
+
+var file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDesc = []byte{
+	0x0a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65,
+	0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x79, 0x67, 0x6f,
+	0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x65, 0x78, 0x73, 0x63, 0x68,
+	0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+	0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x78, 0x73, 0x63,
+	0x68, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+	0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f,
+	0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70,
+	0x70, 0x65, 0x72, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
+	0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2c, 0x0a,
+	0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+	0x65, 0x78, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x53, 0x79, 0x73,
+	0x74, 0x65, 0x6d, 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x5b, 0x0a, 0x09, 0x69,
+	0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0xfa, 0xa7, 0xba, 0xc9, 0x01, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x74,
+	0x68, 0x2e, 0x52, 0x6f, 0x6f, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65,
+	0x4b, 0x65, 0x79, 0x42, 0x18, 0x82, 0x41, 0x15, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61,
+	0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x09, 0x69,
+	0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x1a, 0x9a, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x74,
+	0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3f, 0x82, 0x41, 0x3c, 0x2f, 0x69, 0x6e, 0x74,
+	0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
+	0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x7c, 0x2f, 0x69,
+	0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66,
+	0x61, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35,
+	0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x17, 0x2e, 0x65, 0x78, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68,
+	0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65,
+	0x72, 0x66, 0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61,
+	0x63, 0x65, 0x12, 0x64, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70,
+	0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2b,
+	0x82, 0x41, 0x28, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x69,
+	0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f,
+	0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73,
+	0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74,
+	0x65, 0x6d, 0x12, 0x4d, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e,
+	0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x1a, 0x82, 0x41, 0x17,
+	0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x68,
+	0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
+	0x65, 0x22, 0xf8, 0x02, 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x02, 0x62, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x13, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x42, 0x6f, 0x6f, 0x6c,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x82, 0x41, 0x05, 0x2f, 0x62, 0x6f, 0x6f, 0x6c, 0x52,
+	0x02, 0x62, 0x6f, 0x12, 0x2f, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x14, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0x82, 0x41, 0x06, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73,
+	0x52, 0x02, 0x62, 0x79, 0x12, 0x35, 0x0a, 0x02, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x18, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x63, 0x69,
+	0x6d, 0x61, 0x6c, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x82, 0x41, 0x08, 0x2f,
+	0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x52, 0x02, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69,
+	0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70,
+	0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x82, 0x41, 0x04,
+	0x2f, 0x69, 0x6e, 0x74, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x33, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
+	0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0x82, 0x41,
+	0x07, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x2d, 0x0a,
+	0x02, 0x75, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x79, 0x77, 0x72, 0x61,
+	0x70, 0x70, 0x65, 0x72, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08,
+	0x82, 0x41, 0x05, 0x2f, 0x75, 0x69, 0x6e, 0x74, 0x52, 0x02, 0x75, 0x69, 0x12, 0x3e, 0x0a, 0x02,
+	0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x78, 0x73, 0x63, 0x68,
+	0x65, 0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x0b, 0x82, 0x41, 0x08,
+	0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x02, 0x65, 0x78, 0x22, 0x4f, 0x0a, 0x13,
+	0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x68,
+	0x69, 0x6c, 0x64, 0x12, 0x38, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x15, 0x2e, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69,
+	0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0x82, 0x41, 0x0c, 0x2f, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x72, 0x52, 0x03, 0x73, 0x74, 0x72, 0x42, 0x37, 0x5a,
+	0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
+	0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x79, 0x67, 0x6f, 0x74,
+	0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x65, 0x78, 0x73, 0x63, 0x68, 0x65,
+	0x6d, 0x61, 0x70, 0x61, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescOnce sync.Once
+	file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescData = file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDesc
+)
+
+func file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescGZIP() []byte {
+	file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescOnce.Do(func() {
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescData)
+	})
+	return file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDescData
+}
+
+var file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_goTypes = []interface{}{
+	(*Root)(nil),                    // 0: exschemapath.Root
+	(*Interface)(nil),               // 1: exschemapath.Interface
+	(*System)(nil),                  // 2: exschemapath.System
+	(*ExampleMessage)(nil),          // 3: exschemapath.ExampleMessage
+	(*ExampleMessageChild)(nil),     // 4: exschemapath.ExampleMessageChild
+	(*Root_InterfaceKey)(nil),       // 5: exschemapath.Root.InterfaceKey
+	(*ywrapper.StringValue)(nil),    // 6: ywrapper.StringValue
+	(*ywrapper.BoolValue)(nil),      // 7: ywrapper.BoolValue
+	(*ywrapper.BytesValue)(nil),     // 8: ywrapper.BytesValue
+	(*ywrapper.Decimal64Value)(nil), // 9: ywrapper.Decimal64Value
+	(*ywrapper.IntValue)(nil),       // 10: ywrapper.IntValue
+	(*ywrapper.UintValue)(nil),      // 11: ywrapper.UintValue
+}
+var file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_depIdxs = []int32{
+	2,  // 0: exschemapath.Root.system:type_name -> exschemapath.System
+	5,  // 1: exschemapath.Root.interface:type_name -> exschemapath.Root.InterfaceKey
+	6,  // 2: exschemapath.Interface.description:type_name -> ywrapper.StringValue
+	6,  // 3: exschemapath.System.hostname:type_name -> ywrapper.StringValue
+	7,  // 4: exschemapath.ExampleMessage.bo:type_name -> ywrapper.BoolValue
+	8,  // 5: exschemapath.ExampleMessage.by:type_name -> ywrapper.BytesValue
+	9,  // 6: exschemapath.ExampleMessage.de:type_name -> ywrapper.Decimal64Value
+	10, // 7: exschemapath.ExampleMessage.in:type_name -> ywrapper.IntValue
+	6,  // 8: exschemapath.ExampleMessage.str:type_name -> ywrapper.StringValue
+	11, // 9: exschemapath.ExampleMessage.ui:type_name -> ywrapper.UintValue
+	4,  // 10: exschemapath.ExampleMessage.ex:type_name -> exschemapath.ExampleMessageChild
+	6,  // 11: exschemapath.ExampleMessageChild.str:type_name -> ywrapper.StringValue
+	1,  // 12: exschemapath.Root.InterfaceKey.interface:type_name -> exschemapath.Interface
+	13, // [13:13] is the sub-list for method output_type
+	13, // [13:13] is the sub-list for method input_type
+	13, // [13:13] is the sub-list for extension type_name
+	13, // [13:13] is the sub-list for extension extendee
+	0,  // [0:13] is the sub-list for field type_name
+}
+
+func init() { file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_init() }
+func file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_init() {
+	if File_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Root); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Interface); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*System); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExampleMessage); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExampleMessageChild); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Root_InterfaceKey); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   6,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_goTypes,
+		DependencyIndexes: file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_depIdxs,
+		MessageInfos:      file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_msgTypes,
+	}.Build()
+	File_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto = out.File
+	file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_rawDesc = nil
+	file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_goTypes = nil
+	file_github_com_openconfig_ygot_ygot_testdata_exschemapath_exschemapath_proto_depIdxs = nil
+}
diff --git a/ygot/testdata/exschemapath/exschemapath.proto b/ygot/testdata/exschemapath/exschemapath.proto
new file mode 100644
index 0000000..fb1a4ed
--- /dev/null
+++ b/ygot/testdata/exschemapath/exschemapath.proto
@@ -0,0 +1,39 @@
+syntax = "proto3";
+
+package exschemapath;
+
+option go_package = "github.com/openconfig/ygot/ygot/testdata/exschemapath";
+
+import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
+import "github.com/openconfig/ygot/proto/yext/yext.proto";
+
+message Root {
+    System system = 1; 
+    message InterfaceKey {
+        string name = 1 [(yext.schemapath) = "/interfaces/interface/config/name|/interfaces/interface/name"];
+        Interface interface = 2;
+    }
+    repeated InterfaceKey interface = 422482938 [(yext.schemapath) = "/interfaces/interface"];
+}
+
+message Interface {
+    ywrapper.StringValue description = 1 [(yext.schemapath) = "/interfaces/interface/config/description"];
+}
+
+message System {
+    ywrapper.StringValue hostname = 1 [(yext.schemapath) = "/system/config/hostname"];
+}
+
+message ExampleMessage {
+    ywrapper.BoolValue bo = 1 [(yext.schemapath) = "/bool"];
+    ywrapper.BytesValue by = 2 [(yext.schemapath) = "/bytes"];
+    ywrapper.Decimal64Value de = 3 [(yext.schemapath) = "/decimal"];
+    ywrapper.IntValue in = 4 [(yext.schemapath) = "/int"];
+    ywrapper.StringValue str = 5 [(yext.schemapath) = "/string"];
+    ywrapper.UintValue ui = 6 [(yext.schemapath) = "/uint"];
+    ExampleMessageChild ex = 7 [(yext.schemapath) = "/message"];
+}
+
+message ExampleMessageChild {
+    ywrapper.StringValue str = 1 [(yext.schemapath) = "/message/str"];
+}
\ No newline at end of file
diff --git a/ygot/testdata/exschemapath/gen.go b/ygot/testdata/exschemapath/gen.go
new file mode 100644
index 0000000..965eef2
--- /dev/null
+++ b/ygot/testdata/exschemapath/gen.go
@@ -0,0 +1,5 @@
+// package exschemapath contains generated code for the exschemapath protobuf.
+package exschemapath
+
+// Generate command to create the protobuf .pb.go file.
+//go:generate sh -c "cd $GOPATH/src && protoc --proto_path=. --go_out=:. github.com/openconfig/ygot/ygot/testdata/exschemapath/exschemapath.proto"