Merge branch 'bbdouglas-sync_samples'

This commit is contained in:
wing328
2017-05-16 17:09:32 +08:00
246 changed files with 5863 additions and 2076 deletions

View File

@@ -28,9 +28,9 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
echo "Typescript Petstore API client (default)"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
java $JAVA_OPTS -jar $executable $ags
echo "Typescript Petstore API client (npm setting)"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -416,7 +416,6 @@ namespace IO.Swagger.Api
return new ApiResponse<ModelClient>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
}
/// <summary>
@@ -492,7 +491,6 @@ namespace IO.Swagger.Api
return new ApiResponse<ModelClient>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ModelClient) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient)));
}
/// <summary>
@@ -570,7 +568,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml; charset=utf-8",
"application/xml; charset=utf-8",
"application/json; charset=utf-8"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -613,7 +611,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -695,7 +692,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml; charset=utf-8",
"application/xml; charset=utf-8",
"application/json; charset=utf-8"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -737,7 +734,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -822,7 +818,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -908,7 +903,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);

View File

@@ -534,7 +534,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -570,7 +570,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -617,7 +616,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -653,7 +652,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -699,7 +697,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -729,7 +727,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -776,7 +773,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -806,7 +803,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -851,7 +847,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -883,7 +879,6 @@ namespace IO.Swagger.Api
return new ApiResponse<List<Pet>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
}
/// <summary>
@@ -926,7 +921,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -958,7 +953,6 @@ namespace IO.Swagger.Api
return new ApiResponse<List<Pet>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
}
/// <summary>
@@ -1000,7 +994,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1032,7 +1026,6 @@ namespace IO.Swagger.Api
return new ApiResponse<List<Pet>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
}
/// <summary>
@@ -1075,7 +1068,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1107,7 +1100,6 @@ namespace IO.Swagger.Api
return new ApiResponse<List<Pet>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List<Pet>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
}
/// <summary>
@@ -1149,7 +1141,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1181,7 +1173,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Pet>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet)));
}
/// <summary>
@@ -1224,7 +1215,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1255,7 +1246,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Pet>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet)));
}
/// <summary>
@@ -1298,7 +1288,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1334,7 +1324,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1381,7 +1370,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1417,7 +1406,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1466,7 +1454,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1497,7 +1485,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1547,7 +1534,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1578,7 +1565,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1661,7 +1647,6 @@ namespace IO.Swagger.Api
return new ApiResponse<ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
}
/// <summary>
@@ -1742,7 +1727,6 @@ namespace IO.Swagger.Api
return new ApiResponse<ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ApiResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
}
}

View File

@@ -340,7 +340,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -363,7 +363,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -408,7 +407,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -431,7 +430,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -501,7 +499,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
}
/// <summary>
@@ -568,7 +565,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
}
/// <summary>
@@ -610,7 +606,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -636,7 +632,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Order>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
}
/// <summary>
@@ -679,7 +674,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -705,7 +700,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Order>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
}
/// <summary>
@@ -747,7 +741,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -780,7 +774,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Order>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
}
/// <summary>
@@ -823,7 +816,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -856,7 +849,6 @@ namespace IO.Swagger.Api
return new ApiResponse<Order>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
}
}

View File

@@ -516,7 +516,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -546,7 +546,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -591,7 +590,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -621,7 +620,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -665,7 +663,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -695,7 +693,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -740,7 +737,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -770,7 +767,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -814,7 +810,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -844,7 +840,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -889,7 +884,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -919,7 +914,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -963,7 +957,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -986,7 +980,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1031,7 +1024,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1054,7 +1047,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1099,7 +1091,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1125,7 +1117,6 @@ namespace IO.Swagger.Api
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
@@ -1168,7 +1159,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1194,7 +1185,6 @@ namespace IO.Swagger.Api
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
@@ -1241,7 +1231,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1268,7 +1258,6 @@ namespace IO.Swagger.Api
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
@@ -1316,7 +1305,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1343,7 +1332,6 @@ namespace IO.Swagger.Api
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
@@ -1379,7 +1367,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1401,7 +1389,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1441,7 +1428,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1463,7 +1450,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1512,7 +1498,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1543,7 +1529,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
@@ -1593,7 +1578,7 @@ namespace IO.Swagger.Api
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml",
"application/xml",
"application/json"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
@@ -1624,7 +1609,6 @@ namespace IO.Swagger.Api
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);

View File

@@ -115,6 +115,8 @@ namespace IO.Swagger.Client
String contentType)
{
var request = new RestRequest(path, method);
// disable ResetSharp.Portable built-in serialization
request.Serializer = null;
// add path parameter, if any
foreach(var param in pathParams)
@@ -142,11 +144,11 @@ namespace IO.Swagger.Client
{
if (postBody.GetType() == typeof(String))
{
request.AddParameter("application/json", postBody, ParameterType.RequestBody);
request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = "application/json" });
}
else if (postBody.GetType() == typeof(byte[]))
{
request.AddParameter(contentType, postBody, ParameterType.RequestBody);
request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = contentType });
}
}

View File

@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<AssemblyName>IO.Swagger</AssemblyName>
<PackageId>IO.Swagger</PackageId>
<OutputType>Library</OutputType>
<Authors>Swagger</Authors>
<Company>Swagger</Company>
<AssemblyTitle>Swagger Library</AssemblyTitle>
<Description>A library generated from a Swagger doc</Description>
<Copyright>No Copyright</Copyright>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<RootNamespace>IO.Swagger</RootNamespace>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FubarCoder.RestSharp.Portable.Core" Version="4.0.7" />
<PackageReference Include="FubarCoder.RestSharp.Portable.HttpClient" Version="4.0.7" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<AssemblyName>IO.Swagger</AssemblyName>
<PackageId>IO.Swagger</PackageId>
<OutputType>Library</OutputType>
<Authors>Swagger</Authors>
<Company>Swagger</Company>
<AssemblyTitle>Swagger Library</AssemblyTitle>
<Description>A library generated from a Swagger doc</Description>
<Copyright>No Copyright</Copyright>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<RootNamespace>IO.Swagger</RootNamespace>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FubarCoder.RestSharp.Portable.Core" Version="4.0.7" />
<PackageReference Include="FubarCoder.RestSharp.Portable.HttpClient" Version="4.0.7" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
</Project>

View File

@@ -43,10 +43,8 @@ Contact: apiteam@swagger.io
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="Api\**\*.cs"/>
<Compile Include="Client\**\*.cs"/>
<Compile Include="Model\**\*.cs"/>
<Compile Include="Properties\**\*.cs"/>
<Compile Include="**\*.cs"
Exclude="obj\**" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

View File

@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
@@ -21,76 +21,76 @@ repositories {
if(hasProperty('target') && target == 'android') {
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
dependencies {
provided 'javax.annotation:jsr250-api:1.0'
}
}
dependencies {
provided 'javax.annotation:jsr250-api:1.0'
}
}
afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}
afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
artifacts {
archives sourcesJar
}
} else {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'maven'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
install {
repositories.mavenInstaller {
pom.artifactId = 'swagger-petstore-retrofit2-rx2'
}
}
install {
repositories.mavenInstaller {
pom.artifactId = 'swagger-petstore-retrofit2-rx2'
}
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
}
ext {

View File

@@ -1,6 +1,6 @@
# SwaggerClient
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
@@ -41,6 +41,7 @@ Import the following:
#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGDefaultConfiguration.h>
// load models
#import <SwaggerClient/SWGApiResponse.h>
#import <SwaggerClient/SWGCategory.h>
#import <SwaggerClient/SWGOrder.h>
#import <SwaggerClient/SWGPet.h>
@@ -69,7 +70,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
@@ -113,6 +114,7 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [SWGApiResponse](docs/SWGApiResponse.md)
- [SWGCategory](docs/SWGCategory.md)
- [SWGOrder](docs/SWGOrder.md)
- [SWGPet](docs/SWGPet.md)
@@ -141,6 +143,6 @@ Class | Method | HTTP request | Description
## Author
apiteam@wordnik.com
apiteam@swagger.io

View File

@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.summary = "Swagger Petstore"
s.description = <<-DESC
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
DESC
s.platform = :ios, '7.0'

View File

@@ -1,13 +1,14 @@
#import <Foundation/Foundation.h>
#import "SWGApiResponse.h"
#import "SWGPet.h"
#import "SWGApi.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -26,7 +27,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Add a new pet to the store
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// code:405 message:"Invalid input"
///
@@ -52,7 +53,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
///
/// @param status Status values that need to be considered for filter (optional) (default to available)
/// @param status Status values that need to be considered for filter
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid status value"
@@ -65,7 +66,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
/// @param tags Tags to filter by (optional)
/// @param tags Tags to filter by
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid tag value"
@@ -76,9 +77,9 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Find pet by ID
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// Returns a single pet
///
/// @param petId ID of pet that needs to be fetched
/// @param petId ID of pet to return
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid ID supplied",
@@ -92,7 +93,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Update an existing pet
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
@@ -113,7 +114,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// code:405 message:"Invalid input"
///
/// @return
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler;
@@ -126,13 +127,13 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// @param additionalMetadata Additional data to pass to server (optional)
/// @param file file to upload (optional)
///
/// code:0 message:"successful operation"
/// code:200 message:"successful operation"
///
/// @return
/// @return SWGApiResponse*
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(NSError* error)) handler;
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler;

View File

@@ -1,6 +1,7 @@
#import "SWGPetApi.h"
#import "SWGQueryParamCollection.h"
#import "SWGApiClient.h"
#import "SWGApiResponse.h"
#import "SWGPet.h"
@@ -52,12 +53,23 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Add a new pet to the store
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// @returns void
///
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -66,7 +78,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -141,7 +153,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
headerParams[@"api_key"] = apiKey;
}
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -181,25 +193,36 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
/// @param status Status values that need to be considered for filter (optional, default to available)
/// @param status Status values that need to be considered for filter
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray<NSString*>*) status
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'status' is set
if (status == nil) {
NSParameterAssert(status);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"status"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (status != nil) {
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"];
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -239,25 +262,36 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// @param tags Tags to filter by (optional)
/// @param tags Tags to filter by
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray<NSString*>*) tags
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'tags' is set
if (tags == nil) {
NSParameterAssert(tags);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"tags"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (tags != nil) {
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"];
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -296,8 +330,8 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Find pet by ID
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// @param petId ID of pet that needs to be fetched
/// Returns a single pet
/// @param petId ID of pet to return
///
/// @returns SWGPet*
///
@@ -325,7 +359,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -337,7 +371,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"petstore_auth", @"api_key"];
NSArray *authSettings = @[@"api_key"];
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
@@ -365,12 +399,23 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Update an existing pet
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -379,7 +424,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -428,7 +473,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler {
@@ -454,7 +499,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -506,19 +551,19 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @param file file to upload (optional)
///
/// @returns void
/// @returns SWGApiResponse*
///
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(NSError* error)) handler {
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler {
// verify the required parameter 'petId' is set
if (petId == nil) {
NSParameterAssert(petId);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
handler(nil, error);
}
return nil;
}
@@ -534,7 +579,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -567,10 +612,10 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
authSettings: authSettings
requestContentType: requestContentType
responseContentType: responseContentType
responseType: nil
responseType: @"SWGApiResponse*"
completionBlock: ^(id data, NSError *error) {
if(handler) {
handler(error);
handler((SWGApiResponse*)data, error);
}
}];
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -57,14 +57,14 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode;
/// code:404 message:"Order not found"
///
/// @return SWGOrder*
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
/// Place an order for a pet
///
///
/// @param body order placed for purchasing the pet (optional)
/// @param body order placed for purchasing the pet
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"

View File

@@ -80,7 +80,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -132,7 +132,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -176,7 +176,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'orderId' is set
if (orderId == nil) {
@@ -200,7 +200,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -240,12 +240,23 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// Place an order for a pet
///
/// @param body order placed for purchasing the pet (optional)
/// @param body order placed for purchasing the pet
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGStoreApiErrorDomain code:kSWGStoreApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -254,7 +265,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -26,7 +26,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Create user
/// This can only be done by the logged in user.
///
/// @param body Created user object (optional)
/// @param body Created user object
///
/// code:0 message:"successful operation"
///
@@ -38,7 +38,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// code:0 message:"successful operation"
///
@@ -50,7 +50,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// code:0 message:"successful operation"
///
@@ -89,8 +89,8 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Logs user into the system
///
///
/// @param username The user name for login (optional)
/// @param password The password for login in clear text (optional)
/// @param username The user name for login
/// @param password The password for login in clear text
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid username/password supplied"
@@ -116,7 +116,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// This can only be done by the logged in user.
///
/// @param username name that need to be deleted
/// @param body Updated user object (optional)
/// @param body Updated user object
///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"

View File

@@ -52,12 +52,23 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Create user
/// This can only be done by the logged in user.
/// @param body Created user object (optional)
/// @param body Created user object
///
/// @returns void
///
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -66,7 +77,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -107,12 +118,23 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -121,7 +143,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -162,12 +184,23 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -176,7 +209,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -245,7 +278,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -313,7 +346,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -353,15 +386,37 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Logs user into the system
///
/// @param username The user name for login (optional)
/// @param username The user name for login
///
/// @param password The password for login in clear text (optional)
/// @param password The password for login in clear text
///
/// @returns NSString*
///
-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username
password: (NSString*) password
completionHandler: (void (^)(NSString* output, NSError* error)) handler {
// verify the required parameter 'username' is set
if (username == nil) {
NSParameterAssert(username);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
// verify the required parameter 'password' is set
if (password == nil) {
NSParameterAssert(password);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"password"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -376,7 +431,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -428,7 +483,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -470,7 +525,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
/// This can only be done by the logged in user.
/// @param username name that need to be deleted
///
/// @param body Updated user object (optional)
/// @param body Updated user object
///
/// @returns void
///
@@ -488,6 +543,17 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
return nil;
}
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -499,7 +565,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -5,10 +5,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -0,0 +1,31 @@
#import <Foundation/Foundation.h>
#import "SWGObject.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
@protocol SWGApiResponse
@end
@interface SWGApiResponse : SWGObject
@property(nonatomic) NSNumber* code;
@property(nonatomic) NSString* type;
@property(nonatomic) NSString* message;
@end

View File

@@ -0,0 +1,34 @@
#import "SWGApiResponse.h"
@implementation SWGApiResponse
- (instancetype)init {
self = [super init];
if (self) {
// initialize property's default value, if any
}
return self;
}
/**
* Maps json key to property name.
* This method is used by `JSONModel`.
*/
+ (JSONKeyMapper *)keyMapper {
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"code": @"code", @"type": @"type", @"message": @"message" }];
}
/**
* Indicates whether the property with the given name is optional.
* If `propertyName` is optional, then return `YES`, otherwise return `NO`.
* This method is used by `JSONModel`.
*/
+ (BOOL)propertyIsOptional:(NSString *)propertyName {
NSArray *optionalProperties = @[@"code", @"type", @"message"];
return [optionalProperties containsObject:propertyName];
}
@end

View File

@@ -0,0 +1,36 @@
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
NS_ASSUME_NONNULL_BEGIN
@interface SWGApiResponseManagedObject : NSManagedObject
@property (nullable, nonatomic, retain) NSNumber* code;
@property (nullable, nonatomic, retain) NSString* type;
@property (nullable, nonatomic, retain) NSString* message;
@end
@interface SWGApiResponseManagedObject (GeneratedAccessors)
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,13 @@
#import "SWGApiResponseManagedObject.h"
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
@implementation SWGApiResponseManagedObject
@dynamic code;
@dynamic type;
@dynamic message;
@end

View File

@@ -0,0 +1,35 @@
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "SWGApiResponseManagedObject.h"
#import "SWGApiResponse.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
@interface SWGApiResponseManagedObjectBuilder : NSObject
-(SWGApiResponseManagedObject*)createNewSWGApiResponseManagedObjectInContext:(NSManagedObjectContext*)context;
-(SWGApiResponseManagedObject*)SWGApiResponseManagedObjectFromSWGApiResponse:(SWGApiResponse*)object context:(NSManagedObjectContext*)context;
-(void)updateSWGApiResponseManagedObject:(SWGApiResponseManagedObject*)object withSWGApiResponse:(SWGApiResponse*)object2;
-(SWGApiResponse*)SWGApiResponseFromSWGApiResponseManagedObject:(SWGApiResponseManagedObject*)obj;
-(void)updateSWGApiResponse:(SWGApiResponse*)object withSWGApiResponseManagedObject:(SWGApiResponseManagedObject*)object2;
@end

View File

@@ -0,0 +1,56 @@
#import "SWGApiResponseManagedObjectBuilder.h"
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
@implementation SWGApiResponseManagedObjectBuilder
-(instancetype)init {
self = [super init];
if (self != nil) {
}
return self;
}
-(SWGApiResponseManagedObject*)createNewSWGApiResponseManagedObjectInContext:(NSManagedObjectContext*)context {
SWGApiResponseManagedObject *managedObject = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([SWGApiResponseManagedObject class]) inManagedObjectContext:context];
return managedObject;
}
-(SWGApiResponseManagedObject*)SWGApiResponseManagedObjectFromSWGApiResponse:(SWGApiResponse*)object context:(NSManagedObjectContext*)context {
SWGApiResponseManagedObject* newSWGApiResponse = [self createNewSWGApiResponseManagedObjectInContext:context];
[self updateSWGApiResponseManagedObject:newSWGApiResponse withSWGApiResponse:object];
return newSWGApiResponse;
}
-(void)updateSWGApiResponseManagedObject:(SWGApiResponseManagedObject*)managedObject withSWGApiResponse:(SWGApiResponse*)object {
if(!managedObject || !object) {
return;
}
managedObject.code = [object.code copy];
managedObject.type = [object.type copy];
managedObject.message = [object.message copy];
}
-(SWGApiResponse*)SWGApiResponseFromSWGApiResponseManagedObject:(SWGApiResponseManagedObject*)obj {
if(!obj) {
return nil;
}
SWGApiResponse* newSWGApiResponse = [[SWGApiResponse alloc] init];
[self updateSWGApiResponse:newSWGApiResponse withSWGApiResponseManagedObject:obj];
return newSWGApiResponse;
}
-(void)updateSWGApiResponse:(SWGApiResponse*)newSWGApiResponse withSWGApiResponseManagedObject:(SWGApiResponseManagedObject*)obj {
newSWGApiResponse.code = [obj.code copy];
newSWGApiResponse.type = [obj.type copy];
newSWGApiResponse.message = [obj.message copy];
}
@end

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="9525" systemVersion="15D21" minimumToolsVersion="Xcode 7.0">
<entity name="SWGApiResponseManagedObject" representedClassName="SWGApiResponseManagedObject" syncable="YES">
<attribute name="code" optional="YES" attributeType="Integer 16" syncable="YES"/>
<attribute name="type" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="message" optional="YES" attributeType="String" syncable="YES"/>
</entity>
<entity name="SWGCategoryManagedObject" representedClassName="SWGCategoryManagedObject" syncable="YES">
<attribute name="_id" optional="YES" attributeType="Double" syncable="YES"/>
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -6,6 +6,7 @@
self = [super init];
if (self) {
// initialize property's default value, if any
self.complete = @0;
}
return self;

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -9,10 +9,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -7,10 +7,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -1,6 +1,6 @@
# SwaggerClient
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
This ObjC package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
@@ -41,6 +41,7 @@ Import the following:
#import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGDefaultConfiguration.h>
// load models
#import <SwaggerClient/SWGApiResponse.h>
#import <SwaggerClient/SWGCategory.h>
#import <SwaggerClient/SWGOrder.h>
#import <SwaggerClient/SWGPet.h>
@@ -69,7 +70,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
@@ -113,6 +114,7 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [SWGApiResponse](docs/SWGApiResponse.md)
- [SWGCategory](docs/SWGCategory.md)
- [SWGOrder](docs/SWGOrder.md)
- [SWGPet](docs/SWGPet.md)
@@ -141,6 +143,6 @@ Class | Method | HTTP request | Description
## Author
apiteam@wordnik.com
apiteam@swagger.io

View File

@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.summary = "Swagger Petstore"
s.description = <<-DESC
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
DESC
s.platform = :ios, '7.0'

View File

@@ -1,13 +1,14 @@
#import <Foundation/Foundation.h>
#import "SWGApiResponse.h"
#import "SWGPet.h"
#import "SWGApi.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -26,7 +27,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Add a new pet to the store
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// code:405 message:"Invalid input"
///
@@ -52,7 +53,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
///
/// @param status Status values that need to be considered for filter (optional) (default to available)
/// @param status Status values that need to be considered for filter
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid status value"
@@ -65,7 +66,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
/// @param tags Tags to filter by (optional)
/// @param tags Tags to filter by
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid tag value"
@@ -76,9 +77,9 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Find pet by ID
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// Returns a single pet
///
/// @param petId ID of pet that needs to be fetched
/// @param petId ID of pet to return
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid ID supplied",
@@ -92,7 +93,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Update an existing pet
///
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// code:400 message:"Invalid ID supplied",
/// code:404 message:"Pet not found",
@@ -113,7 +114,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// code:405 message:"Invalid input"
///
/// @return
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler;
@@ -126,13 +127,13 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// @param additionalMetadata Additional data to pass to server (optional)
/// @param file file to upload (optional)
///
/// code:0 message:"successful operation"
/// code:200 message:"successful operation"
///
/// @return
/// @return SWGApiResponse*
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(NSError* error)) handler;
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler;

View File

@@ -1,6 +1,7 @@
#import "SWGPetApi.h"
#import "SWGQueryParamCollection.h"
#import "SWGApiClient.h"
#import "SWGApiResponse.h"
#import "SWGPet.h"
@@ -52,12 +53,23 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Add a new pet to the store
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// @returns void
///
-(NSURLSessionTask*) addPetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -66,7 +78,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -141,7 +153,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
headerParams[@"api_key"] = apiKey;
}
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -181,25 +193,36 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by status
/// Multiple status values can be provided with comma separated strings
/// @param status Status values that need to be considered for filter (optional, default to available)
/// @param status Status values that need to be considered for filter
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByStatusWithStatus: (NSArray<NSString*>*) status
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'status' is set
if (status == nil) {
NSParameterAssert(status);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"status"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (status != nil) {
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"multi"];
queryParams[@"status"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: status format: @"csv"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -239,25 +262,36 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by tags
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// @param tags Tags to filter by (optional)
/// @param tags Tags to filter by
///
/// @returns NSArray<SWGPet>*
///
-(NSURLSessionTask*) findPetsByTagsWithTags: (NSArray<NSString*>*) tags
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error)) handler {
// verify the required parameter 'tags' is set
if (tags == nil) {
NSParameterAssert(tags);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"tags"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init];
if (tags != nil) {
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"multi"];
queryParams[@"tags"] = [[SWGQueryParamCollection alloc] initWithValuesAndFormat: tags format: @"csv"];
}
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -296,8 +330,8 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Find pet by ID
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
/// @param petId ID of pet that needs to be fetched
/// Returns a single pet
/// @param petId ID of pet to return
///
/// @returns SWGPet*
///
@@ -325,7 +359,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -337,7 +371,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
// Authentication setting
NSArray *authSettings = @[@"petstore_auth", @"api_key"];
NSArray *authSettings = @[@"api_key"];
id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
@@ -365,12 +399,23 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Update an existing pet
///
/// @param body Pet object that needs to be added to the store (optional)
/// @param body Pet object that needs to be added to the store
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -379,7 +424,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -428,7 +473,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @returns void
///
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler {
@@ -454,7 +499,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -506,19 +551,19 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// @param file file to upload (optional)
///
/// @returns void
/// @returns SWGApiResponse*
///
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(NSError* error)) handler {
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler {
// verify the required parameter 'petId' is set
if (petId == nil) {
NSParameterAssert(petId);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"petId"] };
NSError* error = [NSError errorWithDomain:kSWGPetApiErrorDomain code:kSWGPetApiMissingParamErrorCode userInfo:userInfo];
handler(error);
handler(nil, error);
}
return nil;
}
@@ -534,7 +579,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -567,10 +612,10 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
authSettings: authSettings
requestContentType: requestContentType
responseContentType: responseContentType
responseType: nil
responseType: @"SWGApiResponse*"
completionBlock: ^(id data, NSError *error) {
if(handler) {
handler(error);
handler((SWGApiResponse*)data, error);
}
}];
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -57,14 +57,14 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode;
/// code:404 message:"Order not found"
///
/// @return SWGOrder*
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
/// Place an order for a pet
///
///
/// @param body order placed for purchasing the pet (optional)
/// @param body order placed for purchasing the pet
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid Order"

View File

@@ -80,7 +80,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -132,7 +132,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -176,7 +176,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'orderId' is set
if (orderId == nil) {
@@ -200,7 +200,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -240,12 +240,23 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
///
/// Place an order for a pet
///
/// @param body order placed for purchasing the pet (optional)
/// @param body order placed for purchasing the pet
///
/// @returns SWGOrder*
///
-(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGStoreApiErrorDomain code:kSWGStoreApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -254,7 +265,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -26,7 +26,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Create user
/// This can only be done by the logged in user.
///
/// @param body Created user object (optional)
/// @param body Created user object
///
/// code:0 message:"successful operation"
///
@@ -38,7 +38,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// code:0 message:"successful operation"
///
@@ -50,7 +50,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Creates list of users with given input array
///
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// code:0 message:"successful operation"
///
@@ -89,8 +89,8 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// Logs user into the system
///
///
/// @param username The user name for login (optional)
/// @param password The password for login in clear text (optional)
/// @param username The user name for login
/// @param password The password for login in clear text
///
/// code:200 message:"successful operation",
/// code:400 message:"Invalid username/password supplied"
@@ -116,7 +116,7 @@ extern NSInteger kSWGUserApiMissingParamErrorCode;
/// This can only be done by the logged in user.
///
/// @param username name that need to be deleted
/// @param body Updated user object (optional)
/// @param body Updated user object
///
/// code:400 message:"Invalid user supplied",
/// code:404 message:"User not found"

View File

@@ -52,12 +52,23 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Create user
/// This can only be done by the logged in user.
/// @param body Created user object (optional)
/// @param body Created user object
///
/// @returns void
///
-(NSURLSessionTask*) createUserWithBody: (SWGUser*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -66,7 +77,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -107,12 +118,23 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -121,7 +143,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -162,12 +184,23 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Creates list of users with given input array
///
/// @param body List of user object (optional)
/// @param body List of user object
///
/// @returns void
///
-(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray<SWGUser>*) body
completionHandler: (void (^)(NSError* error)) handler {
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -176,7 +209,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -245,7 +278,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -313,7 +346,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -353,15 +386,37 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
///
/// Logs user into the system
///
/// @param username The user name for login (optional)
/// @param username The user name for login
///
/// @param password The password for login in clear text (optional)
/// @param password The password for login in clear text
///
/// @returns NSString*
///
-(NSURLSessionTask*) loginUserWithUsername: (NSString*) username
password: (NSString*) password
completionHandler: (void (^)(NSString* output, NSError* error)) handler {
// verify the required parameter 'username' is set
if (username == nil) {
NSParameterAssert(username);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"username"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
// verify the required parameter 'password' is set
if (password == nil) {
NSParameterAssert(password);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"password"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(nil, error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -376,7 +431,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -428,7 +483,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}
@@ -470,7 +525,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
/// This can only be done by the logged in user.
/// @param username name that need to be deleted
///
/// @param body Updated user object (optional)
/// @param body Updated user object
///
/// @returns void
///
@@ -488,6 +543,17 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
return nil;
}
// verify the required parameter 'body' is set
if (body == nil) {
NSParameterAssert(body);
if(handler) {
NSDictionary * userInfo = @{NSLocalizedDescriptionKey : [NSString stringWithFormat:NSLocalizedString(@"Missing required parameter '%@'", nil),@"body"] };
NSError* error = [NSError errorWithDomain:kSWGUserApiErrorDomain code:kSWGUserApiMissingParamErrorCode userInfo:userInfo];
handler(error);
}
return nil;
}
NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"];
NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init];
@@ -499,7 +565,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513;
NSMutableDictionary* headerParams = [NSMutableDictionary dictionaryWithDictionary:self.apiClient.configuration.defaultHeaders];
[headerParams addEntriesFromDictionary:self.defaultHeaders];
// HTTP header `Accept`
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/json", @"application/xml"]];
NSString *acceptHeader = [self.apiClient.sanitizer selectHeaderAccept:@[@"application/xml", @"application/json"]];
if(acceptHeader.length > 0) {
headerParams[@"Accept"] = acceptHeader;
}

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -5,10 +5,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -4,10 +4,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -2,10 +2,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -0,0 +1,31 @@
#import <Foundation/Foundation.h>
#import "SWGObject.h"
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
@protocol SWGApiResponse
@end
@interface SWGApiResponse : SWGObject
@property(nonatomic) NSNumber* code;
@property(nonatomic) NSString* type;
@property(nonatomic) NSString* message;
@end

View File

@@ -0,0 +1,34 @@
#import "SWGApiResponse.h"
@implementation SWGApiResponse
- (instancetype)init {
self = [super init];
if (self) {
// initialize property's default value, if any
}
return self;
}
/**
* Maps json key to property name.
* This method is used by `JSONModel`.
*/
+ (JSONKeyMapper *)keyMapper {
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"code": @"code", @"type": @"type", @"message": @"message" }];
}
/**
* Indicates whether the property with the given name is optional.
* If `propertyName` is optional, then return `YES`, otherwise return `NO`.
* This method is used by `JSONModel`.
*/
+ (BOOL)propertyIsOptional:(NSString *)propertyName {
NSArray *optionalProperties = @[@"code", @"type", @"message"];
return [optionalProperties containsObject:propertyName];
}
@end

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -6,6 +6,7 @@
self = [super init];
if (self) {
// initialize property's default value, if any
self.complete = @0;
}
return self;

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -3,10 +3,10 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git

View File

@@ -0,0 +1,12 @@
# SWGApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **NSNumber*** | | [optional]
**type** | **NSString*** | | [optional]
**message** | **NSString*** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**quantity** | **NSNumber*** | | [optional]
**shipDate** | **NSDate*** | | [optional]
**status** | **NSString*** | Order Status | [optional]
**complete** | **NSNumber*** | | [optional]
**complete** | **NSNumber*** | | [optional] [default to @0]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -32,7 +32,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -49,7 +49,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](SWGPet*.md)| Pet object that needs to be added to the store | [optional]
**body** | [**SWGPet***](SWGPet*.md)| Pet object that needs to be added to the store |
### Return type
@@ -62,7 +62,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -118,7 +118,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -140,7 +140,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSArray<NSString*>* status = @[@"available"]; // Status values that need to be considered for filter (optional) (default to available)
NSArray<NSString*>* status = @[@"status_example"]; // Status values that need to be considered for filter
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -160,7 +160,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Status values that need to be considered for filter | [optional] [default to available]
**status** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Status values that need to be considered for filter |
### Return type
@@ -173,7 +173,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -195,7 +195,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSArray<NSString*>* tags = @[@"tags_example"]; // Tags to filter by (optional)
NSArray<NSString*>* tags = @[@"tags_example"]; // Tags to filter by
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -215,7 +215,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Tags to filter by | [optional]
**tags** | [**NSArray&lt;NSString*&gt;***](NSString*.md)| Tags to filter by |
### Return type
@@ -228,7 +228,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -240,22 +240,19 @@ Name | Type | Description | Notes
Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
Returns a single pet
### Example
```objc
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
NSNumber* petId = @789; // ID of pet that needs to be fetched
NSNumber* petId = @789; // ID of pet to return
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -275,7 +272,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **NSNumber***| ID of pet that needs to be fetched |
**petId** | **NSNumber***| ID of pet to return |
### Return type
@@ -283,12 +280,12 @@ Name | Type | Description | Notes
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -310,7 +307,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store
SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
@@ -327,7 +324,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](SWGPet*.md)| Pet object that needs to be added to the store | [optional]
**body** | [**SWGPet***](SWGPet*.md)| Pet object that needs to be added to the store |
### Return type
@@ -340,13 +337,13 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updatePetWithForm**
```objc
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSString*) petId
-(NSURLSessionTask*) updatePetWithFormWithPetId: (NSNumber*) petId
name: (NSString*) name
status: (NSString*) status
completionHandler: (void (^)(NSError* error)) handler;
@@ -364,7 +361,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* petId = @"petId_example"; // ID of pet that needs to be updated
NSNumber* petId = @789; // ID of pet that needs to be updated
NSString* name = @"name_example"; // Updated name of the pet (optional)
NSString* status = @"status_example"; // Updated status of the pet (optional)
@@ -385,7 +382,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **NSString***| ID of pet that needs to be updated |
**petId** | **NSNumber***| ID of pet that needs to be updated |
**name** | **NSString***| Updated name of the pet | [optional]
**status** | **NSString***| Updated status of the pet | [optional]
@@ -400,7 +397,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -409,7 +406,7 @@ void (empty response body)
-(NSURLSessionTask*) uploadFileWithPetId: (NSNumber*) petId
additionalMetadata: (NSString*) additionalMetadata
file: (NSURL*) file
completionHandler: (void (^)(NSError* error)) handler;
completionHandler: (void (^)(SWGApiResponse* output, NSError* error)) handler;
```
uploads an image
@@ -434,7 +431,10 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];
[apiInstance uploadFileWithPetId:petId
additionalMetadata:additionalMetadata
file:file
completionHandler: ^(NSError* error) {
completionHandler: ^(SWGApiResponse* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGPetApi->uploadFile: %@", error);
}
@@ -451,7 +451,7 @@ Name | Type | Description | Notes
### Return type
void (empty response body)
[**SWGApiResponse***](SWGApiResponse.md)
### Authorization
@@ -460,7 +460,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, application/xml
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -53,7 +53,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -106,13 +106,13 @@ This endpoint does not need any parameter.
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getOrderById**
```objc
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSString*) orderId
-(NSURLSessionTask*) getOrderByIdWithOrderId: (NSNumber*) orderId
completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler;
```
@@ -123,7 +123,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```objc
NSString* orderId = @"orderId_example"; // ID of pet that needs to be fetched
NSNumber* orderId = @789; // ID of pet that needs to be fetched
SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
@@ -143,7 +143,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **NSString***| ID of pet that needs to be fetched |
**orderId** | **NSNumber***| ID of pet that needs to be fetched |
### Return type
@@ -156,7 +156,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -173,7 +173,7 @@ Place an order for a pet
### Example
```objc
SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional)
SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet
SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
@@ -193,7 +193,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGOrder***](SWGOrder*.md)| order placed for purchasing the pet | [optional]
**body** | [**SWGOrder***](SWGOrder*.md)| order placed for purchasing the pet |
### Return type
@@ -206,7 +206,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -27,7 +27,7 @@ This can only be done by the logged in user.
### Example
```objc
SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional)
SWGUser* body = [[SWGUser alloc] init]; // Created user object
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGUser***](SWGUser*.md)| Created user object | [optional]
**body** | [**SWGUser***](SWGUser*.md)| Created user object |
### Return type
@@ -57,7 +57,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -74,7 +74,7 @@ Creates list of users with given input array
### Example
```objc
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object (optional)
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -91,7 +91,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object |
### Return type
@@ -104,7 +104,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -121,7 +121,7 @@ Creates list of users with given input array
### Example
```objc
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object (optional)
NSArray<SWGUser>* body = @[[[SWGUser alloc] init]]; // List of user object
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -138,7 +138,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object | [optional]
**body** | [**NSArray&lt;SWGUser&gt;***](SWGUser.md)| List of user object |
### Return type
@@ -151,7 +151,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -198,7 +198,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -248,7 +248,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -266,8 +266,8 @@ Logs user into the system
### Example
```objc
NSString* username = @"username_example"; // The user name for login (optional)
NSString* password = @"password_example"; // The password for login in clear text (optional)
NSString* username = @"username_example"; // The user name for login
NSString* password = @"password_example"; // The password for login in clear text
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -288,8 +288,8 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **NSString***| The user name for login | [optional]
**password** | **NSString***| The password for login in clear text | [optional]
**username** | **NSString***| The user name for login |
**password** | **NSString***| The password for login in clear text |
### Return type
@@ -302,7 +302,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -345,7 +345,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -364,7 +364,7 @@ This can only be done by the logged in user.
```objc
NSString* username = @"username_example"; // name that need to be deleted
SWGUser* body = [[SWGUser alloc] init]; // Updated user object (optional)
SWGUser* body = [[SWGUser alloc] init]; // Updated user object
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
@@ -383,7 +383,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **NSString***| name that need to be deleted |
**body** | [**SWGUser***](SWGUser*.md)| Updated user object | [optional]
**body** | [**SWGUser***](SWGUser*.md)| Updated user object |
### Return type
@@ -396,7 +396,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -248,12 +248,12 @@ public class PetAPI: APIBase {
Find pet by ID
- GET /pet/{petId}
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
- OAuth:
- type: oauth2
- name: petstore_auth
- API Key:
- type: apiKey api_key
- name: api_key
- OAuth:
- type: oauth2
- name: petstore_auth
- examples: [{contentType=application/json, example={
"photoUrls" : [ "aeiou" ],
"name" : "doggie",

View File

@@ -335,12 +335,12 @@ public class PetAPI: APIBase {
Find pet by ID
- GET /pet/{petId}
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
- OAuth:
- type: oauth2
- name: petstore_auth
- API Key:
- type: apiKey api_key
- name: api_key
- OAuth:
- type: oauth2
- name: petstore_auth
- examples: [{contentType=application/json, example={
"photoUrls" : [ "aeiou" ],
"name" : "doggie",

View File

@@ -345,12 +345,12 @@ public class PetAPI: APIBase {
Find pet by ID
- GET /pet/{petId}
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
- OAuth:
- type: oauth2
- name: petstore_auth
- API Key:
- type: apiKey api_key
- name: api_key
- OAuth:
- type: oauth2
- name: petstore_auth
- examples: [{contentType=application/json, example={
"photoUrls" : [ "aeiou" ],
"name" : "doggie",

View File

@@ -156,7 +156,6 @@ class Decoders {
// Decoder for AdditionalPropertiesClass
Decoders.addDecoder(clazz: AdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> AdditionalPropertiesClass in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? AdditionalPropertiesClass() : instance as! AdditionalPropertiesClass
result.mapProperty = Decoders.decodeOptional(clazz: Dictionary.self, source: sourceDictionary["map_property"] as AnyObject?)
@@ -176,7 +175,6 @@ class Decoders {
if let discriminator = sourceDictionary["className"] as? String, instance == nil && discriminator != "Animal" {
return Decoders.decode(clazz: Animal.self, discriminator: discriminator, source: source)
}
let result = instance == nil ? Animal() : instance as! Animal
result.className = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["className"] as AnyObject?)
@@ -203,7 +201,6 @@ class Decoders {
// Decoder for ApiResponse
Decoders.addDecoder(clazz: ApiResponse.self) { (source: AnyObject, instance: AnyObject?) -> ApiResponse in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? ApiResponse() : instance as! ApiResponse
result.code = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["code"] as AnyObject?)
@@ -220,7 +217,6 @@ class Decoders {
// Decoder for ArrayOfArrayOfNumberOnly
Decoders.addDecoder(clazz: ArrayOfArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> ArrayOfArrayOfNumberOnly in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? ArrayOfArrayOfNumberOnly() : instance as! ArrayOfArrayOfNumberOnly
result.arrayArrayNumber = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["ArrayArrayNumber"] as AnyObject?)
@@ -235,7 +231,6 @@ class Decoders {
// Decoder for ArrayOfNumberOnly
Decoders.addDecoder(clazz: ArrayOfNumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> ArrayOfNumberOnly in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? ArrayOfNumberOnly() : instance as! ArrayOfNumberOnly
result.arrayNumber = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["ArrayNumber"] as AnyObject?)
@@ -250,7 +245,6 @@ class Decoders {
// Decoder for ArrayTest
Decoders.addDecoder(clazz: ArrayTest.self) { (source: AnyObject, instance: AnyObject?) -> ArrayTest in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? ArrayTest() : instance as! ArrayTest
result.arrayOfString = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["array_of_string"] as AnyObject?)
@@ -267,7 +261,6 @@ class Decoders {
// Decoder for Capitalization
Decoders.addDecoder(clazz: Capitalization.self) { (source: AnyObject, instance: AnyObject?) -> Capitalization in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Capitalization() : instance as! Capitalization
result.smallCamel = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["smallCamel"] as AnyObject?)
@@ -287,7 +280,6 @@ class Decoders {
// Decoder for Cat
Decoders.addDecoder(clazz: Cat.self) { (source: AnyObject, instance: AnyObject?) -> Cat in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Cat() : instance as! Cat
if decoders["\(Animal.self)"] != nil {
_ = Decoders.decode(clazz: Animal.self, source: source, instance: result)
@@ -307,7 +299,6 @@ class Decoders {
// Decoder for Category
Decoders.addDecoder(clazz: Category.self) { (source: AnyObject, instance: AnyObject?) -> Category in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Category() : instance as! Category
result.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"] as AnyObject?)
@@ -323,7 +314,6 @@ class Decoders {
// Decoder for ClassModel
Decoders.addDecoder(clazz: ClassModel.self) { (source: AnyObject, instance: AnyObject?) -> ClassModel in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? ClassModel() : instance as! ClassModel
result._class = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["_class"] as AnyObject?)
@@ -338,7 +328,6 @@ class Decoders {
// Decoder for Client
Decoders.addDecoder(clazz: Client.self) { (source: AnyObject, instance: AnyObject?) -> Client in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Client() : instance as! Client
result.client = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["client"] as AnyObject?)
@@ -353,7 +342,6 @@ class Decoders {
// Decoder for Dog
Decoders.addDecoder(clazz: Dog.self) { (source: AnyObject, instance: AnyObject?) -> Dog in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Dog() : instance as! Dog
if decoders["\(Animal.self)"] != nil {
_ = Decoders.decode(clazz: Animal.self, source: source, instance: result)
@@ -373,7 +361,6 @@ class Decoders {
// Decoder for EnumArrays
Decoders.addDecoder(clazz: EnumArrays.self) { (source: AnyObject, instance: AnyObject?) -> EnumArrays in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? EnumArrays() : instance as! EnumArrays
if let justSymbol = sourceDictionary["just_symbol"] as? String {
@@ -410,7 +397,6 @@ class Decoders {
// Decoder for EnumTest
Decoders.addDecoder(clazz: EnumTest.self) { (source: AnyObject, instance: AnyObject?) -> EnumTest in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? EnumTest() : instance as! EnumTest
if let enumString = sourceDictionary["enum_string"] as? String {
@@ -437,7 +423,6 @@ class Decoders {
// Decoder for FormatTest
Decoders.addDecoder(clazz: FormatTest.self) { (source: AnyObject, instance: AnyObject?) -> FormatTest in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? FormatTest() : instance as! FormatTest
result.integer = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["integer"] as AnyObject?)
@@ -464,7 +449,6 @@ class Decoders {
// Decoder for HasOnlyReadOnly
Decoders.addDecoder(clazz: HasOnlyReadOnly.self) { (source: AnyObject, instance: AnyObject?) -> HasOnlyReadOnly in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? HasOnlyReadOnly() : instance as! HasOnlyReadOnly
result.bar = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["bar"] as AnyObject?)
@@ -480,7 +464,6 @@ class Decoders {
// Decoder for List
Decoders.addDecoder(clazz: List.self) { (source: AnyObject, instance: AnyObject?) -> List in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? List() : instance as! List
result._123List = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["123-list"] as AnyObject?)
@@ -495,7 +478,6 @@ class Decoders {
// Decoder for MapTest
Decoders.addDecoder(clazz: MapTest.self) { (source: AnyObject, instance: AnyObject?) -> MapTest in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? MapTest() : instance as! MapTest
result.mapMapOfString = Decoders.decodeOptional(clazz: Dictionary.self, source: sourceDictionary["map_map_of_string"] as AnyObject?)
@@ -513,7 +495,6 @@ class Decoders {
// Decoder for MixedPropertiesAndAdditionalPropertiesClass
Decoders.addDecoder(clazz: MixedPropertiesAndAdditionalPropertiesClass.self) { (source: AnyObject, instance: AnyObject?) -> MixedPropertiesAndAdditionalPropertiesClass in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? MixedPropertiesAndAdditionalPropertiesClass() : instance as! MixedPropertiesAndAdditionalPropertiesClass
result.uuid = Decoders.decodeOptional(clazz: UUID.self, source: sourceDictionary["uuid"] as AnyObject?)
@@ -530,7 +511,6 @@ class Decoders {
// Decoder for Model200Response
Decoders.addDecoder(clazz: Model200Response.self) { (source: AnyObject, instance: AnyObject?) -> Model200Response in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Model200Response() : instance as! Model200Response
result.name = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["name"] as AnyObject?)
@@ -546,7 +526,6 @@ class Decoders {
// Decoder for Name
Decoders.addDecoder(clazz: Name.self) { (source: AnyObject, instance: AnyObject?) -> Name in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Name() : instance as! Name
result.name = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["name"] as AnyObject?)
@@ -564,7 +543,6 @@ class Decoders {
// Decoder for NumberOnly
Decoders.addDecoder(clazz: NumberOnly.self) { (source: AnyObject, instance: AnyObject?) -> NumberOnly in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? NumberOnly() : instance as! NumberOnly
result.justNumber = Decoders.decodeOptional(clazz: Double.self, source: sourceDictionary["JustNumber"] as AnyObject?)
@@ -579,7 +557,6 @@ class Decoders {
// Decoder for Order
Decoders.addDecoder(clazz: Order.self) { (source: AnyObject, instance: AnyObject?) -> Order in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Order() : instance as! Order
result.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"] as AnyObject?)
@@ -617,7 +594,6 @@ class Decoders {
// Decoder for Pet
Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject, instance: AnyObject?) -> Pet in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Pet() : instance as! Pet
result.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"] as AnyObject?)
@@ -640,7 +616,6 @@ class Decoders {
// Decoder for ReadOnlyFirst
Decoders.addDecoder(clazz: ReadOnlyFirst.self) { (source: AnyObject, instance: AnyObject?) -> ReadOnlyFirst in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? ReadOnlyFirst() : instance as! ReadOnlyFirst
result.bar = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["bar"] as AnyObject?)
@@ -656,7 +631,6 @@ class Decoders {
// Decoder for Return
Decoders.addDecoder(clazz: Return.self) { (source: AnyObject, instance: AnyObject?) -> Return in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Return() : instance as! Return
result._return = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["return"] as AnyObject?)
@@ -671,7 +645,6 @@ class Decoders {
// Decoder for SpecialModelName
Decoders.addDecoder(clazz: SpecialModelName.self) { (source: AnyObject, instance: AnyObject?) -> SpecialModelName in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? SpecialModelName() : instance as! SpecialModelName
result.specialPropertyName = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["$special[property.name]"] as AnyObject?)
@@ -686,7 +659,6 @@ class Decoders {
// Decoder for Tag
Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject, instance: AnyObject?) -> Tag in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? Tag() : instance as! Tag
result.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"] as AnyObject?)
@@ -702,7 +674,6 @@ class Decoders {
// Decoder for User
Decoders.addDecoder(clazz: User.self) { (source: AnyObject, instance: AnyObject?) -> User in
let sourceDictionary = source as! [AnyHashable: Any]
let result = instance == nil ? User() : instance as! User
result.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"] as AnyObject?)
@@ -720,4 +691,4 @@ class Decoders {
static fileprivate func initialize() {
_ = Decoders.__once
}
}
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class AdditionalPropertiesClass: JSONEncodable {
public var mapProperty: [String:String]?
public var mapOfMapProperty: [String:[String:String]]?
@@ -19,6 +20,7 @@ open class AdditionalPropertiesClass: JSONEncodable {
var nillableDictionary = [String:Any?]()
nillableDictionary["map_property"] = self.mapProperty?.encodeToJSON()
nillableDictionary["map_of_map_property"] = self.mapOfMapProperty?.encodeToJSON()
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class Animal: JSONEncodable {
public var className: String?
public var color: String?
@@ -19,6 +20,7 @@ open class Animal: JSONEncodable {
var nillableDictionary = [String:Any?]()
nillableDictionary["className"] = self.className
nillableDictionary["color"] = self.color
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class ApiResponse: JSONEncodable {
public var code: Int32?
public var type: String?
public var message: String?
@@ -21,6 +22,7 @@ open class ApiResponse: JSONEncodable {
nillableDictionary["code"] = self.code?.encodeToJSON()
nillableDictionary["type"] = self.type
nillableDictionary["message"] = self.message
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class ArrayOfArrayOfNumberOnly: JSONEncodable {
public var arrayArrayNumber: [[Double]]?
public init() {}
@@ -17,6 +18,7 @@ open class ArrayOfArrayOfNumberOnly: JSONEncodable {
open func encodeToJSON() -> Any {
var nillableDictionary = [String:Any?]()
nillableDictionary["ArrayArrayNumber"] = self.arrayArrayNumber?.encodeToJSON()
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class ArrayOfNumberOnly: JSONEncodable {
public var arrayNumber: [Double]?
public init() {}
@@ -17,6 +18,7 @@ open class ArrayOfNumberOnly: JSONEncodable {
open func encodeToJSON() -> Any {
var nillableDictionary = [String:Any?]()
nillableDictionary["ArrayNumber"] = self.arrayNumber?.encodeToJSON()
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class ArrayTest: JSONEncodable {
public var arrayOfString: [String]?
public var arrayArrayOfInteger: [[Int64]]?
public var arrayArrayOfModel: [[ReadOnlyFirst]]?
@@ -21,6 +22,7 @@ open class ArrayTest: JSONEncodable {
nillableDictionary["array_of_string"] = self.arrayOfString?.encodeToJSON()
nillableDictionary["array_array_of_integer"] = self.arrayArrayOfInteger?.encodeToJSON()
nillableDictionary["array_array_of_model"] = self.arrayArrayOfModel?.encodeToJSON()
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class Capitalization: JSONEncodable {
public var smallCamel: String?
public var capitalCamel: String?
public var smallSnake: String?
@@ -28,6 +29,7 @@ open class Capitalization: JSONEncodable {
nillableDictionary["Capital_Snake"] = self.capitalSnake
nillableDictionary["SCA_ETH_Flow_Points"] = self.sCAETHFlowPoints
nillableDictionary["ATT_NAME"] = self.ATT_NAME
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class Cat: Animal {
public var declawed: Bool?
@@ -17,6 +18,7 @@ open class Cat: Animal {
override open func encodeToJSON() -> Any {
var nillableDictionary = super.encodeToJSON() as? [String:Any?] ?? [String:Any?]()
nillableDictionary["declawed"] = self.declawed
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class Category: JSONEncodable {
public var id: Int64?
public var name: String?
@@ -19,6 +20,7 @@ open class Category: JSONEncodable {
var nillableDictionary = [String:Any?]()
nillableDictionary["id"] = self.id?.encodeToJSON()
nillableDictionary["name"] = self.name
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -10,6 +10,7 @@ import Foundation
/** Model for testing model with \&quot;_class\&quot; property */
open class ClassModel: JSONEncodable {
public var _class: String?
public init() {}
@@ -18,6 +19,7 @@ open class ClassModel: JSONEncodable {
open func encodeToJSON() -> Any {
var nillableDictionary = [String:Any?]()
nillableDictionary["_class"] = self._class
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class Client: JSONEncodable {
public var client: String?
public init() {}
@@ -17,6 +18,7 @@ open class Client: JSONEncodable {
open func encodeToJSON() -> Any {
var nillableDictionary = [String:Any?]()
nillableDictionary["client"] = self.client
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class Dog: Animal {
public var breed: String?
@@ -17,6 +18,7 @@ open class Dog: Animal {
override open func encodeToJSON() -> Any {
var nillableDictionary = super.encodeToJSON() as? [String:Any?] ?? [String:Any?]()
nillableDictionary["breed"] = self.breed
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

View File

@@ -9,6 +9,7 @@ import Foundation
open class EnumArrays: JSONEncodable {
public enum JustSymbol: String {
case greaterThanOrEqualTo = ">="
case dollar = "$"
@@ -27,6 +28,7 @@ open class EnumArrays: JSONEncodable {
var nillableDictionary = [String:Any?]()
nillableDictionary["just_symbol"] = self.justSymbol?.rawValue
nillableDictionary["array_enum"] = self.arrayEnum?.map({$0.rawValue}).encodeToJSON()
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
return dictionary
}

Some files were not shown because too many files have changed in this diff Show More