Closed kysely closed 1 year ago
Fixing dotenv utility so that it doesn't create duplicate env variables in .env.
dotenv
.env
The first commit is just refactoring of the test code. Easier to review just the second commit.
When provider has >1 security schemes of same type (or same-named parameters but that shouldn't happen), env vars are added to .env multiple times.
{ "name": "hubspot", "defaultService": "default", "parameters": [], "services": [ { "baseUrl": "https://api.hubapi.com/", "id": "default" } ], "securitySchemes": [ { "type": "apiKey", "name": "private-app-legacy", "in": "header", "id": "private_apps_legacy" }, { "type": "apiKey", "name": "private-app", "in": "header", "id": "private_apps" } ] }
creates the following .env
HUBSPOT_API_KEY= HUBSPOT_API_KEY=
Description
Fixing
dotenv
utility so that it doesn't create duplicate env variables in.env
.The first commit is just refactoring of the test code. Easier to review just the second commit.
Motivation and Context
When provider has >1 security schemes of same type (or same-named parameters but that shouldn't happen), env vars are added to
.env
multiple times.creates the following .env
Types of changes
Checklist: