Skip to content

Commit

Permalink
Squashed 'runtimes/' changes from 3596f48..8fbe3cb
Browse files Browse the repository at this point in the history
8fbe3cb Merge pull request Azure#26 from Azure/revert-24-revert-23-master
d67a862 Merge pull request Azure#25 from jianghaolu/master
7ad505c Revert "Revert "Changes from AutoRest & SDK""
e4d8dda Merge pull request Azure#24 from Azure/revert-23-master
06e3169 Revert "Changes from AutoRest & SDK"
ea7edb9 Merge branch 'master' of github.com:Azure/AutoRest
4660eff Add HTTPS as default scheme
910cf5a Merge pull request Azure#23 from jianghaolu/master
ca710eb Sync Java runtime with changes in SDK (Azure#1270)
d7987f9 Merge commit '140542e7c5ceaaa632a9a146a1d603f2cd8acfdd' as 'src/client/Java'
3722243 Reconstruct subtree
262b35c Sync runtime with SDK repo
0a31705 Should use debug version of autorest when building on windows  (Azure#1268)
0933d58 Aligning Authentication releases with the master branch  (Azure#1250)
904ef23 Remove HEAD operation status code warning (Azure#1265)
d0168cd Ruby - Update ms_rest & ms_rest_azure version to 0.3.0 (Azure#1260)
34f56ea Throw code gen error if pageable operation does not return pageable type (Azure#1262)
62173d1 Ruby - Adding warning instead of Validation failure when unknown property found on object. (Azure#1263)
d8ef424 Fix exception in Log4NetTracingInterceptor default constructor (Azure#1237)
5d64b77 Ruby - ms_rest should throw validation error instead of NameError (Azure#1255)
c6106a3 Remove Gemfile.lock and adding it to .gitignore (Azure#1257)
08b89cf Updating build instructions with the answers to some common gotchas (Azure#1258)
4f327ee [In- review] Improving pageable extension adding autopagination (Azure#1211)
4a489e9 Adding "clean" Swagger validation test (Azure#1254)
5069891 Support Char format for string (Azure#1252)
0da7d34 OS X platform name is darwin. (Azure#1253)
2a491e8 Ruby - Polymorphic discriminator hashmap should have exact model name as hash value instead of lowercased in Ruby (Azure#1245)
693fdd8 Remove deprecated methods from ms_rest_azure client_runtime. This change is related to PR Azure#1011 where generalized method was introduced. (Azure#1236)
fcbeb84 Handling lookup for provisioning_state in ruby client runtime (Azure#1223)
0c749da Adding Swagger file linting infrastructure and rules (Azure#1246)
b348fdd Support Base64url (Azure#1238)
93de90c Fix for Issue Azure#1202 (Azure#1235)
a9acdd5 Fix runtime part of Azure#1217 (Azure#1224)
6226c15 Support unix style timestamp (Azure#1239)
ba86230 custom paths on different plats (Azure#1248)
7045fdb node clientruntime updates (Azure#1244)
aaf8fd1 pulled in @stankovski 's fix for the comment problem (fixes Azure#1228) (Azure#1243)
43432e9 don't compile windows-only projects on not windows.
3f9053e put node tests back in
f4d008a Adding Roslyn support for unit testing
19f629b Code changes for dotnet cli conversion
32f7ccb Swapped out csproj build script for project.json and .xproj
cbe17c8 update license in header of source files to MIT
000948f Update building-code.md
45ddc1a Re-organize entire code repo (Azure#1220)
86aa2fc Merge pull request Azure#1216 from vishrutshah/regen-samples
42c7200 Regenerate Java Samples
20b4a28 Regenerate Ruby Samples and remove old Samples
8b15c24 Increase ruby test coverage bar (Azure#1188)
8a01cb7 Java beta2 release (Azure#1213)
0c0e87b [Ruby - In Review] 	Restructuring generated Ruby & Azure.Ruby code into generated sub-folder (Azure#1189)
987e8db Updated the error message to include the method name and property when the NextLink property could not be found (Azure#1206)
79eb329 Migration to CoreCLR RTM (Azure#1210)
592ec93 Added parameter documentation to model constructors (Azure#1184)
ab8f357 Fix parameter flattening codes handling of documentation string (Azure#1199)
44645a6 Update Redis swagger test and add support for Pattern properties (Azure#1191)
5cc6367 Merge pull request Azure#1157 from vishrutshah/x-ms-client-flatten
882a7dc Merge pull request Azure#1193 from hovsepm/master
0e506fc Changed ClientRuntime.Authentication dependency range for Microsoft.IdentityModel.Clients.ActiveDirectory
4d24335 Regenerating samples with gulp regenerate:expected:samples
d734d1a Fix for Issue Azure#1075 (Azure#1182)
5c1cea8 Update README.md to include MS Code of Conduct (Azure#1187)
cd769c3 Escapse . in property name for Ruby
a6aa047 Apply x-ms-client-flatten extension for Ruby & Azure.Ruby generator
e918ef8 Ruby - x-ms-parameter-grouping for Ruby & Azure.Ruby Generator (Azure#1139)
dc3d0ca Regenerating Samples in Azure.Ruby
04a9525 x-ms-parameter-grouping for Ruby & Azure.Ruby Generator
8c6ad3e Merge pull request Azure#1186 from hovsepm/master
af6f602 Upgraded to the latest version of net core on Ubuntu.
4aaef63 Adding a null check for reading Content from a response as a string (Azure#1170)
64a7b86 Do not need check property availability if nextLinkName is null (Azure#1177)
89bf350 Reuse the global autorest parameter. (Azure#1171)
f1df2ab Add AzureResourceSchema Microsoft.Resources test (Azure#1134)
5dfea14 Ruby - Regenerating samples for ruby (Azure#1179)
74917b9 Summary comments contain improperly escaped backslashes (Issue Azure#1152) (Azure#1176)
61d1467 Improve support for "Summary" and "Description" documentation fields (Azure#1163)
6b71dda Ruby - Move serialization/deserialization into clientruntime from sdk (Azure#1106)
b4a493d Ruby - Adding Model name on the properties of the ServiceClient (Azure#1158)
dc4ff41 Page with links to Issues Queries
4ff4583 requestLibrarySink should be called with requestOptions if no additional arguments specified. (Azure#1108)
ac312fe (C#) Adding support for "see" URLs in documentation (Azure#1167)
45a4711 Local gulp run produces expected file changes. (Azure#1137)
6b8360d Fix python code gen bug in handling "." in property name. (Azure#1144)
29ba650 Merge pull request Azure#1160 from hovsepm/master
958aedd remove stale token from tokencache for sp auth as adal does not remove it. (Azure#1145)
d8c60c1 Downgrading ClientRuntime versions.
f8683d0 Merge pull request Azure#1159 from hovsepm/master
b3084e2 Downgraded C# ClientRuntime reference to Json.Net in net45 platform to 6.0.8
31e5a52 Supply CodeGenSettings via a JSON file to AutoRest. CodeGenSettings is de-serialized as Dictionary<string, object> so it can contain more complex properties than just strings. (Azure#1147)
89362bb Addresses issue Azure#1087 (Azure#1110)
623601d Schema typos (Azure#1138)
86e9bd7 Merge pull request Azure#1105 from hovsepm/master
194f509 Added gulp-msbuild normal level of verbosity.
12c3135 Updated to the latest stable nuget version.
9d078fe fixed nuget symbols push location.
8a35466 Fixed broken test MappingExtensionTests.TestInputMappings (Azure#1123)
6dd1aa6 Fixed assembly versions in client runtime.
9efe50a Added license header to CertificateAuthenticationProvider cs file.
81ba78c Fixes Azure#881 - failure to accept x-* vendor extension in path (Azure#1122)
cd47ac1 Merge pull request Azure#1136 from hovsepm/ClientRuntimeVersionUpdate
6b34175 Changed minor version bump to patch update for RC2 migration
14a2cdf [Python] Fixed bug in enum namespace docs (Azure#1074)
ae0f0a3 msrest/msrestazure 0.4.0 (Azure#1092)
88a5f61  Fix bug with custom client request id generation (Azure#1104)
26e44ad Updated documentation regarding dictionaries (Azure#1115)
6d06584 Issue 669 - added Exception xml doc comments (Azure#1076)
5ad191b Fixes Azure#1019 - Verbose parameter and other costmetic issues (Azure#1113)
f980c82 Merge pull request Azure#1089 from daschult/master
836c71f Support additionalProperties that accept all unbound properties. (see Azure#1057) (Azure#1112)
09341fd Merge pull request Azure#1107 from tbombach/master
d08d280 Changing YamlDotNet signing exception since the dll odesn't follow the same naming convention as Newtonsoft
4f80e3e Merge pull request Azure#1103 from tbombach/master
f764ac5 Changing nuget reference to YamlDotNet.Signed, since we're referencing it from a signed assembly
1a9e4e5 Add DevTestLabs acceptance test. Add 'format' property to JsonSchema
242834c Moving web.yaml into Web/2015-08-01/ folder
9ade282 Merge branch 'master' of https://github.com/Azure/autorest
9b84c45 Add DataLakeStore acceptance test
78906b1 Merge pull request Azure#1100 from stankovski/syncwrapper
85f149b Addressed code review feedback
fbdcc27 Addressed fxcop issues
e6f05e8 Added tests
f04e04a Adding script to can verify that developer system has correct setup (Azure#1098)
b338faa Propagated SyncWrapper property
e4be13a Added XXXWithHttpMessages() method
f427898 Merge pull request Azure#1096 from fearthecowboy/add-yaml-support
f233c04 Adding YAML support to Autorest.
81937b8 Add DataLakeAnalytics acceptance test
ab5315f Merge pull request Azure#1012 from abhivijay96/master
ca2b687 Merge pull request #1 from tbombach/user-agent-cleanup
73987f0 Merge pull request Azure#1068 from TimLovellSmith/fixDotNetRedisInheritanceScenario
93d4e1c Merge pull request Azure#1081 from daniel-ms/master
22f7fc7 Cleaning up typos and comments for ServiceClient SetUserAgent
47e95a5 Merge pull request Azure#1093 from hovsepm/master
58366bd Adding more logging for gulp.msbuild and retrying for http failures.
9f4f7d6 Bumped up gulp npm versions
18c6a84 Add CognitiveServices test
40748df Merge branch 'master' of https://github.com/Azure/autorest
7954a99 Turn off CA1822 for test projects, warnings about performance of non-static unit test methods are a waste of time!
1d34f9e Add tests for additional Network api versions
4268976 Add acceptance test for additional compute api version
2f45870 Add extra Storage api version acceptance tests
b403b9a Simplify the unit test for verifying redis swagger modelling inheritance scenarios.
c54836a Merge pull request Azure#1091 from tbombach/dnx-gitignore
ef4d3ed Add additional CDN swagger and schema
0b05742 Merge pull request Azure#1090 from Azure/hovsepm-patch-3
24bc68e [Python] LRO and AAD updates and fixes (Azure#1078)
55a3b8e Adding dnx folders and files to gitignore since developers might still have them in their working copy after upgrading to CoreCLR RC2
19a6cc5 Add ability to seperate acceptance tests for AzureResourceSchema generator by resource provider and api version
92d9a16 Update building-code.md
4652810 Merge branch 'master' of https://github.com/Azure/autorest
083672e Update AzureResourceSchema generator to create DNS schema
de936fb Merge pull request Azure#1086 from Azure/hovsepm-patch-2
6a8c6d6 Merge pull request Azure#1085 from Azure/hovsepm-patch-1
871cb9a Update building-code.md
87c1603 Update building-code.md
337d976 Merge pull request Azure#1084 from hovsepm/netcore
3f84226 Enumerating over create method parameter enum values
d5a44b0 Adding x-ms-client-flatten parameter to the swagger scehma, as it was missing: the spec defines that it is possible to add that extension to a body parameter.
f32e824 Rename Microsoft.DNS.json expected schema to Microsoft.Network.json
eb56294 Getting baseline for dns schema generation
80d8030 Merge branch 'master' of https://github.com/Azure/autorest
2707593 Fix code analysis warnings from using ToLower(CultureInfo.InvariantCulture).
1382a5e Merge pull request Azure#1061 from daschult/master
568ded9 Merge pull request Azure#1067 from veronicagg/changelog
7f5ae11 Fixed AutoRest.sln test references fro CSharp Generators
25a2716 Removed dnxcore50 from generated code.
59e6389 Merge branch 'master' of https://github.com/Azure/autorest
72b915b Cleaning dnx from gitignore and tools
5f97447 Modify the circular detection logic for circular 'allOf' inheritance so that there can again be a passing test 'ClientModelWithCircularDependencyThrowsError'.
f1f7584 updates to readme (Azure#1071)
f9a1606 updates to node.js clientruntime (Azure#1070)
3cb1bec interactive login in the node runtime (ms-rest-azure) (Azure#1066)
de3e3c4 Added Generator CSharp tests to ClientRuntime solution
630ea05 Changed nuget package test to be called after each language generator test
0ba790b Fix Swagger SchemaResolver to allow for the fact that properties may be defined by chains of indirect references to some type which inherits from another compatible type - and that should be fine!
3ea49f8 Adding ChangeLog
9c26eea Added AcceptanceTestPath to the exception message.
79a1c2c Fixed test project build failure in VS2015
eba3a94 fixed python test with . in base UR
7f2b179 Fixed remaining Java tests with . in the base URI
191cac8 Bringing back Generator tests to Linux run
a1ac974 Changed . in Java test URI
8fa3955 Changed the url for LROS and paging on the test server
7dc762c Changing NodeJS Azure LRO tests base URI
4ce0ca2 removed mono from travis.yml
9a0b774 updated NuGet.exe to 3.5-beta
f1ac322 Fixed travis.yml
d25043a Merge pull request Azure#1062 from veronicagg/relprep
6c2547a changed test server package dependency
d76911a Skipped Generators tests in travis.
45413a8 Updating ms-rest-azure version
9750fcb Fix generated file name
6825c6c Fixing net 4.5.2 reference in test project.
8151cf6 Fixed travis.yml to use coreclr rc2 instead of dnx
773e9f1 Merge branch 'netcore' of github.com:Azure/AutoRest into netcore
02f34b8 Merge pull request Azure#1058 from Azure/master
adee9ea Http method get with status code 204 should be success in longrunning operation. (Azure#1056)
35e197f Merge pull request Azure#1033 from lmazuel/useragent
8212eb8 Get formatted reference value for only sequence type or return name (Azure#1051)
4624e6f Update ServiceClient.cs
4630b69 Update ServiceClient.cs
a63879d Merge pull request Azure#1020 from annatisch/py-dev
5681eea Merge branch 'netcore' of github.com:Azure/AutoRest into netcore
bc85f48 Merge pull request Azure#1052 from Azure/master
ffe7e89 Fixed netcore build warnings.
69a989d Fixed gulpfile.js
92a2f95 Merge pull request Azure#1039 from jianghaolu/master
cab9d04 Merge pull request Azure#1023 from csmengwan/master
689423c Merge pull request Azure#1001 from tbombach/getting-started
e0e5bd1 Fixed failed test
640df1a Review feedback
9f62082 Set customer headers default to None
4104a56 Support for x-ms-enum ModelAsString
1d37145 removed base64 encoding/decoding
914f60f Added support for base64url serialization
3e08cfa Regenerated
1991851 Added unix url test
6500965 Revert "Change body serialization for complex type"
24cd72e review cleanups
88438df Regenerated tests
05f68a6 Test dict serialization
51948d7 Refactored dict serialization
00ff9b3 tox cleanups
c951cb8 regenerated python tests
71f8973 support for unix timestamps
64e0b96 Removed config objects from tests
42219a6 Merged config and client objects
fae2d8a Change body serialization for complex type
7ef8f8c Updating documentation in the running AutoRest section
833c80d Merge pull request Azure#1045 from daschult/master
2c27c28 Update ServiceClient.cs
ca5a350 Update ServiceClient.cs
6cb707c Merge branch 'netcore' of github.com:Azure/AutoRest into netcore
e23db71 Merge pull request Azure#1047 from Azure/master
111d7d5 Merge branch 'master' of github.com:Azure/AutoRest into netcore
71bc552 Moved to CoreClr RC2 public preview
eff510f Fix analysis errors
b39ebd5 Merge pull request Azure#1046 from tbombach/update-autorest-version-0.17.0
8e26ebe Merge branch 'master' of https://github.com/Azure/autorest
4d6e574 code revise
e39bf6d Merge branch 'master' of github.com:Azure/AutoRest into netcore
52f3fbf Bumping AutoRest version to 0.17.0
e518b9c Merge branch 'master' of https://github.com/Azure/autorest
e9adb9d Update expected azure resource schemas and remove InternalsVisibleTo in AzureResourceSchema generator project
328825f Update ServiceClient.cs
b2f822e Merge pull request Azure#1010 from hovsepm/master
8124fb7 Merge pull request Azure#1040 from matthchr/feature/param-group-comments
a0a620d Regenerate expected
ac754e6 Refactor parameter grouping and enable better comments
f69f5ce Merge pull request Azure#1018 from daschult/master
68b02be Merge pull request Azure#1035 from brnleehng/feature/doc-strings-1
a30c462 Merge pull request Azure#1016 from kirthik/master
6de0b6d Adding support for Unix date-time in ruby (Azure#1014)
3285bee Merge pull request Azure#1038 from Azure/release
530c90c Use SNAPSHOT runtime as dependency
6196277 Updating the dockerfile to use AutoRest 0.16.0
dcdca06 Added null check for property
374455a Regenerated expected files
78356b5 Updated comments for references
09ffae3 Merge pull request Azure#1032 from tbombach/package_namespace_null
927a9d4 Add platform in Python UserAgent
fe3e5a4 Fix for a null reference exception in JavaCodeNamer when the namespace parameter is not provided as a command line parameter
38aa357 Merge branch 'release' of https://github.com/Azure/autorest into release
a5e2004 Merge branch 'master' of https://github.com/Azure/autorest
e1d41ab Patch support for long running operation in ruby (Azure#1011)
a76ce51 Merge pull request Azure#1029 from amarzavery/optional
2777e8f Merge pull request Azure#1031 from jianghaolu/release
af4d522 fix env tests
12ac648 Use 1.0.0-SNAPSHOT for Java & Azure.Java
7c948e1 Merge branch 'release' of github.com:Azure/autorest into optional
ca68a08 updated activeDirectoryEndpointUrl with slashes
7f90ee0 Adding release notes for 0.16.0 release
30ed59c Added expression support
075398c Merge branch 'dev/daschult/AddChildResources'
b14c51d Merge branch 'master' of https://github.com/Azure/autorest
fb19554 Add support for child resources
1150967 updated node.js clientruntime version to 1.13.0 & 1.3.1 for ms-rest-azure & ms-rest resp. (Azure#1026)
4f7dc49 updated node.js clientruntime version to 1.13.0 & 1.3.1 for ms-rest-azure and ms-rest resp.
cb980a4 Merge branch 'master' of github.com:Azure/autorest into optional
5604cf9 Added support for Microsoft.Web. Change resource schema resource names to be resource type with '_' instead of '/'
630d39b Fix LRO issue in C# code gen
e0fde05 Rename JSONSchema.cs to JsonSchema.cs
01d7a12 Merge branch 'master' of https://github.com/Azure/autorest
d406c85 Add Network test
31f3a92 Fixed parsing SequenceTypes and add Compute acceptance test
cfdf8a8 Appended additional operation names to the documentation for Parameter Groups (Azure#1002)
3eef4f2 Fixed all analysis errors
42cd603 Storage, Batch, and CDN schemas generating
9562283 Fix for Azure#967: C# generator generates code that contains compiler warnings
79b3093 Update ServiceClient.cs
8a2fd9a Update ServiceClient.cs
c4c32d2 Working on model
19cb26d Fixed typos in comments
5e54326 Storage and Batch passing
df8fb81 Merge branch 'master' of https://github.com/Azure/autorest
4c5f556 Add Batch acceptance test
14c2966 Adding more instructions to the building code documentation
0142862 [NodeJS] Redesigned the structure of AzureEnvironment and updated environment info (Azure#998)
88e3679 getting rid of underscore.js as a dependency from ms-rest-azure
2a447e5 Merge branch 'master' of github.com:Azure/autorest into optional
55af5be Redesigned the structure of AzureEnvironment and updated the environments with more values.
49cc5e0 Can now generate fleshed out storage schema
f41092a Implement x-ms-parameterized-host extension for ruby (Azure#992)
16eebb8 Merge pull request Azure#971 from tbombach/test-documentation
5101bc7 Fixing arrays with collection format not replaced correctly in URLs (Azure#990)
47753e5 Fix AzureResourceSchema projects (Azure#956)
1f4cc35 msrest/msrestazure 0.3.0 (Azure#982)
78ce979 Updated the UserAgent ProductInfoHeaderValue to use the AssemblyInformationalVersion or the AssemblyFileVersion, if neither attribute is available it will default to the Assembly Version. (Azure#979)
b274bbe Merge pull request Azure#875 from csmengwan/master
37a5369 UnixTime in node.js (Azure#987)
5e85f67 FxCop warnings
340132b Merge branch 'master' of https://github.com/Azure/autorest
63fee4f UnixTime tests
54cfaac modification
ff64ad6 Merge branch 'master' of github.com:Azure/autorest into optional
2f82af1 unixTime in node.js
651b102 fixed setting default value for a complex object containing constant properties (Azure#985)
5a032ae remove null check validation for unixtime as they are treated as long in java
f0dff3d Fixed fxcop warnings
845fc5b result of executing gulp regenerate:expected
7750284 fixed setting default value for a complex object containing constant properties.
1a6bf4e code revise
2f7d3e4 Deprecate two old functions
46b1540 Merge branch 'master' of https://github.com/Azure/autorest
f82044b Merge branch 'master' of github.com:Azure/autorest into optional
f510e4d Merge branch 'master' of github.com:Azure/AutoRest into netcore
32d190e Merge pull request Azure#974 from hovsepm/master
88cef20 Fixes Issue Azure#944 by catching the JSONException that may occur on a Non-Success StatusCode when attempting to Deserialize the HTTPResponse.Content when it is not JSON.
af6fa32 Fixed the test
72ba2d6 Added tests to Odata filter generation
f76e16f Merge pull request Azure#973 from Azure/revert-902-master
1e0252d Revert "Escape data strings for odata queries."
a7b6eb9 Added an ExitCode to Autorest.exe (Azure#966)
08bd336 Adding documentation for instructions on writing tests in AutoRest
c38771d Fix FXCopy issues
f325514 Merge branch 'master' of https://github.com/Azure/autorest
ab9cb34 Merge pull request Azure#948 from tbombach/issue-909
d1d781c Python Read-only and UTF-8 support (Azure#959)
468c8c4 Fixes the issue where the contents of the output file for SingleFileGeneration are appended to each time Autorest is run (Azure#968)
dccbc73 Simplifying the logic for determining SerializationSettings
1819c56 Merge remote-tracking branch 'refs/remotes/Azure/master' into issue-909
b6ee9ef Merge pull request Azure#947 from alesvi/master
05e8518 Fixed build.proj to use netcore instead of dnu.
62dfbcc Fixed CSharp Generators test project
74692a0 Fixed Microsoft.Rest.ClientRuntime.Tracing.Tests test and removed xproj and csproj files
a757cc4 Can generate storage schema from swagger
16b8f29 Set the intial coverage for the LRONonRetryPut201Creating400InvalidJson to 1
0b4ee07 Merge remote-tracking branch 'refs/remotes/Azure/master' into issue-944
d41d44c Added a LRO acceptance test to verify that a CloudException is thrown when a JSONException occurs during Deserialization of the response content
6981bc8 Merge remote-tracking branch 'refs/remotes/Azure/master' into issue-909
ce58306 Fix AzureResourceSchema project
0eb8d0f Merge latest from Azure/AutoRest
f277902 Merge remote-tracking branch 'upstream/master'
3dd9e99 Merge branch 'master' of github.com:Azure/autorest into optional
3622e2b Added a new LongRunningOperations test to verify that a CloudException is thrown even when a JSONException occurs Deserializing the HTTPResponse.Content
8b015ac Captured the JSONException that may occur on a Non-Success StatusCode when attempting to Deserialize the HTTPResponse.Content when it is not JSON
b6bf4cc Adding a User-Agent header to the request done in FileSystem.ReadFileAsText
5577875 Updating test coverage list
59d3fa9 Adding test for Unix time encoded values in path
166ff89 Updating test server to add test scenarios for unix time
1833d26 Adding a new primary type for unix time and updating namers to handle this type
646e72a Converting CSharp ClientRuntime projects to CoreClr
1ac04c3 Merge branch 'master' of github.com:Azure/autorest into optional
d8110cf positionInOperation defaults to first
63b9fd6 Enhancement to x-ms-parameterized-host extension
5b4ca29 change code gen in node js to merge LRO operations into one method
ffb8fa3 Almost have Storage schema generating from swagger spec
b9d642d add 204 poll state for post
9573dee code revise
d1ff941 fix the naming issue in azure serviceClientTest
39b4b19 code revise
a8c0328 AzureResourceSchemaCodeGenerator shows up in AutoRest help and tests pass
7bfc5c2 Add AzureResourceSchema to configuration file
f7840bf Update AzureResourceSchema projects and add initial c# files
0522974 Add initial AzureResourceSchema project and test project
94b15ef Automatically detect MSBuild tools version in Windows platform
4ab8892 style change
f72ae19 Merge branch 'master' of https://github.com/csmengwan/autorest
6e478d4 fix async patch and post run
9c7e28b code revise
b789377 add test for fixing the post/patch async operation
f058543 fix async patch and post run

git-subtree-dir: runtimes
git-subtree-split: 8fbe3cb
  • Loading branch information
jianghaolu committed Jul 18, 2016
1 parent f06ab8e commit e96e080
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

package com.microsoft.rest;

import java.io.IOException;

import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

import java.io.IOException;

/**
* Handles dynamic replacements on base URL. The arguments must be in pairs
* with the string in raw URL to replace as replacements[i] and the dynamic
Expand All @@ -34,6 +34,7 @@ public Response intercept(Chain chain) throws IOException {
for (int i = 0; i < replacements.length; i += 2) {
baseUrl = baseUrl.replaceAll("(?i)\\Q" + replacements[i] + "\\E", replacements[i + 1]);
}
baseUrl = removeRedundantProtocol(baseUrl);
HttpUrl baseHttpUrl = HttpUrl.parse(baseUrl);
request = request.newBuilder()
.url(baseHttpUrl)
Expand All @@ -42,4 +43,12 @@ public Response intercept(Chain chain) throws IOException {
}
return chain.proceed(request);
}

private String removeRedundantProtocol(String url) {
int last = url.lastIndexOf("://") - 1;
while (last >= 0 && Character.isLetter(url.charAt(last))) {
--last;
}
return url.substring(last + 1);
}
}

0 comments on commit e96e080

Please sign in to comment.