-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Issue When Using Dependency Injection
- Loading branch information
Showing
31 changed files
with
4,890 additions
and
43,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
using Newtonsoft.Json.Serialization; | ||
using System; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
using SwaggerAPIDocumentation.ViewModels; | ||
|
||
namespace SwaggerAPIDocumentation | ||
{ | ||
internal class CamelCaseContractResolver : DefaultContractResolver | ||
{ | ||
protected override string ResolvePropertyName( string propertyName ) | ||
{ | ||
return char.ToLower(propertyName[0]) + propertyName.Substring( 1 ); | ||
return char.ToLower( propertyName[ 0 ] ) + propertyName.Substring( 1 ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-3 Bytes
(100%)
ApiDocumentation/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net40" /> | ||
<package id="Newtonsoft.Json" version="3.5.8" targetFramework="net40" /> | ||
</packages> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using NUnit.Framework; | ||
using SwaggerAPIDocumentation.Implementations; | ||
using SwaggerAPIDocumentation.ViewModels; | ||
|
||
namespace SwaggerAPIDocumentationTests | ||
{ | ||
[TestFixture] | ||
public class NewtonSoftTests | ||
{ | ||
[Test] | ||
public void CanSerializeDictionary() | ||
{ | ||
SwaggerApiResource swaggerApiResource = new SwaggerApiResource | ||
{ | ||
Models = new Dictionary<String, ApiDocModel> | ||
{ | ||
{ | ||
"Test", new ApiDocModel() | ||
} | ||
} | ||
}; | ||
|
||
JsonSerializer jsonSerializer = new JsonSerializer(); | ||
var result = jsonSerializer.SerializeObject( swaggerApiResource ); | ||
Assert.IsNotNull( result ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.