Update 20240719
This commit is contained in:
@@ -3,7 +3,7 @@ using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http.Description;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
public static class ApiDescriptionExtensions
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ using System.Web.Http;
|
||||
using System.Web.Http.OData;
|
||||
#endif
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Use this class to customize the Help Page.
|
||||
@@ -26,7 +26,7 @@ namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
public static class HelpPageConfig
|
||||
{
|
||||
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
|
||||
MessageId = "EDOKAAPI_NetFramework.Areas.HelpPage.TextSample.#ctor(System.String)",
|
||||
MessageId = "EDOKA API_NetFramework.Areas.HelpPage.TextSample.#ctor(System.String)",
|
||||
Justification = "End users may choose to merge this string with existing localized resources.")]
|
||||
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly",
|
||||
MessageId = "bsonspec",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
using EDOKAAPI_NetFramework.Areas.HelpPage.Models;
|
||||
using API_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
using API_NetFramework.Areas.HelpPage.Models;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.Controllers
|
||||
namespace API_NetFramework.Areas.HelpPage.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// The controller that will handle requests for the help page.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
public class HelpPageAreaRegistration : AreaRegistration
|
||||
{
|
||||
|
||||
@@ -11,10 +11,10 @@ using System.Net.Http.Headers;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.Description;
|
||||
using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
using EDOKAAPI_NetFramework.Areas.HelpPage.Models;
|
||||
using API_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
using API_NetFramework.Areas.HelpPage.Models;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
public static class HelpPageConfigurationExtensions
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class CollectionModelDescription : ModelDescription
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class ComplexTypeModelDescription : ModelDescription
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class DictionaryModelDescription : KeyValuePairModelDescription
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class EnumTypeModelDescription : ModelDescription
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class EnumValueDescription
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public interface IModelDocumentationProvider
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class KeyValuePairModelDescription : ModelDescription
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a type model.
|
||||
|
||||
@@ -11,7 +11,7 @@ using System.Web.Http.Description;
|
||||
using System.Xml.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates model descriptions for given types.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Use this attribute to change the name of the <see cref="ModelDescription"/> generated for a type.
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
internal static class ModelNameHelper
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class ParameterAnnotation
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class ParameterDescription
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
namespace API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
{
|
||||
public class SimpleTypeModelDescription : ModelDescription
|
||||
{
|
||||
|
||||
@@ -2,9 +2,9 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Web.Http.Description;
|
||||
using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
using API_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage.Models
|
||||
namespace API_NetFramework.Areas.HelpPage.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// The model that represents an API displayed on the help page.
|
||||
|
||||
@@ -13,7 +13,7 @@ using System.Web.Http.Description;
|
||||
using System.Xml.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// This class will generate the samples for the help page.
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// This is used to identify the place where the sample should be applied.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// This represents an image sample on the help page. There's a display template named ImageSample associated with this class.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class.
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// This class will create an object of a given type and populate it with sample data.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates whether the sample is used for request or response
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@using System.Web.Http
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.Models
|
||||
@using API_NetFramework.Areas.HelpPage.Models
|
||||
@model HelpPageApiModel
|
||||
|
||||
@{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@using System.Web.Http
|
||||
@using System.Web.Http.Controllers
|
||||
@using System.Web.Http.Description
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.Models
|
||||
@using API_NetFramework.Areas.HelpPage
|
||||
@using API_NetFramework.Areas.HelpPage.Models
|
||||
@model IGrouping<HttpControllerDescriptor, ApiDescription>
|
||||
|
||||
@{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model CollectionModelDescription
|
||||
@if (Model.ElementDescription is ComplexTypeModelDescription)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model ComplexTypeModelDescription
|
||||
@Html.DisplayFor(m => m.Properties, "Parameters")
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model DictionaryModelDescription
|
||||
Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key]
|
||||
and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value]
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model EnumTypeModelDescription
|
||||
|
||||
<p>Possible enumeration values:</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@using System.Web.Http
|
||||
@using System.Web.Http.Description
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.Models
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.Models
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model HelpPageApiModel
|
||||
|
||||
@{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
@using API_NetFramework.Areas.HelpPage
|
||||
@model ImageSample
|
||||
|
||||
<img src="@Model.Src" />
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
@using API_NetFramework.Areas.HelpPage
|
||||
@model InvalidSample
|
||||
|
||||
@if (HttpContext.Current.IsDebuggingEnabled)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model KeyValuePairModelDescription
|
||||
Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key]
|
||||
and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value]
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model Type
|
||||
@{
|
||||
ModelDescription modelDescription = ViewBag.modelDescription;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@using System.Collections.ObjectModel
|
||||
@using System.Web.Http.Description
|
||||
@using System.Threading
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model IList<ParameterDescription>
|
||||
|
||||
@if (Model.Count > 0)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model SimpleTypeModelDescription
|
||||
@Model.Documentation
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
@using API_NetFramework.Areas.HelpPage
|
||||
@model TextSample
|
||||
|
||||
<pre class="wrapped">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@using System.Web.Http.Controllers
|
||||
@using System.Web.Http.Description
|
||||
@using System.Collections.ObjectModel
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.Models
|
||||
@using API_NetFramework.Areas.HelpPage.Models
|
||||
@model Collection<ApiDescription>
|
||||
|
||||
@{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@using System.Web.Http
|
||||
@using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@using API_NetFramework.Areas.HelpPage.ModelDescriptions
|
||||
@model ModelDescription
|
||||
|
||||
<link type="text/css" href="~/Areas/HelpPage/HelpPage.css" rel="stylesheet" />
|
||||
|
||||
@@ -5,9 +5,9 @@ using System.Reflection;
|
||||
using System.Web.Http.Controllers;
|
||||
using System.Web.Http.Description;
|
||||
using System.Xml.XPath;
|
||||
using EDOKAAPI_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
using API_NetFramework.Areas.HelpPage.ModelDescriptions;
|
||||
|
||||
namespace EDOKAAPI_NetFramework.Areas.HelpPage
|
||||
namespace API_NetFramework.Areas.HelpPage
|
||||
{
|
||||
/// <summary>
|
||||
/// A custom <see cref="IDocumentationProvider"/> that reads the API documentation from an XML documentation file.
|
||||
|
||||
Reference in New Issue
Block a user