Code Monkey home page Code Monkey logo

microservices-go's Issues

POST /user returns `Invalid Token` error

I've just started to mess around with this template and I'm not fully experienced with how Golang works quite yet but I'm having trouble getting the /user endpoint to successfully create a new user due to a missing/invalid token within the authorization header. I'm not sure what the value could be or where it's located in the project (I assume it's in config.json) so I appreciate any help that I can get.

Response with a random value:

{
    "error": "Invalid token"
}

Response with no value:

{
    "error": "Token not provided"
}

relevant Secure config values (all default values):

{
    "Secure": {
	"JWTAccessSecure": "accesskeyyoumayneedtochangeit",
	"JWTRefreshSecure": "refreshkeyyoumayneedtochangeit",
	"JWTAccessTimeMinute": 10,
	"JWTRefreshTimeHour": 10
    },
}

Incorrect docs.go after swag init

Describe the bug
Whenever I do swag init -g routes/ApplicationV1.go the resulting docs.go is incorrect and doesn't look like the previous one.

To Reproduce
Steps to reproduce the behavior:

  1. run swag init -g routes/ApplicationV1.go
  2. verify docs.go
  3. missing structs and most of the one that is there swag.Spec is unresolved.

Expected behavior
The docs.go should update correctly

Screenshots
image

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
I just started using the Template and have ran go get to download all the mods. I have also installed swag/cmd but I am unaware of the correct version to use.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.