-
Notifications
You must be signed in to change notification settings - Fork 254
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
gnostic upgrade from yaml.v2 to yaml.v3 breaks some clients (here's the fix) #195
Comments
howardjohn
added a commit
to howardjohn/kube-openapi
that referenced
this issue
Jan 4, 2021
Context: google/gnostic#195 Fixes kubernetes#206 Without this, it is impossible to import this library and controller-runtime v0.7.0
howardjohn
added a commit
to howardjohn/kube-openapi
that referenced
this issue
Mar 12, 2021
Context: google/gnostic#195 Fixes kubernetes#206 Without this, it is impossible to import this library and controller-runtime v0.7.0
mattysweeps
pushed a commit
to mattysweeps/kube-openapi
that referenced
this issue
May 19, 2021
Context: google/gnostic#195 Fixes kubernetes#206 Without this, it is impossible to import this library and controller-runtime v0.7.0
Merged
5 tasks
mattysweeps
pushed a commit
to mattysweeps/kube-openapi
that referenced
this issue
Jul 13, 2021
Context: google/gnostic#195 Fixes kubernetes#206 Without this, it is impossible to import this library and controller-runtime v0.7.0
muvaf
pushed a commit
to muvaf/kube-openapi
that referenced
this issue
Nov 8, 2021
Context: google/gnostic#195 Fixes kubernetes#206 Without this, it is impossible to import this library and controller-runtime v0.7.0 (cherry picked from commit 9f480bc)
muvaf
pushed a commit
to muvaf/kube-openapi
that referenced
this issue
Nov 8, 2021
Context: google/gnostic#195 Fixes kubernetes#206 Without this, it is impossible to import this library and controller-runtime v0.7.0 (cherry picked from commit 9f480bc)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With #194, gnostic upgrades its dependency on yaml.v2 to yaml.v3. This means that code that calls the automatically-generated NewDocument functions will break, because they take yaml.v2 data structures as input.
Affected code will get build errors for code like this:
To fix this, please don't just replace yaml.v2 with yaml.v3 in client code. Instead, please use the
ParseDocument
functions defined in openapiv2/document.go and openapiv3/document.go. That would make the calling code look like this:where
b
is a[]byte
of the JSON or YAML file to be parsed.Also, please use a tagged version of gnostic. This change will be in v0.5.0 and later.
The text was updated successfully, but these errors were encountered: