RicoSuter/NSwag
View on GitHubC# Controller Code Does Not Compile When Operation Id Has Underscore Followed By Digit
Open
#2,192 opened on May 27, 2019
help wantedproject: NSwag.CodeGenerationtype: enhancement
Repository metrics
- Stars
- (6,291 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
The C# controller code generated for the definition below, fails to compile, with the following error message: Error CS1519: Invalid token '1' in class, struct, or interface member declaration
{ "openapi": "3.0.1", "info": { "title": "OperationId with an underscore followed by a digit", "version": "v1" }, "paths": { "/gettext": { "get": { "operationId": "gettext_1", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } }, "x-annotation-nullable": true } } } } } }