Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}

- name: Upload Maven build artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3.1.3
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
with:
name: artifact
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: ls -la modules/openapi-generator-cli/target
- name: Upload openapi-generator-cli.jar artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3.1.3
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: mvn --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- name: Publish unit test reports
if: ${{ always() }}
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3.1.3
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}

connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
conn.proxy = config.proxy if config.proxy
conn.request(:basic_auth, config.username, config.password)
@config.configure_middleware(conn)
if opts[:header_params]["Content-Type"] == "multipart/form-data"
Expand Down Expand Up @@ -62,7 +63,7 @@
# @option opts [Hash] :query_params Query parameters
# @option opts [Hash] :form_params Query parameters
# @option opts [Object] :body HTTP body (JSON/XML)
# @return [Typhoeus::Request] A Typhoeus Request
# @return [Faraday::Request] A Faraday Request
def build_request(http_method, path, request, opts = {})
url = build_request_url(path, opts)
http_method = http_method.to_sym.downcase
Expand All @@ -73,12 +74,6 @@

update_params_for_auth! header_params, query_params, opts[:auth_names]

req_opts = {
:params_encoding => @config.params_encoding,
:timeout => @config.timeout,
:verbose => @config.debugging
}

if [:post, :patch, :put, :delete].include?(http_method)
req_body = build_request_body(header_params, form_params, opts[:body])
if @config.debugging
Expand All @@ -87,7 +82,12 @@
end
request.headers = header_params
request.body = req_body
request.options = OpenStruct.new(req_opts)

# Overload default options only if provided
request.options.params_encoding = @config.params_encoding if @config.params_encoding
request.options.timeout = @config.timeout if @config.timeout
request.options.verbose = @config.debugging if @config.debugging

request.url url
request.params = query_params
download_file(request) if opts[:return_type] == 'File'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@
### TLS/SSL setting
# Client private key file (for client certificate)
attr_accessor :ssl_client_key

### Proxy setting
# HTTP Proxy settings
attr_accessor :proxy