Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SuccessResponse does not include ID #17

Open
darkliquid opened this issue Feb 17, 2025 · 5 comments
Open

SuccessResponse does not include ID #17

darkliquid opened this issue Feb 17, 2025 · 5 comments
Assignees

Comments

@darkliquid
Copy link

When doing an insert and relying on auto-id to generate and return the ID, the Id field of the SuccessResponse is blank.

The actual raw HTTP response body contains the ID, but because the JSON data has the id filed as _id and the struct doesn't explicitly specify that the Id field should be mapped from _id then it never gets populated.

if the code here was annotated with json struct tags, like:

Id *int64 `json:"_id"`

Then it would work.

@Nick-S-2018
Copy link
Collaborator

We need to investigate the issue further to decide if it should be fixed in the client or in Manticore daemon itself.

@darkliquid
Copy link
Author

Looking at the latest master of the you openapi SDK codegen repo, the code generated by that does the right thing (maps _id to Id with json tags), so I expect that it's just the latest stable release (and prior releases) that's been cut for this package that has this issue and cutting a new release from the latest master will resolve this.

@Nick-S-2018
Copy link
Collaborator

We've also created an issue manticoresoftware/manticoresearch#3165 to avoid such possible cases in the future.

@sanikolaev
Copy link
Collaborator

Blocked by manticoresoftware/manticoresearch#3165

@sanikolaev
Copy link
Collaborator

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants