You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't find in the repository's issues section similar bug.
I understand, this is Open Source and not-for-profit product.
This is not about third-party project, framework, package or technology.
My environment:
OS (uname -a): Linux 89327648a97a 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 Linux (inside docker)
Golang (go version): go version go1.18.3 linux/amd64
Describe the bug:
I followed your article & successfully run it. But when I tried to test the create book API, it fail. I tried using Swagger, it still the same. Do you have any sample JSON for create book ?
Steps to reproduce the behavior:
Run the app like shown in readme & run the migration. Make sure no records in DB.
Generate token & copy the token using swagger or curl -X 'GET' 'http://127.0.0.1:5000/api/v1/token/new' -H 'accept: application/json'
Put the token at swagger. By click "Authorize" button on top right. Fill with Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTczMDIzNzF9.0VJubL5Z_49W2-9BHvqQaFn2pN1TxkysFIvzb5SpUow
Try Swagger POST /v1/book by clicking Try It Out & fill Title, Author, etc.
Click Execute
See error
I tried to change the JSON, it still error, you can try this curl
And it show error {"error":true,"msg":{"ID":"Key: 'Book.ID' Error:Field validation for 'ID' failed on the 'uuid' tag","UserID":"Key: 'Book.UserID' Error:Field validation for 'UserID' failed on the 'uuid' tag"}}
Expected behavior:
Successfully create book
Screenshots:
The text was updated successfully, but these errors were encountered:
👋 Hello. Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
wave Hello. Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
Yes. The problem already told in first thread. I dont know how to solve it
Required check list:
My environment:
uname -a
): Linux 89327648a97a 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 Linux (inside docker)go version
): go version go1.18.3 linux/amd64Describe the bug:
I followed your article & successfully run it. But when I tried to test the create book API, it fail. I tried using Swagger, it still the same. Do you have any sample JSON for create book ?
Steps to reproduce the behavior:
curl -X 'GET' 'http://127.0.0.1:5000/api/v1/token/new' -H 'accept: application/json'
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTczMDIzNzF9.0VJubL5Z_49W2-9BHvqQaFn2pN1TxkysFIvzb5SpUow
I tried to change the JSON, it still error, you can try this curl
And it show error
{"error":true,"msg":{"ID":"Key: 'Book.ID' Error:Field validation for 'ID' failed on the 'uuid' tag","UserID":"Key: 'Book.UserID' Error:Field validation for 'UserID' failed on the 'uuid' tag"}}
Expected behavior:
Successfully create book
Screenshots:
The text was updated successfully, but these errors were encountered: