Skip to content

Conversation

@cytommi
Copy link

@cytommi cytommi commented Feb 7, 2024

JSON value will be a decimal string. Either numbers or strings are accepted.

https://protobuf.dev/programming-guides/proto3/#json

Users of protojson have also been confused by encodings for int64 types being strings.
golang/protobuf#1414

This PR should ensure that the generated docs are in line with the protobuf standard.

@solo-build-bot
Copy link

solo-build-bot bot commented Feb 7, 2024

Waiting for approval from someone in the solo-io org to start testing.

@cytommi cytommi force-pushed the main branch 2 times, most recently from 5628747 to 9596e14 Compare February 7, 2024 22:29
@nfuden
Copy link

nfuden commented Apr 30, 2024

@shashankram how does this mesh or not mesh with discussions around the string versus int marshalling issues we had talked about .

@shashankram
Copy link
Contributor

@shashankram how does this mesh or not mesh with discussions around the string versus int marshalling issues we had talked about .

Since we primarily use this library to generate Kubernetes CRD schemas, we set use x-kubernetes-int-or-string to get around this. I understand the motivation of this PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants