diff --git a/src/NSwag.Annotations/Properties/AssemblyInfo.cs b/src/NSwag.Annotations/Properties/AssemblyInfo.cs index 2034845014..d5d1bd2336 100644 --- a/src/NSwag.Annotations/Properties/AssemblyInfo.cs +++ b/src/NSwag.Annotations/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.Annotations")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.31.*")] +[assembly: AssemblyVersion("2.32.*")] diff --git a/src/NSwag.AssemblyLoader/NSwag.AssemblyLoader.csproj b/src/NSwag.AssemblyLoader/NSwag.AssemblyLoader.csproj index 7e68166e84..212e4b7f8b 100644 --- a/src/NSwag.AssemblyLoader/NSwag.AssemblyLoader.csproj +++ b/src/NSwag.AssemblyLoader/NSwag.AssemblyLoader.csproj @@ -39,8 +39,8 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True diff --git a/src/NSwag.AssemblyLoader/Properties/AssemblyInfo.cs b/src/NSwag.AssemblyLoader/Properties/AssemblyInfo.cs index 2d7adbdb92..d0b190788a 100644 --- a/src/NSwag.AssemblyLoader/Properties/AssemblyInfo.cs +++ b/src/NSwag.AssemblyLoader/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.AssemblyLoader")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.31.*")] +[assembly: AssemblyVersion("2.32.*")] diff --git a/src/NSwag.AssemblyLoader/app.config b/src/NSwag.AssemblyLoader/app.config index 76a864d5cc..3d981baf3d 100644 --- a/src/NSwag.AssemblyLoader/app.config +++ b/src/NSwag.AssemblyLoader/app.config @@ -4,7 +4,7 @@ - + diff --git a/src/NSwag.AssemblyLoader/packages.config b/src/NSwag.AssemblyLoader/packages.config index 896b14c525..e89add0759 100644 --- a/src/NSwag.AssemblyLoader/packages.config +++ b/src/NSwag.AssemblyLoader/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/NSwag.CodeGeneration.Tests/NSwag.CodeGeneration.Tests.csproj b/src/NSwag.CodeGeneration.Tests/NSwag.CodeGeneration.Tests.csproj index 198a270586..a53fdf9ab8 100644 --- a/src/NSwag.CodeGeneration.Tests/NSwag.CodeGeneration.Tests.csproj +++ b/src/NSwag.CodeGeneration.Tests/NSwag.CodeGeneration.Tests.csproj @@ -39,12 +39,12 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True - - ..\packages\NJsonSchema.CodeGeneration.2.22.5984.16718\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll + + ..\packages\NJsonSchema.CodeGeneration.2.23.5984.32961\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll True diff --git a/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs b/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs index 40101b950b..1ac58cf234 100644 --- a/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs +++ b/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("2.31.*")] +// [assembly: AssemblyVersion("2.32.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NSwag.CodeGeneration.Tests/WebApiToSwaggerGenerator/GeneralTests.cs b/src/NSwag.CodeGeneration.Tests/WebApiToSwaggerGenerator/GeneralTests.cs index b9c33fd9e2..207cc15ab1 100644 --- a/src/NSwag.CodeGeneration.Tests/WebApiToSwaggerGenerator/GeneralTests.cs +++ b/src/NSwag.CodeGeneration.Tests/WebApiToSwaggerGenerator/GeneralTests.cs @@ -1,5 +1,9 @@ using System; +using System.Linq; +using System.Web.Http; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Newtonsoft.Json; +using NJsonSchema; using NSwag.CodeGeneration.SwaggerGenerators.WebApi; namespace NSwag.CodeGeneration.Tests.WebApiToSwaggerGenerator @@ -25,5 +29,118 @@ public void When_controller_type_is_not_found_then_type_load_exception_is_thrown //// Assert } + + public interface IFormFile + { + } + + public interface IActionResult + { + } + + public class FromUriFileParameterController : ApiController + { + public class ComplexClass + { + [JsonProperty("formFile")] + public IFormFile FormFile { get; set; } + + public string CustomLocationToSave { get; set; } + } + + [HttpPost, Route("upload")] + public IActionResult Upload([FromUri] ComplexClass parameters) + { + // TODO: Check if this is the correct behavior or if FromUri can be omitted when a property is a file + throw new NotImplementedException(); + } + } + + [TestMethod] + public void When_parameter_is_from_uri_and_has_file_then_two_params_and_consumes_is_correct() + { + //// Arrange + var generator = new SwaggerGenerators.WebApi.WebApiToSwaggerGenerator(new WebApiToSwaggerGeneratorSettings()); + + //// Act + var service = generator.GenerateForController(typeof(FromUriFileParameterController)); + + //// Assert + var operation = service.Paths["upload"][SwaggerOperationMethod.Post]; + + Assert.AreEqual(JsonObjectType.File, operation.Parameters.Single(p => p.Name == "formFile").Type); + Assert.IsTrue(operation.Parameters.Any(p => p.Name == "formFile")); + Assert.IsTrue(operation.Parameters.Any(p => p.Name == "CustomLocationToSave")); + Assert.AreEqual("multipart/form-data", operation.Consumes[0]); + } + + public interface IFormFileCollection + { + } + + public class FileCollectionController : ApiController + { + [HttpPost, Route("upload")] + public IActionResult Upload(IFormFileCollection files) + { + throw new NotImplementedException(); + } + } + + [TestMethod] + public void When_parameter_is_file_collection_then_type_is_correct_and_collection_format_is_multi() + { + //// Arrange + var generator = new SwaggerGenerators.WebApi.WebApiToSwaggerGenerator(new WebApiToSwaggerGeneratorSettings()); + + //// Act + var service = generator.GenerateForController(typeof(FileCollectionController)); + + //// Assert + var operation = service.Paths["upload"][SwaggerOperationMethod.Post]; + var parameter = operation.Parameters.Single(p => p.Name == "files"); + + Assert.AreEqual(JsonObjectType.File, parameter.Type); + Assert.AreEqual(SwaggerParameterCollectionFormat.Multi, parameter.CollectionFormat); + + Assert.AreEqual("multipart/form-data", operation.Consumes[0]); + } + + public class FromUriParameterController : ApiController + { + public class ComplexClass + { + public string Foo { get; set; } + + public string Bar { get; set; } + } + + [HttpPost, Route("upload")] + public IActionResult Upload([FromUri]ComplexClass parameters) + { + throw new NotImplementedException(); + } + } + + [TestMethod] + public void When_parameter_is_from_uri_then_two_params_are_generated() + { + //// Arrange + var generator = new SwaggerGenerators.WebApi.WebApiToSwaggerGenerator(new WebApiToSwaggerGeneratorSettings()); + + //// Act + var service = generator.GenerateForController(typeof(FromUriParameterController)); + + //// Assert + var operation = service.Paths["upload"][SwaggerOperationMethod.Post]; + + Assert.AreEqual(JsonObjectType.String, operation.Parameters.Single(p => p.Name == "Foo").Type); + Assert.AreEqual(JsonObjectType.String, operation.Parameters.Single(p => p.Name == "Bar").Type); + + Assert.IsTrue(operation.Parameters.Any(p => p.Name == "Foo")); + Assert.IsTrue(operation.Parameters.Any(p => p.Name == "Bar")); + + Assert.IsNull(operation.Consumes); + } } } diff --git a/src/NSwag.CodeGeneration.Tests/packages.config b/src/NSwag.CodeGeneration.Tests/packages.config index 9d6fd2edc7..9037997484 100644 --- a/src/NSwag.CodeGeneration.Tests/packages.config +++ b/src/NSwag.CodeGeneration.Tests/packages.config @@ -3,6 +3,6 @@ - - + + \ No newline at end of file diff --git a/src/NSwag.CodeGeneration/CodeGenerators/ClientGeneratorBase.cs b/src/NSwag.CodeGeneration/CodeGenerators/ClientGeneratorBase.cs index 8d0232c990..8db7b3cc3b 100644 --- a/src/NSwag.CodeGeneration/CodeGenerators/ClientGeneratorBase.cs +++ b/src/NSwag.CodeGeneration/CodeGenerators/ClientGeneratorBase.cs @@ -84,7 +84,7 @@ internal List GetOperations(SwaggerService service, { Path = tuple.Path, HttpMethod = tuple.HttpMethod, - Operation = tuple.Operation, + Operation = tuple.Operation, OperationName = BaseSettings.OperationNameGenerator.GetOperationName(service, tuple.Path, tuple.HttpMethod, tuple.Operation), ResultType = GetResultType(operation), @@ -102,21 +102,32 @@ internal List GetOperations(SwaggerService service, return new ParameterModel { - Schema = p.ActualSchema, + Schema = p.ActualSchema, Name = p.Name, - VariableNameLower = ConversionUtilities.ConvertToLowerCamelCase(p.Name.Replace("-", "_").Replace(".", "_")), + VariableNameLower = ConversionUtilities.ConvertToLowerCamelCase(p.Name.Replace("-", "_").Replace(".", "_")), Kind = p.Kind, IsRequired = p.IsRequired, - Type = resolver.Resolve(p.ActualParameterSchema, !p.IsRequired && p.IsNullable, p.Name), + Type = ResolveParameterType(p, resolver), IsLast = operation.Parameters.LastOrDefault() == p, Description = ConversionUtilities.TrimWhiteSpaces(p.Description) }; - }).ToList(), + }).ToList(), }; }).ToList(); return operations; } + private string ResolveParameterType(SwaggerParameter parameter, TypeResolverBase resolver) + where TGenerator : TypeGeneratorBase + { + var schema = parameter.ActualParameterSchema; + + if (parameter.CollectionFormat == SwaggerParameterCollectionFormat.Multi) + schema = new JsonSchema4 { Type = JsonObjectType.Array, Item = schema }; + + return resolver.Resolve(schema, !parameter.IsRequired && parameter.IsNullable, parameter.Name); + } + internal SwaggerResponse GetSuccessResponse(SwaggerOperation operation) { if (operation.Responses.Any(r => r.Key == "200")) diff --git a/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/SwaggerToTypeScriptClientGenerator.cs b/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/SwaggerToTypeScriptClientGenerator.cs index 9361378b18..80ecf818af 100644 --- a/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/SwaggerToTypeScriptClientGenerator.cs +++ b/src/NSwag.CodeGeneration/CodeGenerators/TypeScript/SwaggerToTypeScriptClientGenerator.cs @@ -67,7 +67,7 @@ internal override string RenderFile(string clientCode) Clients = Settings.GenerateClientClasses ? clientCode : string.Empty, Types = GenerateDtoTypes(), - ExtensionCode = Settings.TypeScriptGeneratorSettings.TransformedExtensionCode, + ExtensionCode = Settings.TypeScriptGeneratorSettings.TransformedExtensionCode, HasModuleName = !string.IsNullOrEmpty(Settings.ModuleName), ModuleName = Settings.ModuleName @@ -82,11 +82,11 @@ internal override string RenderClientCode(string controllerName, IEnumerable..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True - - ..\packages\NJsonSchema.CodeGeneration.2.22.5984.16718\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll + + ..\packages\NJsonSchema.CodeGeneration.2.23.5984.32961\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll True diff --git a/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs b/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs index b014652293..f863b61ad6 100644 --- a/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs +++ b/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.CodeGeneration")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.31.*")] +[assembly: AssemblyVersion("2.32.*")] diff --git a/src/NSwag.CodeGeneration/SwaggerGenerators/WebApi/WebApiToSwaggerGenerator.cs b/src/NSwag.CodeGeneration/SwaggerGenerators/WebApi/WebApiToSwaggerGenerator.cs index d3e2cf7167..3b6f351b98 100644 --- a/src/NSwag.CodeGeneration/SwaggerGenerators/WebApi/WebApiToSwaggerGenerator.cs +++ b/src/NSwag.CodeGeneration/SwaggerGenerators/WebApi/WebApiToSwaggerGenerator.cs @@ -301,12 +301,11 @@ private void LoadParameters(SwaggerService service, SwaggerOperation operation, { foreach (var parameter in parameters) { - if (TryAddFileParameter(service, operation, schemaResolver, parameter) == false) + var parameterInfo = JsonObjectTypeDescription.FromType(parameter.ParameterType, parameter.GetCustomAttributes(), Settings.DefaultEnumHandling); + if (TryAddFileParameter(parameterInfo, service, operation, schemaResolver, parameter) == false) { // http://blogs.msdn.com/b/jmstall/archive/2012/04/16/how-webapi-does-parameter-binding.aspx - var info = JsonObjectTypeDescription.FromType(parameter.ParameterType, parameter.GetCustomAttributes(), Settings.DefaultEnumHandling); - dynamic fromBodyAttribute = parameter.GetCustomAttributes() .SingleOrDefault(a => a.GetType().Name == "FromBodyAttribute"); @@ -315,7 +314,7 @@ private void LoadParameters(SwaggerService service, SwaggerOperation operation, // TODO: Add support for ModelBinder attribute - if (info.IsComplexType) + if (parameterInfo.IsComplexType) { if (fromUriAttribute != null) AddPrimitiveParametersFromUri(service, operation, parameter, schemaResolver); @@ -332,52 +331,43 @@ private void LoadParameters(SwaggerService service, SwaggerOperation operation, } } + if (operation.Parameters.Any(p => p.Type == JsonObjectType.File)) + operation.Consumes = new List { "multipart/form-data" }; + if (operation.Parameters.Count(p => p.Kind == SwaggerParameterKind.Body) > 1) throw new InvalidOperationException("The operation '" + operation.OperationId + "' has more than one body parameter."); } - private bool TryAddFileParameter(SwaggerService service, SwaggerOperation operation, ISchemaResolver schemaResolver, ParameterInfo parameter) + private bool TryAddFileParameter(JsonObjectTypeDescription info, SwaggerService service, SwaggerOperation operation, ISchemaResolver schemaResolver, ParameterInfo parameter) { - var isEnumerable = parameter.ParameterType.IsArray || parameter.ParameterType.GetTypeInfo().ImplementedInterfaces.Any(i => i.Name == "IEnumerable"); - var parameterType = isEnumerable && parameter.ParameterType.GenericTypeArguments.Any() - ? parameter.ParameterType.GenericTypeArguments[0] - : parameter.ParameterType; - var isFormFileCollection = parameter.ParameterType.Name == "IFormFileCollection"; - if (IsFileParameter(parameterType) || isFormFileCollection) + var isFileArray = IsFileArray(parameter.ParameterType, info); + if (info.Type == JsonObjectType.File || isFileArray) { - AddFileParameter(parameter, isEnumerable || isFormFileCollection, operation, service, schemaResolver); - return true; + AddFileParameter(parameter, isFileArray, operation, service, schemaResolver); + return true; } - return false; - } - private static bool IsFileParameter(Type type) - { - var parameterTypeName = type.Name; - return parameterTypeName == "IFormFile" || - parameterTypeName == "HttpPostedFileBase" || - type.InheritsFrom("IFormFile") || - type.InheritsFrom("HttpPostedFileBase"); + return false; } - private void AddFileParameter(ParameterInfo parameter, bool isEnumerable, SwaggerOperation operation, SwaggerService service, ISchemaResolver schemaResolver) + private void AddFileParameter(ParameterInfo parameter, bool isFileArray, SwaggerOperation operation, SwaggerService service, ISchemaResolver schemaResolver) { - operation.Consumes = new List {"multipart/form-data"}; - var attributes = parameter.GetCustomAttributes().ToList(); var operationParameter = CreatePrimitiveParameter( // TODO: Check if there is a way to control the property name service, parameter.Name, parameter.GetXmlDocumentation(), parameter.ParameterType, attributes, schemaResolver); - operationParameter.Type = JsonObjectType.File; - operationParameter.IsRequired = attributes.Any(a => a.GetType().Name == "RequiredAttribute"); - operationParameter.Kind = SwaggerParameterKind.FormData; - - if (isEnumerable) - operationParameter.CollectionFormat = SwaggerParameterCollectionFormat.Multi; - + InitializeFileParameter(operationParameter, isFileArray); operation.Parameters.Add(operationParameter); } + private bool IsFileArray(Type type, JsonObjectTypeDescription typeInfo) + { + var isFormFileCollection = type.Name == "IFormFileCollection"; + var isFileArray = typeInfo.Type == JsonObjectType.Array && type.GenericTypeArguments.Any() && + JsonObjectTypeDescription.FromType(type.GenericTypeArguments[0], null, Settings.DefaultEnumHandling).Type == JsonObjectType.File; + return isFormFileCollection || isFileArray; + } + private void AddBodyParameter(SwaggerService service, SwaggerOperation operation, ParameterInfo parameter, ISchemaResolver schemaResolver) { var operationParameter = CreateBodyParameter(service, parameter, schemaResolver); @@ -390,14 +380,28 @@ private void AddPrimitiveParametersFromUri(SwaggerService service, SwaggerOperat { var attributes = property.GetCustomAttributes().ToList(); var operationParameter = CreatePrimitiveParameter(// TODO: Check if there is a way to control the property name - service, property.Name, property.GetXmlDocumentation(), property.PropertyType, attributes, schemaResolver); + service, JsonPathUtilities.GetPropertyName(property), property.GetXmlDocumentation(), property.PropertyType, attributes, schemaResolver); + + var parameterInfo = JsonObjectTypeDescription.FromType(property.PropertyType, attributes, Settings.DefaultEnumHandling); + var isFileArray = IsFileArray(property.PropertyType, parameterInfo); + if (parameterInfo.Type == JsonObjectType.File || isFileArray) + InitializeFileParameter(operationParameter, isFileArray); + else + operationParameter.Kind = SwaggerParameterKind.Query; - operationParameter.IsRequired = attributes.Any(a => a.GetType().Name == "RequiredAttribute"); - operationParameter.Kind = SwaggerParameterKind.Query; operation.Parameters.Add(operationParameter); } } + private static void InitializeFileParameter(SwaggerParameter operationParameter, bool isFileArray) + { + operationParameter.Type = JsonObjectType.File; + operationParameter.Kind = SwaggerParameterKind.FormData; + + if (isFileArray) + operationParameter.CollectionFormat = SwaggerParameterCollectionFormat.Multi; + } + private void AddPrimitiveParameter(SwaggerService service, SwaggerOperation operation, ParameterInfo parameter, ISchemaResolver schemaResolver) { var operationParameter = CreatePrimitiveParameter(service, parameter, schemaResolver, setRequiredProperty: true); @@ -470,6 +474,7 @@ private SwaggerParameter CreatePrimitiveParameter(SwaggerService service, string schemaGenerator.ApplyPropertyAnnotations(operationParameter, parentAttributes, typeDescription); operationParameter.Name = name; + operationParameter.IsRequired = parentAttributes?.Any(a => a.GetType().Name == "RequiredAttribute") ?? false; if (description != string.Empty) operationParameter.Description = description; diff --git a/src/NSwag.CodeGeneration/packages.config b/src/NSwag.CodeGeneration/packages.config index 5c6c150149..26bd4a2894 100644 --- a/src/NSwag.CodeGeneration/packages.config +++ b/src/NSwag.CodeGeneration/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/src/NSwag.Core/NSwag.Core.csproj b/src/NSwag.Core/NSwag.Core.csproj index a52a7ab8d5..cd73bdb83a 100644 --- a/src/NSwag.Core/NSwag.Core.csproj +++ b/src/NSwag.Core/NSwag.Core.csproj @@ -46,8 +46,8 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True diff --git a/src/NSwag.Core/Properties/AssemblyInfo.cs b/src/NSwag.Core/Properties/AssemblyInfo.cs index 398274f2cc..c7f5b06c07 100644 --- a/src/NSwag.Core/Properties/AssemblyInfo.cs +++ b/src/NSwag.Core/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.31.*")] +[assembly: AssemblyVersion("2.32.*")] diff --git a/src/NSwag.Core/packages.config b/src/NSwag.Core/packages.config index a82b36bdfe..94f9c231ab 100644 --- a/src/NSwag.Core/packages.config +++ b/src/NSwag.Core/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs b/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs index 49c09a05ae..f91efd24a8 100644 --- a/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs +++ b/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs @@ -50,6 +50,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("2.31.*")] +// [assembly: AssemblyVersion("2.32.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NSwag.Demo.Web/Controllers/FileController.cs b/src/NSwag.Demo.Web/Controllers/FileController.cs index 8446f81fe4..97c842b745 100644 --- a/src/NSwag.Demo.Web/Controllers/FileController.cs +++ b/src/NSwag.Demo.Web/Controllers/FileController.cs @@ -11,17 +11,14 @@ namespace NSwag.Demo.Web.Controllers { public interface IFormFile { - } public interface IActionResult { - } public interface IFormFileCollection { - } public class FileController : ApiController diff --git a/src/NSwag.Demo.Web/NSwag.Demo.Web.csproj b/src/NSwag.Demo.Web/NSwag.Demo.Web.csproj index d3711759f8..54fec7902b 100644 --- a/src/NSwag.Demo.Web/NSwag.Demo.Web.csproj +++ b/src/NSwag.Demo.Web/NSwag.Demo.Web.csproj @@ -47,8 +47,8 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True diff --git a/src/NSwag.Demo.Web/Web.config b/src/NSwag.Demo.Web/Web.config index 733fdcc0f5..419221c941 100644 --- a/src/NSwag.Demo.Web/Web.config +++ b/src/NSwag.Demo.Web/Web.config @@ -58,7 +58,7 @@ - + diff --git a/src/NSwag.Demo.Web/packages.config b/src/NSwag.Demo.Web/packages.config index bf517dd7b7..2b406cada5 100644 --- a/src/NSwag.Demo.Web/packages.config +++ b/src/NSwag.Demo.Web/packages.config @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/src/NSwag.Tests/NSwag.Tests.csproj b/src/NSwag.Tests/NSwag.Tests.csproj index 4711a7d011..8b6411afc1 100644 --- a/src/NSwag.Tests/NSwag.Tests.csproj +++ b/src/NSwag.Tests/NSwag.Tests.csproj @@ -39,8 +39,8 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True diff --git a/src/NSwag.Tests/Properties/AssemblyInfo.cs b/src/NSwag.Tests/Properties/AssemblyInfo.cs index e26d910582..a219ff0691 100644 --- a/src/NSwag.Tests/Properties/AssemblyInfo.cs +++ b/src/NSwag.Tests/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("2.31.*")] +// [assembly: AssemblyVersion("2.32.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NSwag.Tests/app.config b/src/NSwag.Tests/app.config index 4d7ff4c89d..1d5b76fc97 100644 --- a/src/NSwag.Tests/app.config +++ b/src/NSwag.Tests/app.config @@ -8,7 +8,7 @@ - + diff --git a/src/NSwag.Tests/packages.config b/src/NSwag.Tests/packages.config index 5684ec2fd3..f53226cb4e 100644 --- a/src/NSwag.Tests/packages.config +++ b/src/NSwag.Tests/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/src/NSwag/NSwag.csproj b/src/NSwag/NSwag.csproj index 33357da657..01014fc11a 100644 --- a/src/NSwag/NSwag.csproj +++ b/src/NSwag/NSwag.csproj @@ -42,12 +42,12 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True - - ..\packages\NJsonSchema.CodeGeneration.2.22.5984.16718\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll + + ..\packages\NJsonSchema.CodeGeneration.2.23.5984.32961\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll True diff --git a/src/NSwag/Properties/AssemblyInfo.cs b/src/NSwag/Properties/AssemblyInfo.cs index 36e4ed5271..01bae17990 100644 --- a/src/NSwag/Properties/AssemblyInfo.cs +++ b/src/NSwag/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.Console")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.31.*")] +[assembly: AssemblyVersion("2.32.*")] diff --git a/src/NSwag/packages.config b/src/NSwag/packages.config index b8b57f42a9..e323e82fd9 100644 --- a/src/NSwag/packages.config +++ b/src/NSwag/packages.config @@ -2,6 +2,6 @@ - - + + \ No newline at end of file diff --git a/src/NSwagStudio.Installer/Generated.wxs b/src/NSwagStudio.Installer/Generated.wxs index 3fb6a7be5c..f5790f4277 100644 --- a/src/NSwagStudio.Installer/Generated.wxs +++ b/src/NSwagStudio.Installer/Generated.wxs @@ -516,185 +516,185 @@ - - - - - - - + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -703,128 +703,128 @@ - - - - - + + - + - - - - - + + - + - - + + - + - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -833,508 +833,508 @@ - - - - - - - - - - - + + - + - - - - + - - - - + - - - - - + + - + - + - + - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - - + + + + + - + - + - - + + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + + + + - - + + - - + + - + - - + + - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1348,9 +1348,6 @@ - - - diff --git a/src/NSwagStudio/NSwagStudio.csproj b/src/NSwagStudio/NSwagStudio.csproj index 10ba95cb79..fb1726a211 100644 --- a/src/NSwagStudio/NSwagStudio.csproj +++ b/src/NSwagStudio/NSwagStudio.csproj @@ -70,12 +70,12 @@ ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - - ..\packages\NJsonSchema.2.22.5984.16716\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll + + ..\packages\NJsonSchema.2.23.5984.32960\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.dll True - - ..\packages\NJsonSchema.CodeGeneration.2.22.5984.16718\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll + + ..\packages\NJsonSchema.CodeGeneration.2.23.5984.32961\lib\portable45-net45+win8+wp8+wpa81\NJsonSchema.CodeGeneration.dll True diff --git a/src/NSwagStudio/Properties/AssemblyInfo.cs b/src/NSwagStudio/Properties/AssemblyInfo.cs index a1dbd7fd0c..b9308ac4d3 100644 --- a/src/NSwagStudio/Properties/AssemblyInfo.cs +++ b/src/NSwagStudio/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwagStudio")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.31.*")] +[assembly: AssemblyVersion("2.32.*")] diff --git a/src/NSwagStudio/packages.config b/src/NSwagStudio/packages.config index 72f83df410..ef766c06c7 100644 --- a/src/NSwagStudio/packages.config +++ b/src/NSwagStudio/packages.config @@ -7,6 +7,6 @@ - - + + \ No newline at end of file