1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
OpenAPI, Swagger, API Explorer, the built-in OpenAPI support, build-time OpenAPI generation and endpoint metadata.
Debugging question on a wrong or incomplete OpenAPI document in ASP.NET Core: endpoints missing from API Explorer, untyped IResult responses, JsonPolymorphic and JsonDerivedType for oneOf, enum converters, nullable and required properties, and a snapshot test to keep it right.
Security question on publishing OpenAPI documents and Swagger UI or Scalar in production: reconnaissance risk, leaked internal and admin endpoints, examples containing personal data, UI vulnerabilities and OAuth client settings, and the controls (environment gating, RequireAuthorization on MapOpenApi, separate public documents, API Management developer portals) plus when a public document is the right call.
Theory question on the endpoint metadata collection and IApiDescriptionGroupCollectionProvider: how WithName, WithTags, WithSummary, Produces, ProducesProblem, Accepts, ExcludeFromDescription, IEndpointMetadataProvider on TypedResults and attributes become metadata, and how OpenAPI, LinkGenerator, authorisation, CORS and rate limiting all read from it.
Theory question on generating the OpenAPI document during dotnet build with Microsoft.Extensions.ApiDescription.Server (OpenApiGenerateDocuments, OpenApiDocumentsDirectory, OpenApiGenerateDocumentsOptions, the GetDocument.Insider entry point), whether to commit the spec, and generating C# and TypeScript clients from it with Kiota or NSwag.
Architecture question on contract-as-code for ASP.NET Core APIs: a committed build-time spec, breaking-change detection with oasdiff against main and released versions, Spectral linting, one OpenAPI document per major version with Asp.Versioning or group names, and how this fits with consumer-driven contract tests.
Theory question separating the OpenAPI specification from the Swagger tooling brand, the move from Swashbuckle to Microsoft.AspNetCore.OpenApi in the .NET 9+ templates, how the three document generators compare, and the role of UI viewers such as Swagger UI and Scalar.
Coding question on Microsoft.AspNetCore.OpenApi in .NET 10: registering and mapping documents, the three transformer types, adding a bearer security scheme and requirements, XML comments, and the OpenAPI 3.1 and Microsoft.OpenApi 2.x changes.