Skip to content

Commit

Permalink
Resolve the comments. Thanks.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhg committed Oct 26, 2015
1 parent 7994f5c commit 2abf5e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
8 changes: 5 additions & 3 deletions OData/src/System.Web.OData/OData/ODataSwaggerConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public ODataSwaggerConverter(IEdmModel model)
}

/// <summary>
/// Convert the Edm model to Swagger model.
/// Converts the Edm model to Swagger model.
/// </summary>
/// <returns>The <see cref="Newtonsoft.Json.Linq.JObject"/> represents the Swagger model.</returns>
public virtual JObject ConvertToSwaggerModel()
Expand Down Expand Up @@ -173,7 +173,8 @@ protected virtual void InitializeContainer()
{
SwaggerPaths.Add("/" + entitySet.Name, ODataSwaggerUtilities.CreateSwaggerPathForEntitySet(entitySet));

SwaggerPaths.Add(ODataSwaggerUtilities.GetPathForEntity(entitySet), ODataSwaggerUtilities.CreateSwaggerPathForEntity(entitySet));
SwaggerPaths.Add(ODataSwaggerUtilities.GetPathForEntity(entitySet),
ODataSwaggerUtilities.CreateSwaggerPathForEntity(entitySet));
}

foreach (var operationImport in EdmModel.EntityContainer.OperationImports())
Expand All @@ -196,7 +197,8 @@ protected virtual void InitializeTypeDefinitions()

foreach (var type in EdmModel.SchemaElements.OfType<IEdmStructuredType>())
{
SwaggerDefinitions.Add(type.FullTypeName(), ODataSwaggerUtilities.CreateSwaggerDefinitionForStructureType(type));
SwaggerDefinitions.Add(type.FullTypeName(),
ODataSwaggerUtilities.CreateSwaggerDefinitionForStructureType(type));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
using System.Collections.Generic;

using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Dispatcher;
using System.Web.OData.Routing;
using System.Web.OData;
using System.Web.OData.Builder;
using System.Web.OData.Extensions;
using Microsoft.OData.Edm;
using Nuwa;
using WebStack.QA.Test.OData.Common;
using System.Web.OData.Routing;
using System.Web.OData.Routing.Conventions;
using System.Web.OData.Builder;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Library;
using Newtonsoft.Json.Linq;
using Nuwa;
using WebStack.QA.Test.OData.Common;
using Xunit;
using Xunit.Extensions;

Expand All @@ -41,10 +42,8 @@ public static void UpdateConfiguration(HttpConfiguration configuration)
configuration.Services.Replace(typeof(IAssembliesResolver), resolver);

configuration.Routes.Clear();
// configuration.Formatters.Add(new JsonMediaTypeFormatter());

JsonMediaTypeFormatter jsonFormatter = new JsonMediaTypeFormatter();
//jsonFormatter.SerializerSettings. = true;
configuration.Formatters.Add(jsonFormatter);

IODataPathHandler handler = new SwaggerPathHandler();
Expand Down

0 comments on commit 2abf5e8

Please sign in to comment.