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

WIP - Test out using swagger client for cli #1708

Open
wants to merge 2 commits into
base: master
from

Conversation

2 participants
@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj commented Feb 6, 2019

Description

Was thinking about using our swagger files to generate the client needed for a CLI tool as an easy way to get a full-featured tool out of the box. Found this documentation: https://goswagger.io/generate/client.html and started on the example.

Reviewer Notes

There is no pivotal story associated with this, I just had some time to try it out.

I can't seem to figure out how to authorize my tool and could use some help with it if you've got any spare cycles.

Setup

Add any steps or code to run in this section to help others prepare to run your code:

./bin/gen_server.sh
go run cmd/public_cli/main.go

I currently get this output:

2019/02/06 19:03:43 [GET /shipments][401] indexShipmentsUnauthorized
exit status 1

Code Review Verification Steps

  • Request review from a member of a different team.

References

@chrisgilmerproj chrisgilmerproj self-assigned this Feb 6, 2019

@chrisgilmerproj chrisgilmerproj requested a review from akostibas Feb 6, 2019

@akostibas

This comment has been minimized.

Copy link
Contributor

akostibas commented Feb 6, 2019

From my own playing with using swagger from the CLI (via curl), I needed to auth via Login.gov, then take the JWT from my active browser session and plug it into the curl headers. This is obviously really cumbersome.

Maybe there's a way to auth with Login.gov on the CLI in an easier way, or to get an active session some other way.

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