Skip to content

Commit 0dea5ba

Browse files
authored
Merge pull request #23 from mr146/main
Added IgnoreSpellingAndGrammarErrorsAttribute and AspMinimalApiImplic…
2 parents 53cd720 + 6565d31 commit 0dea5ba

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

src/Annotations.cs

Lines changed: 33 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,29 @@ 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+
1764+
public string RouteTemplate { get; set; }
1765+
1766+
public Type BodyType { get; set; }
1767+
1768+
/// <summary>
1769+
/// Comma-separated list of query parameters defined for endpoint
1770+
/// </summary>
1771+
public string QueryParameters { get; set; }
1772+
}
1773+
17411774
#endregion
17421775

17431776
#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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ All usages of JetBrains.Annotations attributes are erased from metadata by defau
2020
<releaseNotes>
2121
&#8226; Added MustDisposeResourceAttribute and HandlesResourceDisposalAttribute attributes for resource disposal analysis.
2222
&#8226; Added SourceTemplateAttribute.Target property to provide a way to specify expression source template must be applied to.
23+
&#8226; Added IgnoreSpellingAndGrammarErrorsAttribute to allow ignore grammar and spelling errors in literals passed to marked parameters.
24+
&#8226; Added AspMinimalApiImplicitEndpointDeclarationAttribute to make IDE aware of Minimal API endpoints from third-party libraries.
2325
</releaseNotes>
2426
<tags>jetbrains resharper rider annotations canbenull notnull</tags>
2527
<dependencies>

0 commit comments

Comments
 (0)