forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JetBrains HTTP Client - Adds support for query and header params and …
…env file (OpenAPITools#18844) * Adds basic support for query params. * Need to parameterize them * Need to add tests * Need to add option to skip, maybe * Need to add support for header params too * Parameterizes query param values * Need to add tests * Need to add option to skip, maybe * Need to add support for header params too * Remove extra empty line * Adds support for header params * Also fixes extra end of line bug. * Fixing failing test * Adding tests for query params * Adding tests for header params * Adding basic support for env file * Add support for env file for path variables and custom header variables * TODO : Add tests * Adding tests for env generation * Adding generated test files * Fix namefile
- Loading branch information
Showing
72 changed files
with
16,548 additions
and
296 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
7 changes: 7 additions & 0 deletions
7
...napi-generator/src/main/resources/jetbrains-http-client/http-client.template.env.mustache
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"dev": { | ||
{{#vendorExtensionsVariables}} | ||
"{{.}}" : ""{{^-last}},{{/-last}} | ||
{{/vendorExtensionsVariables}} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
modules/openapi-generator/src/main/resources/jetbrains-http-client/queryParams.mustache
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{! Case where there is no query params, auth does everything}}{{^queryParams}}{{#authMethods}}{{#isKeyInQuery}}?{{keyParamName}}={{#lambda.doubleMustache}}{queryKey}{{/lambda.doubleMustache}}{{/isKeyInQuery}}{{/authMethods}}{{/queryParams}}{{#queryParams}}{{! If there are query params, auth has no logic}}{{#-first}}?{{/-first}}{{paramName}}={{=<% %>=}}{{<%paramName%>}}<%={{ }}=%>{{^-last}}&{{/-last}}{{#-last}}{{#authMethods}}{{#isKeyInQuery}}&{{keyParamName}}={{#lambda.doubleMustache}}{queryKey}{{/lambda.doubleMustache}}{{/isKeyInQuery}}{{/authMethods}}{{/-last}}{{/queryParams}} |
Oops, something went wrong.