/// <summary> /// Initialize the type definitions to Swagger model. /// </summary> protected virtual void InitializeTypeDefinitions() { Contract.Assert(SwaggerDocument != null); Contract.Assert(EdmModel != null); SwaggerTypeDefinitions = new JObject(); SwaggerDocument.Add("definitions", SwaggerTypeDefinitions); foreach (var type in EdmModel.SchemaElements.OfType <IEdmStructuredType>()) { SwaggerTypeDefinitions.Add(type.FullTypeName(), ODataSwaggerUtilities.CreateSwaggerTypeDefinitionForStructuredType(type)); } }