diff --git a/ApiDocs.Validation/CodeBlockAnnotation.cs b/ApiDocs.Validation/CodeBlockAnnotation.cs index 76fb3f0..781ee9e 100644 --- a/ApiDocs.Validation/CodeBlockAnnotation.cs +++ b/ApiDocs.Validation/CodeBlockAnnotation.cs @@ -31,6 +31,7 @@ namespace ApiDocs.Validation using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Collections.Generic; + using ApiDocs.Validation.OData.Transformation; public class CodeBlockAnnotation { @@ -94,6 +95,24 @@ public string LegacyResourceType [JsonConverter(typeof(SingleOrArrayConverter))] public List MethodName { get; set; } + /// + /// The name of the action. + /// + [JsonProperty("actionName", DefaultValueHandling = DefaultValueHandling.Ignore)] + public string ActionName { get; set; } + + /// + /// The name of the function. + /// + [JsonProperty("functionName", DefaultValueHandling = DefaultValueHandling.Ignore)] + public string FunctionName { get; set; } + + /// + /// Information stored about the function. + /// + [JsonProperty("functionModification", DefaultValueHandling = DefaultValueHandling.Ignore)] + public FunctionModification FunctionModification { get; set; } + /// /// Indicates that the response is expected to be an error response. /// @@ -258,13 +277,19 @@ public ParameterDataType Type /// /// Indicates that a resource is extensible with additional properties that - /// may not be defined in the documtnation. + /// may not be defined in the documentation. /// [JsonProperty("openType")] public bool IsOpenType { get; set; } [JsonProperty("target")] public TargetType Target { get; set; } + + /// + /// Information stored about the resource. + /// + [JsonProperty("modification")] + public EntityTypeModification Modification { get; set; } } public enum TargetType diff --git a/ApiDocs.Validation/MethodDefinition.cs b/ApiDocs.Validation/MethodDefinition.cs index 3dc39a6..b65a54c 100644 --- a/ApiDocs.Validation/MethodDefinition.cs +++ b/ApiDocs.Validation/MethodDefinition.cs @@ -294,7 +294,7 @@ public void ModifyRequestForAccount(HttpRequest request, IServiceAccount account return; - if (this.RequestMetadata.Target == TargetType.Action || this.RequestMetadata.Target == TargetType.Function) + if (this.RequestMetadata.Target == TargetType.Action /*|| this.RequestMetadata.Target == TargetType.Function*/) { // Add the ActionPrefix to the last path component of the URL AddPrefixToLastUrlComponent(request, account.Transformations.Request.Actions.Prefix);