Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java beta2 release #1213

Merged
merged 124 commits into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
b7de51d
Rename method groups without Operations suffix
jianghaolu Mar 31, 2016
3a885ff
Shorten operations names to simple plurals
jianghaolu Mar 31, 2016
4c181b2
Address code analysis
jianghaolu Apr 1, 2016
c009c93
Rename AutoRestException to RestException
jianghaolu Apr 1, 2016
5573dc8
Move impl classes to implementation subpackage
jianghaolu Apr 1, 2016
c0b92a9
Remove get prefix on model property getters
jianghaolu Apr 6, 2016
cd01cf8
Remove interfaces for method groups and service clients
jianghaolu Apr 6, 2016
b877cbf
Seperate type name generation and client name generation
jianghaolu Apr 6, 2016
175a66e
Rename models to end with impl
jianghaolu Apr 6, 2016
51f17c3
Move into implementation.api subpackage
jianghaolu Apr 6, 2016
6333912
Rename only top level parameters & responses to Inner
jianghaolu Apr 7, 2016
8bd5afd
Rename method group impl to inner
jianghaolu Apr 7, 2016
07bda32
Address code analysis errors
jianghaolu Apr 7, 2016
3d236fe
Regenerate after merge
jianghaolu Apr 7, 2016
8b1aeed
Extend functionality for paged lists
jianghaolu Apr 8, 2016
88c8aad
Fix paged list to use hasNextPage() for hasNext()
jianghaolu Apr 15, 2016
42a3277
Use String for OData
jianghaolu Apr 15, 2016
f674f3c
Add fluent to pageimpl
jianghaolu Apr 15, 2016
0e14ae1
Merge pull request #955 from jianghaolu/javavnext
jianghaolu Apr 16, 2016
e8eb547
Remove Java/ in ClientRuntimes
jianghaolu Apr 18, 2016
1c70756
Add Java runtimes as a submodule
jianghaolu Apr 18, 2016
8979cac
Use relative path in .gitmodules
jianghaolu Apr 18, 2016
2ad3332
Use javavnext branch consistently
jianghaolu Apr 18, 2016
7c87e37
Use latest javavnext runtime
jianghaolu Apr 19, 2016
88f2de6
Remove submodule
jianghaolu Apr 19, 2016
5c26dcf
Merge commit '7162a39ae50d95c1a20cbb521282752955ed722a' as 'ClientRun…
jianghaolu Apr 19, 2016
7162a39
Squashed 'ClientRuntimes/Java/' content from commit f7a6b01
jianghaolu Apr 19, 2016
0e823eb
Move models into same folders as operations in Azure.Java
jianghaolu Apr 20, 2016
2b0bcee
Add missing regen files
jianghaolu Apr 20, 2016
f91e917
Merge pull request #962 from jianghaolu/javavnext
jianghaolu Apr 20, 2016
26179a7
Move .build() from collection calls to initialize()
jianghaolu Apr 25, 2016
f117a2c
Add RestClient
jianghaolu Apr 26, 2016
b9c2f51
Support base URL replace using Interceptor (Retrofit 2.0)
jianghaolu Apr 27, 2016
1b40401
Fix header interceptor
jianghaolu Apr 27, 2016
ab20bfa
Address checkstyle errors
jianghaolu Apr 27, 2016
c00ede8
Merge pull request #958 from jianghaolu/javartremoval
jianghaolu Apr 27, 2016
27ff4d1
Merge pull request #984 from jianghaolu/builder
jianghaolu Apr 27, 2016
64f00ff
Merge commit '9513e6ec31afd0bc1418f07feb3ff8202041f608' into javavnext
jianghaolu Apr 27, 2016
9513e6e
Squashed 'ClientRuntimes/Java/' changes from f7a6b01..a6eef1f
jianghaolu Apr 27, 2016
a8a314e
Create service once in each client
jianghaolu May 2, 2016
2719f0f
Merge pull request #996 from jianghaolu/lazyops
jianghaolu May 3, 2016
6b75e1a
Merge branch 'javavnext' of github.com:Azure/AutoRest into javavnext
jianghaolu May 3, 2016
dabff66
Fixed Azure.Java inner type name as base type
jianghaolu May 3, 2016
ac89331
Fix PageImpl class names
jianghaolu May 3, 2016
e38a3e2
Merge branch 'master' of github.com:Azure/AutoRest into javavnext
jianghaolu May 3, 2016
b284b7d
Address code analysis errors
jianghaolu May 3, 2016
a23a438
Merge pull request #1004 from jianghaolu/javavnext
jianghaolu May 3, 2016
3e216aa
Fix base model types that are not top level
jianghaolu May 4, 2016
892863c
Normalize base model type for composite types
jianghaolu May 4, 2016
7ac2897
Fix extensible enums generation for Java
jianghaolu May 12, 2016
964a116
Delcare enum to be final and hide constructors
jianghaolu May 12, 2016
cbe3e66
Better naming for enums
jianghaolu May 12, 2016
a93673e
Merge pull request #1034 from jianghaolu/enumfix
jianghaolu May 13, 2016
15a87ea
Add back old Azure generator
jianghaolu May 16, 2016
774f824
Add fluent project and regenerate
jianghaolu May 16, 2016
aaa5ffe
Azure.Java generates original structure
jianghaolu May 17, 2016
26a745b
Fluent generates correct code
jianghaolu May 17, 2016
586e6ad
Add test files for fluent codegen
jianghaolu May 17, 2016
e698cfe
Address code analysis errors
jianghaolu May 17, 2016
3fa063c
Merge pull request #1048 from jianghaolu/newgen
jianghaolu May 17, 2016
a9838b4
Support client level versioned User-Agent
jianghaolu May 19, 2016
fddca6a
Squashed 'ClientRuntimes/Java/' changes from a6eef1f..63803e0
jianghaolu May 19, 2016
61018ae
Merge commit 'fddca6a8917951772a65a3e5b47c5e72c1f42fb5' into ua
jianghaolu May 19, 2016
1a75961
Regenerate Java.Azure
jianghaolu May 19, 2016
484ef21
Fix styles and tests
jianghaolu May 19, 2016
d3176b4
Fix file encoding
jianghaolu May 19, 2016
3cb171a
Merge pull request #1060 from jianghaolu/ua
jianghaolu May 19, 2016
98eb3c7
Add checkstyle rule
jianghaolu May 19, 2016
c3757e9
Merge pull request #1065 from jianghaolu/javavnext
jianghaolu May 19, 2016
2b92edf
Merge branch 'master' of github.com:Azure/AutoRest into quickvm
jianghaolu May 25, 2016
9c2d1e9
Regenerate after merging
jianghaolu May 25, 2016
97bc529
Squashed 'ClientRuntimes/Java/' changes from 63803e0..4736d63
jianghaolu May 25, 2016
7108200
Merge commit '97bc529bbb06017de0bb069012c016c2949157be' into javavnext
jianghaolu May 25, 2016
964da2c
Remove . in test URL
jianghaolu May 26, 2016
03b2458
Merge pull request #1094 from jianghaolu/javavnext
jianghaolu May 27, 2016
a43e1b4
Fix parameter mapping assignment bug
jianghaolu May 31, 2016
71376e0
Directly use null for optional grouped parameter
jianghaolu May 31, 2016
a573983
Add parenthesis to ternary operator
jianghaolu May 31, 2016
e298162
Address code analysis
jianghaolu May 31, 2016
0a5eddd
Merge pull request #1102 from jianghaolu/mappingfix
jianghaolu May 31, 2016
d98b5d4
Renamed setXXX() to withXXX() for non-top level methods
Jun 2, 2016
0b12698
Merge pull request #1126 from Azure/rename-setters
jianghaolu Jun 2, 2016
05fb9af
Fix more bugs in parameter mapping
jianghaolu Jun 6, 2016
083e8ab
Squashed 'ClientRuntimes/Java/' changes from 4736d63..b5859aa
jianghaolu Jun 6, 2016
0ee1f30
Merge commit '083e8ab0c10b58e1491cd38235da5110121ef326' into javavnext
jianghaolu Jun 6, 2016
d51d8c7
Address checkstyle errors
jianghaolu Jun 6, 2016
c992270
Merge pull request #1141 from jianghaolu/javavnext
jianghaolu Jun 7, 2016
dd834fa
Update dependencies to official releases
jianghaolu Jun 7, 2016
bc2b82f
Let service client setters return the client
jianghaolu Jun 7, 2016
048ded5
Trim space on javadocs
jianghaolu Jun 8, 2016
3318f9d
Merge pull request #1146 from jianghaolu/javadoctrim
jianghaolu Jun 8, 2016
eeb0c03
Fix parameterized host concurrency issue
jianghaolu Jun 8, 2016
3a5a055
Remove header after use
jianghaolu Jun 8, 2016
30c7b10
Merge commit 'ca795386ca55d94335fcfbc1fd2e67fc9302958d' into javavnext
jianghaolu Jun 8, 2016
ca79538
Squashed 'ClientRuntimes/Java/' changes from b5859aa..87afa33
jianghaolu Jun 8, 2016
ffbdb9e
Merge pull request #1149 from jianghaolu/javavnext
jianghaolu Jun 8, 2016
cc2ac89
Fix bug of parameterized host in paging next
jianghaolu Jun 8, 2016
aea1195
Merge branch 'javavnext' of github.com:Azure/AutoRest into javavnext
jianghaolu Jun 8, 2016
30ad694
Fix parameter model imports
jianghaolu Jun 9, 2016
1f29baf
Merge pull request #1150 from jianghaolu/javavnext
jianghaolu Jun 9, 2016
854d2ce
Add a test for custom base URL
jianghaolu Jun 9, 2016
2e9f20c
Merge branch 'javavnext' of github.com:Azure/AutoRest into javavnext
jianghaolu Jun 9, 2016
4ea89c3
Merge pull request #1153 from jianghaolu/javavnext
jianghaolu Jun 10, 2016
0962063
Merge branch 'javavnext' of github.com:Azure/AutoRest into javavnext
jianghaolu Jun 15, 2016
785a59e
Squashed 'ClientRuntimes/Java/' changes from 87afa33..6196ce0
jianghaolu Jun 15, 2016
ef58ef4
Merge commit '785a59ebb1f1249aa40468db84edb644fb82e0a9' into javavnext
jianghaolu Jun 15, 2016
859e2ce
Remove required mapper adapter
jianghaolu Jun 16, 2016
541bfa6
Add stage for base url
jianghaolu Jun 16, 2016
dbdb4e5
Remove rest client from generic codegen
jianghaolu Jun 16, 2016
fb71a5f
Move RestClient into azure runtime
jianghaolu Jun 16, 2016
59186da
Regenerate azure & azure.fluent
jianghaolu Jun 16, 2016
6bbeac2
Make enum case-insensitive
jianghaolu Jun 16, 2016
244dad2
Remove toValue() on enums since we already have toString()
jianghaolu Jun 16, 2016
8f7b193
Merge pull request #1181 from jianghaolu/javavnext
jianghaolu Jun 17, 2016
ee43731
Squashed 'ClientRuntimes/Java/' changes from 6196ce0..cf2fdb5
jianghaolu Jun 27, 2016
90854ca
Merge commit 'ee43731a4c009637180f633f8f732399c17b9977' into javavnext
jianghaolu Jun 27, 2016
4afebc0
Move non-top level models out of implementation
jianghaolu Jun 28, 2016
e6a10dc
Remove redundant imports in models
jianghaolu Jun 28, 2016
12671b5
Move out of api
jianghaolu Jun 28, 2016
2dec5f3
Add a flag of generated code in license header
jianghaolu Jun 28, 2016
0157af0
Add fluent flavor of enum type model
jianghaolu Jun 28, 2016
a07a514
Address code analysis errors
jianghaolu Jun 29, 2016
c2cc638
Merge pull request #1209 from jianghaolu/move
jianghaolu Jun 29, 2016
2f44d9b
Merge branch 'master' of github.com:Azure/AutoRest into javavnext
jianghaolu Jun 29, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 14 additions & 1 deletion AutoRest.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRest.Core", "AutoRest\AutoRest.Core\AutoRest.Core.csproj", "{C876085F-9DC3-41F0-B7B4-17022CD84684}"
EndProject
Expand Down Expand Up @@ -120,6 +120,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRest.Generator.AzureRes
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRest.Generator.AzureResourceSchema.Tests", "AutoRest\Generators\AzureResourceSchema\AzureResourceSchema.Tests\AutoRest.Generator.AzureResourceSchema.Tests.csproj", "{1C3B4A33-E045-4C8F-9202-1B651A686567}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRest.Generator.Azure.Java.Fluent", "AutoRest\Generators\Java\Azure.Java.Fluent\AutoRest.Generator.Azure.Java.Fluent.csproj", "{D35E97FD-E360-4DAA-96D0-DA45F32150B9}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CSharp.Tests", "AutoRest\Generators\CSharp\CSharp.Tests\CSharp.Tests.xproj", "{784D4B45-F12A-4B8F-A86C-35A080814A19}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Azure.CSharp.Tests", "AutoRest\Generators\CSharp\Azure.CSharp.Tests\Azure.CSharp.Tests.xproj", "{43DFEF27-2FD7-4827-A669-DFD2DD1CBBCC}"
Expand Down Expand Up @@ -496,6 +498,16 @@ Global
{1C3B4A33-E045-4C8F-9202-1B651A686567}.Portable-Release|Any CPU.Build.0 = Release|Any CPU
{1C3B4A33-E045-4C8F-9202-1B651A686567}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C3B4A33-E045-4C8F-9202-1B651A686567}.Release|Any CPU.Build.0 = Release|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Debug|Any CPU.ActiveCfg = Portable-Debug|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Net45-Release|Any CPU.Build.0 = Net45-Release|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Portable-Debug|Any CPU.ActiveCfg = Portable-Debug|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Portable-Debug|Any CPU.Build.0 = Portable-Debug|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Portable-Release|Any CPU.ActiveCfg = Portable-Release|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Portable-Release|Any CPU.Build.0 = Portable-Release|Any CPU
{D35E97FD-E360-4DAA-96D0-DA45F32150B9}.Release|Any CPU.ActiveCfg = Portable-Release|Any CPU
{784D4B45-F12A-4B8F-A86C-35A080814A19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{784D4B45-F12A-4B8F-A86C-35A080814A19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{784D4B45-F12A-4B8F-A86C-35A080814A19}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -574,6 +586,7 @@ Global
{B6A1FC1E-0779-4900-84EE-262DD0E53FF4} = {EF9E346D-70C6-45F5-8FF9-9B734F4A1298}
{654344A5-0556-49C7-BFB3-59676D7440D3} = {B6A1FC1E-0779-4900-84EE-262DD0E53FF4}
{1C3B4A33-E045-4C8F-9202-1B651A686567} = {B6A1FC1E-0779-4900-84EE-262DD0E53FF4}
{D35E97FD-E360-4DAA-96D0-DA45F32150B9} = {A9C01442-1E93-4C2D-9182-B61C9F53C3FF}
{784D4B45-F12A-4B8F-A86C-35A080814A19} = {03E75B1D-A443-4A12-B31F-860DB2B45140}
{43DFEF27-2FD7-4827-A669-DFD2DD1CBBCC} = {03E75B1D-A443-4A12-B31F-860DB2B45140}
{8192BAA3-C606-4D44-B0D7-46BE7AFA4096} = {03E75B1D-A443-4A12-B31F-860DB2B45140}
Expand Down
13 changes: 11 additions & 2 deletions AutoRest/AutoRest.Core/CodeNamer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public virtual void NormalizeClientModel(ServiceClient client)
throw new ArgumentNullException("client");
}

client.Name = GetTypeName(client.Name);
client.Name = GetClientName(client.Name);
client.Namespace = GetNamespaceName(client.Namespace);

NormalizeClientProperties(client);
Expand Down Expand Up @@ -392,6 +392,15 @@ public virtual string GetMethodGroupName(string name)
return PascalCase(RemoveInvalidCharacters(GetEscapedReservedName(name, "Model")));
}

public virtual string GetClientName(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
return name;
}
return PascalCase(RemoveInvalidCharacters(GetEscapedReservedName(name, "Model")));
}

/// <summary>
/// Formats a string for naming a local variable using Camel case by default.
/// </summary>
Expand Down Expand Up @@ -680,7 +689,7 @@ protected virtual void ResolveMethodGroupNameCollision(ServiceClient serviceClie
}
}

private static string ResolveNameConflict(
protected static string ResolveNameConflict(
Dictionary<string, string> exclusionDictionary,
string typeName,
string type,
Expand Down
1 change: 1 addition & 0 deletions AutoRest/AutoRest.Core/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Scope = "member", Target = "Microsoft.Rest.Generator.ClientModel.ServiceClient.#Methods")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Scope = "member", Target = "Microsoft.Rest.Generator.ClientModel.ServiceClient.#Properties")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Scope = "member", Target = "Microsoft.Rest.Generator.ClientModel.ParameterTransformation.#ParameterMappings")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Scope = "member", Target = "Microsoft.Rest.Generator.CodeNamer.#ResolveNameConflict(System.Collections.Generic.Dictionary`2<System.String,System.String>,System.String,System.String,System.String)")]
2 changes: 1 addition & 1 deletion AutoRest/AutoRest.Core/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public string Header
}
else if (value == "MICROSOFT_MIT_NO_CODEGEN")
{
_header = MicrosoftMitLicenseHeader;
_header = MicrosoftMitLicenseHeader + Environment.NewLine + "Code generated by Microsoft (R) AutoRest Code Generator.";
}
else if (value == "NONE")
{
Expand Down
3 changes: 3 additions & 0 deletions AutoRest/AutoRest/AutoRest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"Azure.Java": {
"type": "AzureJavaCodeGenerator, AutoRest.Generator.Azure.Java"
},
"Azure.Java.Fluent": {
"type": "AzureJavaFluentCodeGenerator, AutoRest.Generator.Azure.Java.Fluent"
},
"Python": {
"type": "PythonCodeGenerator, AutoRest.Generator.Python"
},
Expand Down
99 changes: 99 additions & 0 deletions AutoRest/Generators/Java/Azure.Java.Fluent.Tests/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apply plugin: 'java'
apply plugin: 'checkstyle'

group = 'com.microsoft.azure'
version = '1.0.0-SNAPSHOT'

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

checkstyle {
toolVersion = "6.9"
configFile = new File("$rootDir/Tools/checkstyle/checkstyle.xml")
configProperties = [samedir: "$rootDir/Tools/checkstyle"]
reportsDir = new File("$rootDir/Tools/checkstyle/reports")
}

dependencies {
compile 'commons-codec:commons-codec:1.10'
compile 'com.microsoft.azure:azure-client-runtime:1.0.0-SNAPSHOT'
compile 'joda-time:joda-time:2.8.2'
compile 'javax.validation:validation-api:1.1.0.Final'
testCompile 'junit:junit:4.12'
testCompile 'junit:junit-dep:4.11'
testCompile 'commons-io:commons-io:2.4'
}

test {
testLogging {
events "passed", "skipped", "failed", "standardError"
}
}

javadoc {
options.encoding = 'UTF-8'
}

test {
reports.getHtml()
reports.html.destination = file("${projectDir}/../../../../TestResults/JavaAzureFluentCodeGen")
}

task buildRuntime(type: Exec) {
workingDir "${projectDir}/../../../../ClientRuntimes/Java"
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'gradle', 'uploadArchives'
} else {
commandLine 'gradle', 'uploadArchives'
}
}

task npmrestore(type: Exec) {
workingDir "${projectDir}/../../../TestServer/server"
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'npm', 'install'
} else {
commandLine 'npm', 'install'
}
}

task installforever(type: Exec, dependsOn: 'npmrestore') {
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'npm', 'install', '-g', 'forever'
} else {
commandLine 'npm', 'install', '-g', 'forever'
}
}

task runserver(type: Exec, dependsOn: 'installforever') {
workingDir "${projectDir}/../../../TestServer/server"
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'forever', 'start', 'startup/www.js'
} else {
commandLine 'forever', 'start', 'startup/www.js'
}
}

task testcoverage(type: JavaExec, dependsOn: 'runserver') {
main = 'fixtures.azurereport.CoverageReporter'
classpath = sourceSets.test.runtimeClasspath
}

task stopserver(type: Exec, dependsOn: 'testcoverage') {
workingDir "${projectDir}/../../../TestServer/server"
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'forever', 'stop', 'startup/www.js'
} else {
commandLine 'forever', 'stop', 'startup/www.js'
}
}

tasks.compileJava.dependsOn 'clean'
tasks.test.dependsOn 'runserver'
tasks.test.finalizedBy 'stopserver'
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

package fixtures.azureparametergrouping;


/**
* The Error model.
*/
public class Error {
/**
* The status property.
*/
private Integer status;

/**
* The message property.
*/
private String message;

/**
* Get the status value.
*
* @return the status value
*/
public Integer status() {
return this.status;
}

/**
* Set the status value.
*
* @param status the status value to set
* @return the Error object itself.
*/
public Error withStatus(Integer status) {
this.status = status;
return this;
}

/**
* Get the message value.
*
* @return the message value
*/
public String message() {
return this.message;
}

/**
* Set the message value.
*
* @param message the message value to set
* @return the Error object itself.
*/
public Error withMessage(String message) {
this.message = message;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

package fixtures.azureparametergrouping;

import com.microsoft.rest.RestException;
import retrofit2.Response;

/**
* Exception thrown for an invalid response with Error information.
*/
public class ErrorException extends RestException {
/**
* Information about the associated HTTP response.
*/
private Response response;
/**
* The actual response body.
*/
private Error body;
/**
* Initializes a new instance of the ErrorException class.
*/
public ErrorException() { }
/**
* Initializes a new instance of the ErrorException class.
*
* @param message The exception message.
*/
public ErrorException(final String message) {
super(message);
}
/**
* Initializes a new instance of the ErrorException class.
*
* @param message the exception message
* @param cause exception that caused this exception to occur
*/
public ErrorException(final String message, final Throwable cause) {
super(message, cause);
}
/**
* Initializes a new instance of the ErrorException class.
*
* @param cause exception that caused this exception to occur
*/
public ErrorException(final Throwable cause) {
super(cause);
}
/**
* Gets information about the associated HTTP response.
*
* @return the HTTP response
*/
public Response getResponse() {
return response;
}
/**
* Gets the HTTP response body.
*
* @return the response body
*/
public Error getBody() {
return body;
}
/**
* Sets the HTTP response.
*
* @param response the HTTP response
*/
public void setResponse(Response response) {
this.response = response;
}
/**
* Sets the HTTP response body.
*
* @param body the response body
*/
public void setBody(Error body) {
this.body = body;
}
}
Loading