Error
The REST API v2 OpenAPI document (/api/v2/doc) describes every enum as a bare list of integers with no names. Generating a typed client from the spec (NSwag, Kiota, OpenAPI Generator) therefore produces enums whose members are _0, _1, _2 and so on. Where an enum has two names for the same value (for example GroupType.AttendanceRule), the generated code has a duplicate member and doesn't compile.
/api/v2/doc
_0
_1
_2
GroupType.AttendanceRule
We checked against Rock 19.8.1. The spec has about 220 inline enums and none of them carries names. The v1 Swagger configuration calls DescribeAllEnumsAsStrings() (Rock.Rest/Swagger/SwaggerConfig.cs); the v2 configuration (SwaggerConfigV2.cs) has nothing equivalent.
DescribeAllEnumsAsStrings()
Rock.Rest/Swagger/SwaggerConfig.cs
SwaggerConfigV2.cs
Suggested change: add a schema filter to the v2 Swagger configuration that adds an x-enumNames list (the member names, in the same order as the values) to each enum schema. The wire format stays integers, so nothing changes for existing API callers. Client generators read x-enumNames and produce properly named enums. The change is small and confined to Rock.Rest/Swagger.
Why it matters: v2 is the current API, and Rock.Client.dll hasn't been regenerated since early 2025, so generating models from the v2 spec is the natural way for a .NET integration to stay current with each Rock release. Named enums are the one piece the spec is missing for that.
We're happy to submit a pull request for this if the core team agrees with the approach.
Geoffrey Roberts,Saddleback Church
Cultivate your ideas for maximum impact with these helpful submission tips that will increase the chances of your brilliant concepts becoming reality.