FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

allow-user-to-pass-env-variables-when-generating-docs by Timothyjb · Pull Request #504 · zipmark/rspec_api_documentation · GitHub

allow-user-to-pass-env-variables-when-generating-docs - #504

Open
Timothyjb wants to merge 1 commit into
zipmark:masterfrom
Timothyjb:allow-user-to-pass-env-variables-when-generating-docs
Open

allow-user-to-pass-env-variables-when-generating-docs#504
Timothyjb wants to merge 1 commit into
zipmark:masterfrom
Timothyjb:allow-user-to-pass-env-variables-when-generating-docs

Conversation

Copy link
Copy Markdown

Why
This is to allow users to use environment variables in their open_api.yaml file. Like so:

swagger: '2.0'
info:
  title: My Api
  description: About my api
  version: "1.0.0"
host: <%= ENV.fetch('host_name') %>

They could then call the generate command like:

host_name=env_specific_host.com rake docs:generate

This way someone can generate multiple different swaggers with different environemnts

Why
This is to allow users to use environment variables in their `open_api.yaml` file.
Like so:
```
swagger: '2.0'
info:
  title: My Api
  description: About my api
  version: "1.0.0"
host: <%= ENV.fetch('host_name') %>
```
They could then call the generate command like:
```
host_name=env_specific_host.com rake docs:generate
```
This way someone can generate multiple different swaggers with different environemnts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL