-
Notifications
You must be signed in to change notification settings - Fork 127
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
Support better means to set environment variables #1557
Comments
Hi @kpervin! Sorry for the delay. Could you clarify your suggestion? Do you want to be able to provide env variables for |
It would be nice to be able to provide env variables for pretty much the whole config, apart from the reserved key fields. For example: apis:
v4:
root: https://${DOMAIN}/v3/api-docs/User%20API%20v4
x-openapi-ts:
output: ./src/v4.d.ts
v3:
root: https://${DOMAIN}/v3/api-docs/UserV3
x-openapi-ts:
output: ./src/v3.d.ts
resolve:
http:
headers:
- matches: https://${DOMAIN}/**
name: Authorization
envVariable: ${API_KEY} |
Oh, I see. Thanks for the clarification! |
Thanks for the suggestion, but the config files are intentionally static. I would recommend you add some pre-processing scripts of your own to pick up environment variables if that's an important part of your workflow. We're not planning to implement support for environment variables at this time - which I know isn't what you were hoping for, but it's important to us to be clear about what you can expect. |
Is your feature request related to a problem? Please describe.
Currently there is only a single way to load environment variables into the config, and that is via the
envVariable
field in theresolve.http.headers
array. However, you cannot load these intoapis.{config}.root
or into theresolve.http.headers[num].matches
field.Describe the solution you'd like
A means of loading env variables akin to GraphQL Config. They use a library called
string-env-interpolation
(ref to line in their source).The text was updated successfully, but these errors were encountered: