Created by: hmac
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: master
,. Default:3.4.x
,4.0.x
master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
This change adds a new option to the Elm generator: enableCustomHeaders
. When enabled, the generated request functions will allow you to set your own headers (e.g. for authorisation). It's very similar to the basePath
option. I would really like to make this change without introducing another option or breaking existing code, but Elm's records don't support optional fields or default values, so this is the best I could do.
Very interested to hear feedback if there's a better approach here!
cc @trenneman