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

Add API Sprout mock server. #33

Merged
merged 1 commit into from
Jul 27, 2018

Conversation

danielgtaylor
Copy link
Contributor

No description provided.

@philsturgeon
Copy link
Collaborator

The timing on this could not have been better, you are a hero (once again). I'm giving it a try, and getting this:

$ docker pull danielgtaylor/apisprout
Using default tag: latest
latest: Pulling from danielgtaylor/apisprout
Digest: sha256:0b2ab61269e001e944383c26a81119236758717bca0b780f1a8a7b9a04f42ba6
Status: Image is up to date for danielgtaylor/apisprout:latest

$ docker run -p 8000:8000 apisprout http://example.com/my-api.yaml
Unable to find image 'apisprout:latest' locally
docker: Error response from daemon: pull access denied for apisprout, repository does not exist or may require 'docker login'.

I'd love to see it working before I merge this, any tips?

@danielgtaylor
Copy link
Contributor Author

@philsturgeon whoops, let me update the docs. Try this instead:

docker run -p 8000:8000 danielgtaylor/apisprout http://example.com/my-api.yaml

@philsturgeon
Copy link
Collaborator

Thank you. Next: trouble with docker and local files:

▶ ls generated/specs/airlock/openapi.yml
generated/specs/airlock/openapi.yml

▶ docker run -p 8000:8000 danielgtaylor/apisprout generated/specs/airlock/openapi.yml
2018/07/26 18:30:12 open generated/specs/airlock/openapi.yml: no such file or directory

@danielgtaylor
Copy link
Contributor Author

You can use Docker volumes to map local to in-container paths for this, e.g:

docker run -v ~/Projects/foo/openapi.yaml:/api.yaml -p 8000:8000 danielgtaylor/apisprout /api.yaml

Again I'll update the docs to include this in a few minutes, thanks for the feedback!

You can also download the compiled executable for your OS and run it locally. I envisioned the Docker image as being more useful in an environment like Kubernetes where you wouldn't have the file available locally.

@danielgtaylor
Copy link
Contributor Author

Docs are updated, let me know if you have any other issues!

@philsturgeon
Copy link
Collaborator

Thanks @danielgtaylor! Got one more danielgtaylor/apisprout#1

I'd love to chat to you about how I plan on using this, I'd love it if you could swing by slack.apisyouwonthate.com. You might like my evil plans :D

@philsturgeon philsturgeon merged commit eebdc3b into apisyouwonthate:master Jul 27, 2018
@danielgtaylor danielgtaylor deleted the patch-1 branch July 27, 2018 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants