Merge branch 'master' of github.com:swagger-api/swagger-codegen

This commit is contained in:
Tony Tam 2016-11-02 16:56:10 -04:00
commit deb526440c
64 changed files with 549 additions and 330 deletions

View File

@ -635,6 +635,8 @@ public class ApiClient {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.delete();
} else if ("PATCH".equals(method)) {
response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity);
} else {
throw new ApiException(500, "unknown method type " + method);
}

View File

@ -27,7 +27,6 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{/vars}}
{{#vars}}
{{^isReadOnly}}
public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
this.{{name}} = {{name}};
return this;
@ -47,7 +46,6 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
}
{{/isMapContainer}}
{{/isReadOnly}}
/**
{{#description}}
* {{{description}}}
@ -70,12 +68,10 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}};
}
{{^isReadOnly}}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
this.{{name}} = {{name}};
}
{{/isReadOnly}}
{{/vars}}

View File

@ -4,7 +4,7 @@ description: {{pubDescription}}
dependencies:
http: '>=0.11.1 <0.12.0'
dartson: "^0.2.4"
intl: "^0.12.4+2"
intl: ">=0.12.4"
dev_dependencies:
guinness: '^0.1.17'

View File

@ -30,7 +30,7 @@ namespace {{packageName}}.{{packageContext}}.Modules
{{/hasMore}}{{/isBodyParam}}{{/allParams}}{{#allParams}}{{#required}}
Preconditions.IsNotNull({{paramName}}, "Required parameter: '{{paramName}}' is missing at '{{operationId}}'");
{{/required}}{{/allParams}}
{{#returnType}}return {{/returnType}}service.{{operationId}}(Context{{#allParams.0}}, {{/allParams.0}}{{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{^returnType}}
{{#returnType}}return {{/returnType}}service.{{operationId}}(Context{{#allParams.0}}, {{/allParams.0}}{{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}}{{#isListContainer}}.ToArray(){{/isListContainer}}{{/returnType}};{{^returnType}}
return new Response { ContentType = "{{produces.0.mediaType}}"};{{/returnType}}
};
{{/operation}}

View File

@ -166,19 +166,19 @@ namespace {{packageName}}.{{packageContext}}.Utils
parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime));
parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime));
parsers.Put(typeof(IEnumerable<string>), value => value);
parsers.Put(typeof(ICollection<string>), value => value);
parsers.Put(typeof(IList<string>), value => value);
parsers.Put(typeof(List<string>), value => value);
parsers.Put(typeof(ISet<string>), value => value);
parsers.Put(typeof(HashSet<string>), value => value);
parsers.Put(typeof(IEnumerable<string>), ImmutableListParse(value => value));
parsers.Put(typeof(ICollection<string>), ImmutableListParse(value => value));
parsers.Put(typeof(IList<string>), ImmutableListParse(value => value));
parsers.Put(typeof(List<string>), ListParse(value => value));
parsers.Put(typeof(ISet<string>), ImmutableListParse(value => value));
parsers.Put(typeof(HashSet<string>), SetParse(value => value));
parsers.Put(typeof(IEnumerable<bool>), ImmutableListParse(bool.Parse));
parsers.Put(typeof(ICollection<bool>), ImmutableListParse(bool.Parse));
parsers.Put(typeof(IList<bool>), ImmutableListParse(bool.Parse));
parsers.Put(typeof(List<bool>), ListParse(bool.Parse));
parsers.Put(typeof(ISet<bool>), ImmutableSetParse(bool.Parse));
parsers.Put(typeof(HashSet<bool>), SetParse(bool.Parse));
parsers.Put(typeof(IEnumerable<bool?>), NullableImmutableListParse(bool.Parse));
parsers.Put(typeof(ICollection<bool?>), NullableImmutableListParse(bool.Parse));
parsers.Put(typeof(IList<bool?>), NullableImmutableListParse(bool.Parse));
parsers.Put(typeof(List<bool?>), NullableListParse(bool.Parse));
parsers.Put(typeof(ISet<bool?>), NullableImmutableSetParse(bool.Parse));
parsers.Put(typeof(HashSet<bool?>), NullableSetParse(bool.Parse));
parsers.Put(typeof(IEnumerable<byte>), ImmutableListParse(byte.Parse));
parsers.Put(typeof(ICollection<byte>), ImmutableListParse(byte.Parse));
@ -186,6 +186,7 @@ namespace {{packageName}}.{{packageContext}}.Utils
parsers.Put(typeof(List<byte>), ListParse(byte.Parse));
parsers.Put(typeof(ISet<byte>), ImmutableSetParse(byte.Parse));
parsers.Put(typeof(HashSet<byte>), SetParse(byte.Parse));
parsers.Put(typeof(IEnumerable<sbyte>), ImmutableListParse(sbyte.Parse));
parsers.Put(typeof(ICollection<sbyte>), ImmutableListParse(sbyte.Parse));
parsers.Put(typeof(IList<sbyte>), ImmutableListParse(sbyte.Parse));
@ -199,6 +200,7 @@ namespace {{packageName}}.{{packageContext}}.Utils
parsers.Put(typeof(List<short>), ListParse(short.Parse));
parsers.Put(typeof(ISet<short>), ImmutableSetParse(short.Parse));
parsers.Put(typeof(HashSet<short>), SetParse(short.Parse));
parsers.Put(typeof(IEnumerable<ushort>), ImmutableListParse(ushort.Parse));
parsers.Put(typeof(ICollection<ushort>), ImmutableListParse(ushort.Parse));
parsers.Put(typeof(IList<ushort>), ImmutableListParse(ushort.Parse));
@ -206,12 +208,13 @@ namespace {{packageName}}.{{packageContext}}.Utils
parsers.Put(typeof(ISet<ushort>), ImmutableSetParse(ushort.Parse));
parsers.Put(typeof(HashSet<ushort>), SetParse(ushort.Parse));
parsers.Put(typeof(IEnumerable<int>), ImmutableListParse(int.Parse));
parsers.Put(typeof(ICollection<int>), ImmutableListParse(int.Parse));
parsers.Put(typeof(IList<int>), ImmutableListParse(int.Parse));
parsers.Put(typeof(List<int>), ListParse(int.Parse));
parsers.Put(typeof(ISet<int>), ImmutableSetParse(int.Parse));
parsers.Put(typeof(HashSet<int>), SetParse(int.Parse));
parsers.Put(typeof(IEnumerable<int?>), NullableImmutableListParse(int.Parse));
parsers.Put(typeof(ICollection<int?>), NullableImmutableListParse(int.Parse));
parsers.Put(typeof(IList<int?>), NullableImmutableListParse(int.Parse));
parsers.Put(typeof(List<int?>), NullableListParse(int.Parse));
parsers.Put(typeof(ISet<int?>), NullableImmutableSetParse(int.Parse));
parsers.Put(typeof(HashSet<int?>), NullableSetParse(int.Parse));
parsers.Put(typeof(IEnumerable<uint>), ImmutableListParse(uint.Parse));
parsers.Put(typeof(ICollection<uint>), ImmutableListParse(uint.Parse));
parsers.Put(typeof(IList<uint>), ImmutableListParse(uint.Parse));
@ -219,12 +222,13 @@ namespace {{packageName}}.{{packageContext}}.Utils
parsers.Put(typeof(ISet<uint>), ImmutableSetParse(uint.Parse));
parsers.Put(typeof(HashSet<uint>), SetParse(uint.Parse));
parsers.Put(typeof(IEnumerable<long>), ImmutableListParse(long.Parse));
parsers.Put(typeof(ICollection<long>), ImmutableListParse(long.Parse));
parsers.Put(typeof(IList<long>), ImmutableListParse(long.Parse));
parsers.Put(typeof(List<long>), ListParse(long.Parse));
parsers.Put(typeof(ISet<long>), ImmutableSetParse(long.Parse));
parsers.Put(typeof(HashSet<long>), SetParse(long.Parse));
parsers.Put(typeof(IEnumerable<long?>), NullableImmutableListParse(long.Parse));
parsers.Put(typeof(ICollection<long?>), NullableImmutableListParse(long.Parse));
parsers.Put(typeof(IList<long?>), NullableImmutableListParse(long.Parse));
parsers.Put(typeof(List<long?>), NullableListParse(long.Parse));
parsers.Put(typeof(ISet<long?>), NullableImmutableSetParse(long.Parse));
parsers.Put(typeof(HashSet<long?>), NullableSetParse(long.Parse));
parsers.Put(typeof(IEnumerable<ulong>), ImmutableListParse(ulong.Parse));
parsers.Put(typeof(ICollection<ulong>), ImmutableListParse(ulong.Parse));
parsers.Put(typeof(IList<ulong>), ImmutableListParse(ulong.Parse));
@ -232,34 +236,33 @@ namespace {{packageName}}.{{packageContext}}.Utils
parsers.Put(typeof(ISet<ulong>), ImmutableSetParse(ulong.Parse));
parsers.Put(typeof(HashSet<ulong>), SetParse(ulong.Parse));
parsers.Put(typeof(IEnumerable<float>), ImmutableListParse(float.Parse));
parsers.Put(typeof(ICollection<float>), ImmutableListParse(float.Parse));
parsers.Put(typeof(IList<float>), ImmutableListParse(float.Parse));
parsers.Put(typeof(List<float>), ListParse(float.Parse));
parsers.Put(typeof(ISet<float>), ImmutableSetParse(float.Parse));
parsers.Put(typeof(HashSet<float>), SetParse(float.Parse));
parsers.Put(typeof(IEnumerable<float?>), NullableImmutableListParse(float.Parse));
parsers.Put(typeof(ICollection<float?>), NullableImmutableListParse(float.Parse));
parsers.Put(typeof(IList<float?>), NullableImmutableListParse(float.Parse));
parsers.Put(typeof(List<float?>), NullableListParse(float.Parse));
parsers.Put(typeof(ISet<float?>), NullableImmutableSetParse(float.Parse));
parsers.Put(typeof(HashSet<float?>), NullableSetParse(float.Parse));
parsers.Put(typeof(IEnumerable<double>), ImmutableListParse(double.Parse));
parsers.Put(typeof(ICollection<double>), ImmutableListParse(double.Parse));
parsers.Put(typeof(IList<double>), ImmutableListParse(double.Parse));
parsers.Put(typeof(List<double>), ListParse(double.Parse));
parsers.Put(typeof(ISet<double>), ImmutableSetParse(double.Parse));
parsers.Put(typeof(HashSet<double>), SetParse(double.Parse));
parsers.Put(typeof(IEnumerable<double?>), NullableImmutableListParse(double.Parse));
parsers.Put(typeof(ICollection<double?>), NullableImmutableListParse(double.Parse));
parsers.Put(typeof(IList<double?>), NullableImmutableListParse(double.Parse));
parsers.Put(typeof(List<double?>), NullableListParse(double.Parse));
parsers.Put(typeof(ISet<double?>), NullableImmutableSetParse(double.Parse));
parsers.Put(typeof(HashSet<double?>), NullableSetParse(double.Parse));
parsers.Put(typeof(IEnumerable<decimal>), ImmutableListParse(decimal.Parse));
parsers.Put(typeof(ICollection<decimal>), ImmutableListParse(decimal.Parse));
parsers.Put(typeof(IList<decimal>), ImmutableListParse(decimal.Parse));
parsers.Put(typeof(List<decimal>), ListParse(decimal.Parse));
parsers.Put(typeof(ISet<decimal>), ImmutableSetParse(decimal.Parse));
parsers.Put(typeof(HashSet<decimal>), SetParse(decimal.Parse));
parsers.Put(typeof(IEnumerable<decimal?>), NullableImmutableListParse(decimal.Parse));
parsers.Put(typeof(ICollection<decimal?>), NullableImmutableListParse(decimal.Parse));
parsers.Put(typeof(IList<decimal?>), NullableImmutableListParse(decimal.Parse));
parsers.Put(typeof(List<decimal?>), NullableListParse(decimal.Parse));
parsers.Put(typeof(ISet<decimal?>), NullableImmutableSetParse(decimal.Parse));
parsers.Put(typeof(HashSet<decimal?>), NullableSetParse(decimal.Parse));
parsers.Put(typeof(IEnumerable<DateTime>), ImmutableListParse(DateTime.Parse));
parsers.Put(typeof(ICollection<DateTime>), ImmutableListParse(DateTime.Parse));
parsers.Put(typeof(IList<DateTime>), ImmutableListParse(DateTime.Parse));
parsers.Put(typeof(List<DateTime>), ListParse(DateTime.Parse));
parsers.Put(typeof(ISet<DateTime>), ImmutableSetParse(DateTime.Parse));
parsers.Put(typeof(HashSet<DateTime>), SetParse(DateTime.Parse));
parsers.Put(typeof(IEnumerable<DateTime?>), NullableImmutableListParse(DateTime.Parse));
parsers.Put(typeof(ICollection<DateTime?>), NullableImmutableListParse(DateTime.Parse));
parsers.Put(typeof(IList<DateTime?>), NullableImmutableListParse(DateTime.Parse));
parsers.Put(typeof(List<DateTime?>), NullableListParse(DateTime.Parse));
parsers.Put(typeof(ISet<DateTime?>), NullableImmutableSetParse(DateTime.Parse));
parsers.Put(typeof(HashSet<DateTime?>), NullableSetParse(DateTime.Parse));
parsers.Put(typeof(IEnumerable<TimeSpan>), ImmutableListParse(TimeSpan.Parse));
parsers.Put(typeof(ICollection<TimeSpan>), ImmutableListParse(TimeSpan.Parse));
@ -295,6 +298,11 @@ namespace {{packageName}}.{{packageContext}}.Utils
};
}
private static Func<Parameter, object> NullableListParse<T>(Func<string, T> itemParser) where T: struct
{
return ListParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> ListParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -303,15 +311,15 @@ namespace {{packageName}}.{{packageContext}}.Utils
{
return new List<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToList();
return results;
return ParseCollection(parameter.Value, itemParser).ToList();
};
}
private static Func<Parameter, object> NullableImmutableListParse<T>(Func<string, T> itemParser) where T: struct
{
return ImmutableListParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> ImmutableListParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -320,15 +328,15 @@ namespace {{packageName}}.{{packageContext}}.Utils
{
return Lists.EmptyList<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToImmutableList();
return results;
return ParseCollection(parameter.Value, itemParser).ToImmutableList();
};
}
private static Func<Parameter, object> NullableSetParse<T>(Func<string, T> itemParser) where T: struct
{
return SetParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> SetParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -337,15 +345,15 @@ namespace {{packageName}}.{{packageContext}}.Utils
{
return new HashSet<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToSet();
return results;
return ParseCollection(parameter.Value, itemParser).ToSet();
};
}
private static Func<Parameter, object> NullableImmutableSetParse<T>(Func<string, T> itemParser) where T: struct
{
return ImmutableSetParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> ImmutableSetParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -354,12 +362,7 @@ namespace {{packageName}}.{{packageContext}}.Utils
{
return Sets.EmptySet<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToImmutableHashSet();
return results;
return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet();
};
}
@ -386,6 +389,32 @@ namespace {{packageName}}.{{packageContext}}.Utils
parameter.Name, parameter.Value, type));
}
private static IEnumerable<T> ParseCollection<T>(string value, Func<string, T> itemParser)
{
var results = value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser);
return results;
}
public static T? ToNullable<T>(this string s, Func<string, T> itemParser) where T : struct
{
T? result = new T?();
try
{
if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0)
{
result = itemParser(s);
}
}
catch (Exception e)
{
throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e);
}
return result;
}
private class Parameter
{
internal string Name { get; private set; }

View File

@ -4,7 +4,7 @@ description: Swagger API client
dependencies:
http: '>=0.11.1 <0.12.0'
dartson: "^0.2.4"
intl: "^0.12.4+2"
intl: ">=0.12.4"
dev_dependencies:
guinness: '^0.1.17'

View File

@ -54,7 +54,7 @@ No authorization required
<a name="testEndpointParameters"></a>
# **testEndpointParameters**
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password)
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -90,8 +90,9 @@ byte[] binary = B; // byte[] | None
LocalDate date = new LocalDate(); // LocalDate | None
DateTime dateTime = new DateTime(); // DateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password);
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEndpointParameters");
e.printStackTrace();
@ -115,6 +116,7 @@ Name | Type | Description | Notes
**date** | **LocalDate**| None | [optional]
**dateTime** | **DateTime**| None | [optional]
**password** | **String**| None | [optional]
**paramCallback** | **String**| None | [optional]
### Return type

View File

@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -22,6 +22,7 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.util.Collection;
import java.util.Collections;
@ -623,6 +624,8 @@ public class ApiClient {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.delete();
} else if ("PATCH".equals(method)) {
response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity);
} else {
throw new ApiException(500, "unknown method type " + method);
}

View File

@ -1,4 +1,4 @@
/**
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*

View File

@ -94,9 +94,10 @@ public class FakeApi {
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @param paramCallback None (optional)
* @throws ApiException if fails to make API call
*/
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password) throws ApiException {
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'number' is set
@ -155,6 +156,8 @@ if (dateTime != null)
localVarFormParams.put("dateTime", dateTime);
if (password != null)
localVarFormParams.put("password", password);
if (paramCallback != null)
localVarFormParams.put("callback", paramCallback);
final String[] localVarAccepts = {
"application/xml; charset=utf-8", "application/json; charset=utf-8"

View File

@ -34,12 +34,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* AdditionalPropertiesClass
*/
public class AdditionalPropertiesClass {
public class AdditionalPropertiesClass {
@JsonProperty("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>();
@ -111,6 +110,7 @@ public class AdditionalPropertiesClass {
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -132,5 +132,6 @@ public class AdditionalPropertiesClass {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
public class Animal {
public class Animal {
@JsonProperty("className")
private String className = null;
@ -98,6 +97,7 @@ public class Animal {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -119,5 +119,6 @@ public class Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -30,12 +30,11 @@ import io.swagger.client.model.Animal;
import java.util.ArrayList;
import java.util.List;
/**
* AnimalFarm
*/
public class AnimalFarm extends ArrayList<Animal> {
public class AnimalFarm extends ArrayList<Animal> {
@Override
public boolean equals(java.lang.Object o) {
@ -53,6 +52,7 @@ public class AnimalFarm extends ArrayList<Animal> {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -72,5 +72,6 @@ public class AnimalFarm extends ArrayList<Animal> {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -34,12 +34,11 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfArrayOfNumberOnly
*/
public class ArrayOfArrayOfNumberOnly {
public class ArrayOfArrayOfNumberOnly {
@JsonProperty("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
@ -84,6 +83,7 @@ public class ArrayOfArrayOfNumberOnly {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -104,5 +104,6 @@ public class ArrayOfArrayOfNumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -34,12 +34,11 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfNumberOnly
*/
public class ArrayOfNumberOnly {
public class ArrayOfNumberOnly {
@JsonProperty("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
@ -84,6 +83,7 @@ public class ArrayOfNumberOnly {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -104,5 +104,6 @@ public class ArrayOfNumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -34,12 +34,11 @@ import io.swagger.client.model.ReadOnlyFirst;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayTest
*/
public class ArrayTest {
public class ArrayTest {
@JsonProperty("array_of_string")
private List<String> arrayOfString = new ArrayList<String>();
@ -138,6 +137,7 @@ public class ArrayTest {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -160,5 +160,6 @@ public class ArrayTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -32,12 +32,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
/**
* Cat
*/
public class Cat extends Animal {
public class Cat extends Animal {
@JsonProperty("declawed")
private Boolean declawed = null;
@ -78,6 +77,7 @@ public class Cat extends Animal {
return Objects.hash(declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -98,5 +98,6 @@ public class Cat extends Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Category
*/
public class Category {
public class Category {
@JsonProperty("id")
private Long id = null;
@ -98,6 +97,7 @@ public class Category {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -119,5 +119,6 @@ public class Category {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Client
*/
public class Client {
public class Client {
@JsonProperty("client")
private String client = null;
@ -76,6 +75,7 @@ public class Client {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -96,5 +96,6 @@ public class Client {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -32,12 +32,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
/**
* Dog
*/
public class Dog extends Animal {
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
@ -78,6 +77,7 @@ public class Dog extends Animal {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -98,5 +98,6 @@ public class Dog extends Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -33,12 +33,11 @@ import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* EnumArrays
*/
public class EnumArrays {
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
@ -165,6 +164,7 @@ public class EnumArrays {
return Objects.hash(justSymbol, arrayEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -186,5 +186,6 @@ public class EnumArrays {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -27,7 +27,6 @@ package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonCreator;
/**

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* EnumTest
*/
public class EnumTest {
public class EnumTest {
/**
* Gets or Sets enumString
*/
@ -210,6 +209,7 @@ public class EnumTest {
return Objects.hash(enumString, enumInteger, enumNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -232,5 +232,6 @@ public class EnumTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -34,12 +34,11 @@ import java.math.BigDecimal;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
/**
* FormatTest
*/
public class FormatTest {
public class FormatTest {
@JsonProperty("integer")
private Integer integer = null;
@ -353,6 +352,7 @@ public class FormatTest {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -385,5 +385,6 @@ public class FormatTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* HasOnlyReadOnly
*/
public class HasOnlyReadOnly {
public class HasOnlyReadOnly {
@JsonProperty("bar")
private String bar = null;
@ -80,6 +79,7 @@ public class HasOnlyReadOnly {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -101,5 +101,6 @@ public class HasOnlyReadOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -34,12 +34,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MapTest
*/
public class MapTest {
public class MapTest {
@JsonProperty("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
@ -141,6 +140,7 @@ public class MapTest {
return Objects.hash(mapMapOfString, mapOfEnumString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -162,5 +162,6 @@ public class MapTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -36,12 +36,11 @@ import java.util.List;
import java.util.Map;
import org.joda.time.DateTime;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
public class MixedPropertiesAndAdditionalPropertiesClass {
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private String uuid = null;
@ -130,6 +129,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -152,5 +152,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,13 +31,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
*/
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
public class Model200Response {
@JsonProperty("name")
private Integer name = null;
@ -99,6 +98,7 @@ public class Model200Response {
return Objects.hash(name, propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -120,5 +120,6 @@ public class Model200Response {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ModelApiResponse
*/
public class ModelApiResponse {
public class ModelApiResponse {
@JsonProperty("code")
private Integer code = null;
@ -120,6 +119,7 @@ public class ModelApiResponse {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -142,5 +142,6 @@ public class ModelApiResponse {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,13 +31,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
*/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
public class ModelReturn {
@JsonProperty("return")
private Integer _return = null;
@ -77,6 +76,7 @@ public class ModelReturn {
return Objects.hash(_return);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -97,5 +97,6 @@ public class ModelReturn {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,13 +31,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name same as property name
*/
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
public class Name {
@JsonProperty("name")
private Integer name = null;
@ -125,6 +124,7 @@ public class Name {
return Objects.hash(name, snakeCase, property, _123Number);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -148,5 +148,6 @@ public class Name {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -32,12 +32,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* NumberOnly
*/
public class NumberOnly {
public class NumberOnly {
@JsonProperty("JustNumber")
private BigDecimal justNumber = null;
@ -77,6 +76,7 @@ public class NumberOnly {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -97,5 +97,6 @@ public class NumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -32,12 +32,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;
/**
* Order
*/
public class Order {
public class Order {
@JsonProperty("id")
private Long id = null;
@ -219,6 +218,7 @@ public class Order {
return Objects.hash(id, petId, quantity, shipDate, status, complete);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -244,5 +244,6 @@ public class Order {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -35,12 +35,11 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
/**
* Pet
*/
public class Pet {
public class Pet {
@JsonProperty("id")
private Long id = null;
@ -232,6 +231,7 @@ public class Pet {
return Objects.hash(id, category, name, photoUrls, tags, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -257,5 +257,6 @@ public class Pet {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ReadOnlyFirst
*/
public class ReadOnlyFirst {
public class ReadOnlyFirst {
@JsonProperty("bar")
private String bar = null;
@ -89,6 +88,7 @@ public class ReadOnlyFirst {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -110,5 +110,6 @@ public class ReadOnlyFirst {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* SpecialModelName
*/
public class SpecialModelName {
public class SpecialModelName {
@JsonProperty("$special[property.name]")
private Long specialPropertyName = null;
@ -76,6 +75,7 @@ public class SpecialModelName {
return Objects.hash(specialPropertyName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -96,5 +96,6 @@ public class SpecialModelName {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Tag
*/
public class Tag {
public class Tag {
@JsonProperty("id")
private Long id = null;
@ -98,6 +97,7 @@ public class Tag {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -119,5 +119,6 @@ public class Tag {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -31,12 +31,11 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* User
*/
public class User {
public class User {
@JsonProperty("id")
private Long id = null;
@ -230,6 +229,7 @@ public class User {
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -257,5 +257,6 @@ public class User {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;

View File

@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{7D50D142-14E1-4E99-842B-18D3AF159948}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{3B55ED13-A471-44B1-A8D5-C158723C0A0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -10,17 +10,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
<<<<<<< HEAD
{7D50D142-14E1-4E99-842B-18D3AF159948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D50D142-14E1-4E99-842B-18D3AF159948}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D50D142-14E1-4E99-842B-18D3AF159948}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D50D142-14E1-4E99-842B-18D3AF159948}.Release|Any CPU.Build.0 = Release|Any CPU
=======
{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Release|Any CPU.Build.0 = Release|Any CPU
>>>>>>> 92c474b2c235f4635e4be43a97c7941fec64dc82
{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -29,4 +22,4 @@ EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
EndGlobal

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7D50D142-14E1-4E99-842B-18D3AF159948}</ProjectGuid>
<ProjectGuid>{3B55ED13-A471-44B1-A8D5-C158723C0A0C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IO.Swagger.v2</RootNamespace>
@ -63,3 +63,4 @@
</ItemGroup>
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets"/>
</Project>

View File

@ -55,7 +55,7 @@ namespace IO.Swagger.v2.Modules
var status = Parameters.ValueOf<FindPetsByStatusStatusEnum?>(parameters, Context.Request, "status", ParameterType.Query);
Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'");
return service.FindPetsByStatus(Context, status);
return service.FindPetsByStatus(Context, status).ToArray();
};
Get["/pet/findByTags"] = parameters =>
@ -63,7 +63,7 @@ namespace IO.Swagger.v2.Modules
var tags = Parameters.ValueOf<List<string>>(parameters, Context.Request, "tags", ParameterType.Query);
Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'");
return service.FindPetsByTags(Context, tags);
return service.FindPetsByTags(Context, tags).ToArray();
};
Get["/pet/{petId}"] = parameters =>

View File

@ -166,19 +166,19 @@ namespace IO.Swagger.v2.Utils
parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime));
parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime));
parsers.Put(typeof(IEnumerable<string>), value => value);
parsers.Put(typeof(ICollection<string>), value => value);
parsers.Put(typeof(IList<string>), value => value);
parsers.Put(typeof(List<string>), value => value);
parsers.Put(typeof(ISet<string>), value => value);
parsers.Put(typeof(HashSet<string>), value => value);
parsers.Put(typeof(IEnumerable<string>), ImmutableListParse(value => value));
parsers.Put(typeof(ICollection<string>), ImmutableListParse(value => value));
parsers.Put(typeof(IList<string>), ImmutableListParse(value => value));
parsers.Put(typeof(List<string>), ListParse(value => value));
parsers.Put(typeof(ISet<string>), ImmutableListParse(value => value));
parsers.Put(typeof(HashSet<string>), SetParse(value => value));
parsers.Put(typeof(IEnumerable<bool>), ImmutableListParse(bool.Parse));
parsers.Put(typeof(ICollection<bool>), ImmutableListParse(bool.Parse));
parsers.Put(typeof(IList<bool>), ImmutableListParse(bool.Parse));
parsers.Put(typeof(List<bool>), ListParse(bool.Parse));
parsers.Put(typeof(ISet<bool>), ImmutableSetParse(bool.Parse));
parsers.Put(typeof(HashSet<bool>), SetParse(bool.Parse));
parsers.Put(typeof(IEnumerable<bool?>), NullableImmutableListParse(bool.Parse));
parsers.Put(typeof(ICollection<bool?>), NullableImmutableListParse(bool.Parse));
parsers.Put(typeof(IList<bool?>), NullableImmutableListParse(bool.Parse));
parsers.Put(typeof(List<bool?>), NullableListParse(bool.Parse));
parsers.Put(typeof(ISet<bool?>), NullableImmutableSetParse(bool.Parse));
parsers.Put(typeof(HashSet<bool?>), NullableSetParse(bool.Parse));
parsers.Put(typeof(IEnumerable<byte>), ImmutableListParse(byte.Parse));
parsers.Put(typeof(ICollection<byte>), ImmutableListParse(byte.Parse));
@ -186,6 +186,7 @@ namespace IO.Swagger.v2.Utils
parsers.Put(typeof(List<byte>), ListParse(byte.Parse));
parsers.Put(typeof(ISet<byte>), ImmutableSetParse(byte.Parse));
parsers.Put(typeof(HashSet<byte>), SetParse(byte.Parse));
parsers.Put(typeof(IEnumerable<sbyte>), ImmutableListParse(sbyte.Parse));
parsers.Put(typeof(ICollection<sbyte>), ImmutableListParse(sbyte.Parse));
parsers.Put(typeof(IList<sbyte>), ImmutableListParse(sbyte.Parse));
@ -199,6 +200,7 @@ namespace IO.Swagger.v2.Utils
parsers.Put(typeof(List<short>), ListParse(short.Parse));
parsers.Put(typeof(ISet<short>), ImmutableSetParse(short.Parse));
parsers.Put(typeof(HashSet<short>), SetParse(short.Parse));
parsers.Put(typeof(IEnumerable<ushort>), ImmutableListParse(ushort.Parse));
parsers.Put(typeof(ICollection<ushort>), ImmutableListParse(ushort.Parse));
parsers.Put(typeof(IList<ushort>), ImmutableListParse(ushort.Parse));
@ -206,12 +208,13 @@ namespace IO.Swagger.v2.Utils
parsers.Put(typeof(ISet<ushort>), ImmutableSetParse(ushort.Parse));
parsers.Put(typeof(HashSet<ushort>), SetParse(ushort.Parse));
parsers.Put(typeof(IEnumerable<int>), ImmutableListParse(int.Parse));
parsers.Put(typeof(ICollection<int>), ImmutableListParse(int.Parse));
parsers.Put(typeof(IList<int>), ImmutableListParse(int.Parse));
parsers.Put(typeof(List<int>), ListParse(int.Parse));
parsers.Put(typeof(ISet<int>), ImmutableSetParse(int.Parse));
parsers.Put(typeof(HashSet<int>), SetParse(int.Parse));
parsers.Put(typeof(IEnumerable<int?>), NullableImmutableListParse(int.Parse));
parsers.Put(typeof(ICollection<int?>), NullableImmutableListParse(int.Parse));
parsers.Put(typeof(IList<int?>), NullableImmutableListParse(int.Parse));
parsers.Put(typeof(List<int?>), NullableListParse(int.Parse));
parsers.Put(typeof(ISet<int?>), NullableImmutableSetParse(int.Parse));
parsers.Put(typeof(HashSet<int?>), NullableSetParse(int.Parse));
parsers.Put(typeof(IEnumerable<uint>), ImmutableListParse(uint.Parse));
parsers.Put(typeof(ICollection<uint>), ImmutableListParse(uint.Parse));
parsers.Put(typeof(IList<uint>), ImmutableListParse(uint.Parse));
@ -219,12 +222,13 @@ namespace IO.Swagger.v2.Utils
parsers.Put(typeof(ISet<uint>), ImmutableSetParse(uint.Parse));
parsers.Put(typeof(HashSet<uint>), SetParse(uint.Parse));
parsers.Put(typeof(IEnumerable<long>), ImmutableListParse(long.Parse));
parsers.Put(typeof(ICollection<long>), ImmutableListParse(long.Parse));
parsers.Put(typeof(IList<long>), ImmutableListParse(long.Parse));
parsers.Put(typeof(List<long>), ListParse(long.Parse));
parsers.Put(typeof(ISet<long>), ImmutableSetParse(long.Parse));
parsers.Put(typeof(HashSet<long>), SetParse(long.Parse));
parsers.Put(typeof(IEnumerable<long?>), NullableImmutableListParse(long.Parse));
parsers.Put(typeof(ICollection<long?>), NullableImmutableListParse(long.Parse));
parsers.Put(typeof(IList<long?>), NullableImmutableListParse(long.Parse));
parsers.Put(typeof(List<long?>), NullableListParse(long.Parse));
parsers.Put(typeof(ISet<long?>), NullableImmutableSetParse(long.Parse));
parsers.Put(typeof(HashSet<long?>), NullableSetParse(long.Parse));
parsers.Put(typeof(IEnumerable<ulong>), ImmutableListParse(ulong.Parse));
parsers.Put(typeof(ICollection<ulong>), ImmutableListParse(ulong.Parse));
parsers.Put(typeof(IList<ulong>), ImmutableListParse(ulong.Parse));
@ -232,34 +236,33 @@ namespace IO.Swagger.v2.Utils
parsers.Put(typeof(ISet<ulong>), ImmutableSetParse(ulong.Parse));
parsers.Put(typeof(HashSet<ulong>), SetParse(ulong.Parse));
parsers.Put(typeof(IEnumerable<float>), ImmutableListParse(float.Parse));
parsers.Put(typeof(ICollection<float>), ImmutableListParse(float.Parse));
parsers.Put(typeof(IList<float>), ImmutableListParse(float.Parse));
parsers.Put(typeof(List<float>), ListParse(float.Parse));
parsers.Put(typeof(ISet<float>), ImmutableSetParse(float.Parse));
parsers.Put(typeof(HashSet<float>), SetParse(float.Parse));
parsers.Put(typeof(IEnumerable<float?>), NullableImmutableListParse(float.Parse));
parsers.Put(typeof(ICollection<float?>), NullableImmutableListParse(float.Parse));
parsers.Put(typeof(IList<float?>), NullableImmutableListParse(float.Parse));
parsers.Put(typeof(List<float?>), NullableListParse(float.Parse));
parsers.Put(typeof(ISet<float?>), NullableImmutableSetParse(float.Parse));
parsers.Put(typeof(HashSet<float?>), NullableSetParse(float.Parse));
parsers.Put(typeof(IEnumerable<double>), ImmutableListParse(double.Parse));
parsers.Put(typeof(ICollection<double>), ImmutableListParse(double.Parse));
parsers.Put(typeof(IList<double>), ImmutableListParse(double.Parse));
parsers.Put(typeof(List<double>), ListParse(double.Parse));
parsers.Put(typeof(ISet<double>), ImmutableSetParse(double.Parse));
parsers.Put(typeof(HashSet<double>), SetParse(double.Parse));
parsers.Put(typeof(IEnumerable<double?>), NullableImmutableListParse(double.Parse));
parsers.Put(typeof(ICollection<double?>), NullableImmutableListParse(double.Parse));
parsers.Put(typeof(IList<double?>), NullableImmutableListParse(double.Parse));
parsers.Put(typeof(List<double?>), NullableListParse(double.Parse));
parsers.Put(typeof(ISet<double?>), NullableImmutableSetParse(double.Parse));
parsers.Put(typeof(HashSet<double?>), NullableSetParse(double.Parse));
parsers.Put(typeof(IEnumerable<decimal>), ImmutableListParse(decimal.Parse));
parsers.Put(typeof(ICollection<decimal>), ImmutableListParse(decimal.Parse));
parsers.Put(typeof(IList<decimal>), ImmutableListParse(decimal.Parse));
parsers.Put(typeof(List<decimal>), ListParse(decimal.Parse));
parsers.Put(typeof(ISet<decimal>), ImmutableSetParse(decimal.Parse));
parsers.Put(typeof(HashSet<decimal>), SetParse(decimal.Parse));
parsers.Put(typeof(IEnumerable<decimal?>), NullableImmutableListParse(decimal.Parse));
parsers.Put(typeof(ICollection<decimal?>), NullableImmutableListParse(decimal.Parse));
parsers.Put(typeof(IList<decimal?>), NullableImmutableListParse(decimal.Parse));
parsers.Put(typeof(List<decimal?>), NullableListParse(decimal.Parse));
parsers.Put(typeof(ISet<decimal?>), NullableImmutableSetParse(decimal.Parse));
parsers.Put(typeof(HashSet<decimal?>), NullableSetParse(decimal.Parse));
parsers.Put(typeof(IEnumerable<DateTime>), ImmutableListParse(DateTime.Parse));
parsers.Put(typeof(ICollection<DateTime>), ImmutableListParse(DateTime.Parse));
parsers.Put(typeof(IList<DateTime>), ImmutableListParse(DateTime.Parse));
parsers.Put(typeof(List<DateTime>), ListParse(DateTime.Parse));
parsers.Put(typeof(ISet<DateTime>), ImmutableSetParse(DateTime.Parse));
parsers.Put(typeof(HashSet<DateTime>), SetParse(DateTime.Parse));
parsers.Put(typeof(IEnumerable<DateTime?>), NullableImmutableListParse(DateTime.Parse));
parsers.Put(typeof(ICollection<DateTime?>), NullableImmutableListParse(DateTime.Parse));
parsers.Put(typeof(IList<DateTime?>), NullableImmutableListParse(DateTime.Parse));
parsers.Put(typeof(List<DateTime?>), NullableListParse(DateTime.Parse));
parsers.Put(typeof(ISet<DateTime?>), NullableImmutableSetParse(DateTime.Parse));
parsers.Put(typeof(HashSet<DateTime?>), NullableSetParse(DateTime.Parse));
parsers.Put(typeof(IEnumerable<TimeSpan>), ImmutableListParse(TimeSpan.Parse));
parsers.Put(typeof(ICollection<TimeSpan>), ImmutableListParse(TimeSpan.Parse));
@ -295,6 +298,11 @@ namespace IO.Swagger.v2.Utils
};
}
private static Func<Parameter, object> NullableListParse<T>(Func<string, T> itemParser) where T: struct
{
return ListParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> ListParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -303,15 +311,15 @@ namespace IO.Swagger.v2.Utils
{
return new List<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToList();
return results;
return ParseCollection(parameter.Value, itemParser).ToList();
};
}
private static Func<Parameter, object> NullableImmutableListParse<T>(Func<string, T> itemParser) where T: struct
{
return ImmutableListParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> ImmutableListParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -320,15 +328,15 @@ namespace IO.Swagger.v2.Utils
{
return Lists.EmptyList<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToImmutableList();
return results;
return ParseCollection(parameter.Value, itemParser).ToImmutableList();
};
}
private static Func<Parameter, object> NullableSetParse<T>(Func<string, T> itemParser) where T: struct
{
return SetParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> SetParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -337,15 +345,15 @@ namespace IO.Swagger.v2.Utils
{
return new HashSet<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToSet();
return results;
return ParseCollection(parameter.Value, itemParser).ToSet();
};
}
private static Func<Parameter, object> NullableImmutableSetParse<T>(Func<string, T> itemParser) where T: struct
{
return ImmutableSetParse(it => it.ToNullable(itemParser));
}
private static Func<Parameter, object> ImmutableSetParse<T>(Func<string, T> itemParser)
{
return parameter =>
@ -354,12 +362,7 @@ namespace IO.Swagger.v2.Utils
{
return Sets.EmptySet<T>();
}
var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser)
.ToImmutableHashSet();
return results;
return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet();
};
}
@ -386,6 +389,32 @@ namespace IO.Swagger.v2.Utils
parameter.Name, parameter.Value, type));
}
private static IEnumerable<T> ParseCollection<T>(string value, Func<string, T> itemParser)
{
var results = value.Split(new[] { ',' }, StringSplitOptions.None)
.Where(it => it != null)
.Select(it => it.Trim())
.Select(itemParser);
return results;
}
public static T? ToNullable<T>(this string s, Func<string, T> itemParser) where T : struct
{
T? result = new T?();
try
{
if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0)
{
result = itemParser(s);
}
}
catch (Exception e)
{
throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e);
}
return result;
}
private class Parameter
{
internal string Name { get; private set; }

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Client;
import java.time.OffsetDateTime;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.math.BigDecimal;
import io.swagger.annotations.*;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;
import org.springframework.http.HttpStatus;

View File

@ -17,6 +17,11 @@ public class HasOnlyReadOnly {
@JsonProperty("foo")
private String foo = null;
public HasOnlyReadOnly bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
@ -26,6 +31,15 @@ public class HasOnlyReadOnly {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
public HasOnlyReadOnly foo(String foo) {
this.foo = foo;
return this;
}
/**
* Get foo
* @return foo
@ -35,6 +49,10 @@ public class HasOnlyReadOnly {
return foo;
}
public void setFoo(String foo) {
this.foo = foo;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@ -42,6 +42,11 @@ public class Name {
this.name = name;
}
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
/**
* Get snakeCase
* @return snakeCase
@ -51,6 +56,10 @@ public class Name {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
public Name property(String property) {
this.property = property;
return this;
@ -69,6 +78,11 @@ public class Name {
this.property = property;
}
public Name _123Number(Integer _123Number) {
this._123Number = _123Number;
return this;
}
/**
* Get _123Number
* @return _123Number
@ -78,6 +92,10 @@ public class Name {
return _123Number;
}
public void set123Number(Integer _123Number) {
this._123Number = _123Number;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@ -17,6 +17,11 @@ public class ReadOnlyFirst {
@JsonProperty("baz")
private String baz = null;
public ReadOnlyFirst bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
@ -26,6 +31,10 @@ public class ReadOnlyFirst {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;

View File

@ -2,8 +2,8 @@ package io.swagger.api;
import io.swagger.model.Client;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;

View File

@ -2,8 +2,8 @@ package io.swagger.api;
import io.swagger.model.Client;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import io.swagger.annotations.*;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;

View File

@ -17,6 +17,11 @@ public class HasOnlyReadOnly {
@JsonProperty("foo")
private String foo = null;
public HasOnlyReadOnly bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
@ -26,6 +31,15 @@ public class HasOnlyReadOnly {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
public HasOnlyReadOnly foo(String foo) {
this.foo = foo;
return this;
}
/**
* Get foo
* @return foo
@ -35,6 +49,10 @@ public class HasOnlyReadOnly {
return foo;
}
public void setFoo(String foo) {
this.foo = foo;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@ -42,6 +42,11 @@ public class Name {
this.name = name;
}
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
/**
* Get snakeCase
* @return snakeCase
@ -51,6 +56,10 @@ public class Name {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
public Name property(String property) {
this.property = property;
return this;
@ -69,6 +78,11 @@ public class Name {
this.property = property;
}
public Name _123Number(Integer _123Number) {
this._123Number = _123Number;
return this;
}
/**
* Get _123Number
* @return _123Number
@ -78,6 +92,10 @@ public class Name {
return _123Number;
}
public void set123Number(Integer _123Number) {
this._123Number = _123Number;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@ -17,6 +17,11 @@ public class ReadOnlyFirst {
@JsonProperty("baz")
private String baz = null;
public ReadOnlyFirst bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
@ -26,6 +31,10 @@ public class ReadOnlyFirst {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;

View File

@ -2,8 +2,8 @@ package io.swagger.api;
import io.swagger.model.Client;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;

View File

@ -2,8 +2,8 @@ package io.swagger.api;
import io.swagger.model.Client;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import io.swagger.annotations.*;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;
import org.springframework.http.ResponseEntity;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.annotations.*;

View File

@ -17,6 +17,11 @@ public class HasOnlyReadOnly {
@JsonProperty("foo")
private String foo = null;
public HasOnlyReadOnly bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
@ -26,6 +31,15 @@ public class HasOnlyReadOnly {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
public HasOnlyReadOnly foo(String foo) {
this.foo = foo;
return this;
}
/**
* Get foo
* @return foo
@ -35,6 +49,10 @@ public class HasOnlyReadOnly {
return foo;
}
public void setFoo(String foo) {
this.foo = foo;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@ -42,6 +42,11 @@ public class Name {
this.name = name;
}
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
/**
* Get snakeCase
* @return snakeCase
@ -51,6 +56,10 @@ public class Name {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
public Name property(String property) {
this.property = property;
return this;
@ -69,6 +78,11 @@ public class Name {
this.property = property;
}
public Name _123Number(Integer _123Number) {
this._123Number = _123Number;
return this;
}
/**
* Get _123Number
* @return _123Number
@ -78,6 +92,10 @@ public class Name {
return _123Number;
}
public void set123Number(Integer _123Number) {
this._123Number = _123Number;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@ -17,6 +17,11 @@ public class ReadOnlyFirst {
@JsonProperty("baz")
private String baz = null;
public ReadOnlyFirst bar(String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
@ -26,6 +31,10 @@ public class ReadOnlyFirst {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;