Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion ApiDocs.Validation/CodeBlockAnnotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -94,6 +95,24 @@ public string LegacyResourceType
[JsonConverter(typeof(SingleOrArrayConverter<string>))]
public List<string> MethodName { get; set; }

/// <summary>
/// The name of the action.
/// </summary>
[JsonProperty("actionName", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string ActionName { get; set; }

/// <summary>
/// The name of the function.
/// </summary>
[JsonProperty("functionName", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string FunctionName { get; set; }

/// <summary>
/// Information stored about the function.
/// </summary>
[JsonProperty("functionModification", DefaultValueHandling = DefaultValueHandling.Ignore)]
public FunctionModification FunctionModification { get; set; }

/// <summary>
/// Indicates that the response is expected to be an error response.
/// </summary>
Expand Down Expand Up @@ -258,13 +277,19 @@ public ParameterDataType Type

/// <summary>
/// Indicates that a resource is extensible with additional properties that
/// may not be defined in the documtnation.
/// may not be defined in the documentation.
/// </summary>
[JsonProperty("openType")]
public bool IsOpenType { get; set; }

[JsonProperty("target")]
public TargetType Target { get; set; }

/// <summary>
/// Information stored about the resource.
/// </summary>
[JsonProperty("modification")]
public EntityTypeModification Modification { get; set; }
}

public enum TargetType
Expand Down
2 changes: 1 addition & 1 deletion ApiDocs.Validation/MethodDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down