Skip to content

Commit

Permalink
Skip validation of JSON properties against table if resource is open …
Browse files Browse the repository at this point in the history
…type (#263)
  • Loading branch information
millicentachieng authored Mar 5, 2024
1 parent d49dce8 commit 40e1964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ApiDoctor.Validation/CodeBlockAnnotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public string ResourceType

/// <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; }
Expand Down
2 changes: 1 addition & 1 deletion ApiDoctor.Validation/DocSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public bool ScanDocumentation(string tags, IssueLogger issues)
}

// if parameter does not have a description, then it's from the resource JSON definition
if (string.IsNullOrEmpty(param.Description) && !param.Name.Contains('@'))
if (string.IsNullOrEmpty(param.Description) && !param.Name.Contains('@') && !resource.OriginalMetadata.IsOpenType)
{
if (string.IsNullOrWhiteSpace(resource.BaseType) || !resource.ResolvedBaseTypeReference.HasOrInheritsProperty(param.Name))
{
Expand Down

0 comments on commit 40e1964

Please sign in to comment.