• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ImmediatePlatform / Immediate.Apis / 28677000796

03 Jul 2026 06:14PM UTC coverage: 91.678% (+0.8%) from 90.893%
28677000796

push

github

web-flow
Strongly-typed Route Groups (#302)

* Revert `[RouteGroup]`
* Initial draft of strongly-typed Route Groups
* Initial analyzers
* Check target of `MapGroup`
* Better access to `HashCode`
* Fix braceless route group codefix
* Improve whitespace handling

427 of 453 new or added lines in 16 files covered. (94.26%)

6 existing lines in 1 file now uncovered.

1333 of 1454 relevant lines covered (91.68%)

3.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.06
/src/Immediate.Apis.Generators/ImmediateApisGenerator.Render.cs
1
using Microsoft.CodeAnalysis;
2
using Scriban;
3

4
namespace Immediate.Apis.Generators;
5

6
public sealed partial class ImmediateApisGenerator
7
{
8
        private static void RenderEndpoint(
9
                SourceProductionContext context,
10
                Method method,
11
                string assemblyName,
12
                Template template
13
        )
14
        {
15
                var token = context.CancellationToken;
4✔
16
                token.ThrowIfCancellationRequested();
4✔
17

18
                var source = template.Render(new
4✔
19
                {
4✔
20
                        Assembly = assemblyName,
4✔
21
                        Method = method,
4✔
22
                        Version = ThisAssembly.InformationalVersion,
4✔
23
                });
4✔
24

25
                token.ThrowIfCancellationRequested();
4✔
26

27
                context.AddSource($"IA.{method.Namespace}.{method.Class.Name}.g.cs", source);
4✔
28
        }
4✔
29

30
        private static void RenderMapEndpoints(
31
                SourceProductionContext context,
32
                EquatableReadOnlyList<RouteEndpoint> endpoints,
33
                EquatableReadOnlyList<RouteGroupDefinition> groups,
34
                string assemblyName,
35
                Template template
36
        )
37
        {
38
                var token = context.CancellationToken;
4✔
39
                token.ThrowIfCancellationRequested();
4✔
40

41
                var source = template.Render(new
4✔
42
                {
4✔
43
                        Assembly = assemblyName,
4✔
44
                        Endpoints = endpoints,
4✔
45
                        Groups = groups,
4✔
46
                        Version = ThisAssembly.InformationalVersion,
4✔
47
                });
4✔
48

49
                token.ThrowIfCancellationRequested();
4✔
50
                context.AddSource("IA.MapEndpoints.g.cs", source);
4✔
51
        }
4✔
52

53
        private static void RenderRouteGroup(
54
                SourceProductionContext context,
55
                RouteGroup group,
56
                string assemblyName,
57
                Template template
58
        )
59
        {
60
                var token = context.CancellationToken;
4✔
61
                token.ThrowIfCancellationRequested();
4✔
62

63
                var source = template.Render(new
4✔
64
                {
4✔
65
                        Assembly = assemblyName,
4✔
66
                        Root = group,
4✔
67
                        Version = ThisAssembly.InformationalVersion,
4✔
68
                });
4✔
69

NEW
70
                var name = $"{group.Definition.Namespace}.{string.Join(".", group.Definition.OuterClasses.Select(c => c.Name))}.{group.Definition.Class.Name}";
×
71
                context.AddSource($"IA.{name}.g.cs", source);
4✔
72
        }
4✔
73
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc