map System.Text.Json.Nodes types to OpenAPI schemas#8053
Conversation
Swashbuckle reflected over the members of JsonNode/JsonValue and emitted a bogus, self-referential "JsonValue" component (options/parent/root). The SDK code generator then materialized that as a made-up type, breaking the generated bindings for ConfigResponseModel.FeatureStates. Register MapType mappings so these opaque JSON types render as free-form schemas, restoring the free-form 'object' behavior these bindings previously relied on.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the addition of four Code Review DetailsNo findings. The mappings match the prior free-form |
🎟️ Tracking
📔 Objective
#7898 changed
ConfigResponseModel.FeatureStatestoIReadOnlyDictionary<string, JsonValue>. Swashbuckle doesn't special-caseSystem.Text.Json.Nodestypes, so it reflected overJsonValue's members and emitted a bogusJsonValuecomponent (options/parent/root), which the SDK generator turned into a made-up type and broke the bindings.This registers
MapTypemappings in the shared Swagger setup so these opaque types render as free-form schemas (matching the old object behavior), keeping JsonValue as the accurate model type and covering future uses across the Api and Identity specs.📸 Screenshots