Skip to content

Commit a328420

Browse files
committed
Added IgnoreSpellingAndGrammarErrorsAttribute and AspMinimalApiImplicitEndpointDeclarationAttribute
1 parent 53cd720 commit a328420

3 files changed

Lines changed: 33 additions & 3 deletions

File tree

src/Annotations.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,16 @@ public CodeTemplateAttribute(string searchTemplate)
12751275
public string SuppressionKey { get; set; }
12761276
}
12771277

1278+
/// <summary>
1279+
/// Indicates that the string literal, passed as an argument matching this parameter,
1280+
/// should not be checked on spelling or grammar errors.
1281+
/// </summary>
1282+
[AttributeUsage(AttributeTargets.Parameter)]
1283+
[Conditional("JETBRAINS_ANNOTATIONS")]
1284+
public sealed class IgnoreSpellingAndGrammarErrorsAttribute : Attribute
1285+
{
1286+
}
1287+
12781288
#region ASP.NET
12791289

12801290
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
@@ -1738,6 +1748,26 @@ public sealed class AspMinimalApiGroupAttribute : Attribute { }
17381748
[Conditional("JETBRAINS_ANNOTATIONS")]
17391749
public sealed class AspMinimalApiHandlerAttribute : Attribute { }
17401750

1751+
/// <summary>
1752+
/// Indicates that the marked method contains Minimal API endpoint declaration.
1753+
/// </summary>
1754+
/// <remarks>
1755+
/// The IDE will analyze all usages of methods marked with this attribute,
1756+
/// and will add all declared in attributes routes to completion, navigation and other features over URI strings.
1757+
/// </remarks>
1758+
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
1759+
[Conditional("JETBRAINS_ANNOTATIONS")]
1760+
public sealed class AspMinimalApiImplicitEndpointDeclarationAttribute : Attribute
1761+
{
1762+
public string HttpVerb { get; set; }
1763+
public string RouteTemplate { get; set; }
1764+
public Type BodyType { get; set; }
1765+
/// <summary>
1766+
/// Comma-separated list of query parameters defined for endpoint
1767+
/// </summary>
1768+
public string QueryParameters { get; set; }
1769+
}
1770+
17411771
#endregion
17421772

17431773
#region Razor

src/JetBrains.Annotations.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
MAJOR and MINOR version numbers should match latest ReSharper version (to avoid confusion),
77
PATCH version may vary during development and EAPs -->
88
<VersionPrefix>2023.3.0</VersionPrefix>
9-
<VersionSuffix>eap2</VersionSuffix>
9+
<VersionSuffix>eap3</VersionSuffix>
1010

1111
<!-- versioning -->
1212
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>

src/JetBrains.Annotations.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ JetBrains.Annotations help reduce false positive warnings, explicitly declare pu
1818
All usages of JetBrains.Annotations attributes are erased from metadata by default, which means no actual binary reference to 'JetBrains.Annotations.dll' assembly is produced. If you need to preserve these attributes in metadata, just define 'JETBRAINS_ANNOTATIONS' conditional compilation symbol in your projects.
1919
</description>
2020
<releaseNotes>
21-
&#8226; Added MustDisposeResourceAttribute and HandlesResourceDisposalAttribute attributes for resource disposal analysis.
22-
&#8226; Added SourceTemplateAttribute.Target property to provide a way to specify expression source template must be applied to.
21+
&#8226; Added IgnoreSpellingAndGrammarErrorsAttribute to allow ignore grammar and spelling errors in literals passed to marked parameters.
22+
&#8226; Added AspMinimalApiImplicitEndpointDeclarationAttribute to make IDE aware of Minimal API endpoints from third-party libraries.
2323
</releaseNotes>
2424
<tags>jetbrains resharper rider annotations canbenull notnull</tags>
2525
<dependencies>

0 commit comments

Comments
 (0)