mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 22:20:56 +00:00
Merge branch 'master' of github.com:swagger-api/swagger-codegen
This commit is contained in:
commit
deb526440c
@ -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);
|
||||
}
|
||||
|
@ -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}}
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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}}
|
||||
|
@ -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; }
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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: \" \\
|
||||
*
|
||||
|
@ -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"
|
||||
|
@ -34,7 +34,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Animal
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,6 @@ import io.swagger.client.model.Animal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* AnimalFarm
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayOfArrayOfNumberOnly
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayOfNumberOnly
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ import io.swagger.client.model.ReadOnlyFirst;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayTest
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
|
||||
/**
|
||||
* Cat
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Client
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
|
||||
/**
|
||||
* Dog
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,6 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* EnumArrays
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* EnumTest
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
|
||||
|
||||
/**
|
||||
* FormatTest
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* HasOnlyReadOnly
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* MapTest
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* ModelApiResponse
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ 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
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* NumberOnly
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,6 @@ import io.swagger.client.model.Tag;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Pet
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* SpecialModelName
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* Tag
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
@ -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 ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 =>
|
||||
|
@ -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; }
|
||||
|
@ -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.*;
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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.*;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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.*;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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.*;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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.*;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user