Skip to content
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

Postgres always insert empty object {} for empty jsontext #100

Open
longquanzheng opened this issue Nov 20, 2023 · 1 comment
Open

Postgres always insert empty object {} for empty jsontext #100

longquanzheng opened this issue Nov 20, 2023 · 1 comment

Comments

@longquanzheng
Copy link
Contributor

longquanzheng commented Nov 20, 2023

E.g. for commandRequest of nil in the below code:

Screenshot 2023-11-20 at 3 03 44 PM

It will insertert {} instead of NULL.
As a result
Screenshot 2023-11-20 at 3 03 55 PM

After upgrading to open API 7.1.0
( see https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.1.0 for Go and OpenAPITools/openapi-generator#16863 )

There is a breaking change that it alwasy validate the required fields:

https://github.com/xcherryio/apis/blob/9ff80b8ba2c1bf8390f123e35707c63f56ef4d63/goapi/xcapi/model_command_request.go#L174

For now, we have to set the default value to emptyCommand and encodedObject

@longquanzheng
Copy link
Contributor Author

cc @duoertai @zklgame

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

No branches or pull requests

1 participant