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

Use environment variables in swagger.yml #149

Closed
kindlychung opened this issue Mar 14, 2017 · 2 comments
Closed

Use environment variables in swagger.yml #149

kindlychung opened this issue Mar 14, 2017 · 2 comments

Comments

@kindlychung
Copy link

kindlychung commented Mar 14, 2017

Is it possible? If not is there a work around?

Specifically, I would like to do something like this:

---
  swagger: "2.0"
  info:
    title: "API"
    description: "AR dev REST API"
    version: "1.0.0"
  host: ${API_HOST}
@kailuowang
Copy link
Member

Here is a work around
https://github.com/iheartradio/play-swagger/blob/master/README.md#how-do-i-use-a-different-host-for-different-environment
It shouldn't be too hard to enhance play swagger to support your environment var idea. A PR would be much appreciated.

mtrovo added a commit to mtrovo/play-swagger that referenced this issue Mar 29, 2017
kailuowang pushed a commit that referenced this issue Apr 7, 2017
* adding support for environment variables as markup

Fixes #149

* adding build variable to use output transformers

* adding docs regarding output transformers

* adding key value for environment output transformer

* improving docs
@mattdornfeld
Copy link

So is this possible now? I see there was a commit. This is the first link that comes up when googling. If someone could post a link to an example here that would be great.

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

No branches or pull requests

3 participants