You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Mongo scalar map's nativeType holds codec tokens for Json and Bson, not BSON type names #30468
What a maintainer sees. Nothing a user sees is wrong today. Every entry in the Mongo PSL scalar map carries a nativeType, which for most scalars is the BSON type the validator uses (int, long, decimal). For Json it is json and for Bson it is bson: codec tokens, because Json stores several BSON types and Bson any. The PSL interpreter builds a user-facing message from this field for deprecated aliases, "stored as BSON ". No deprecated alias points at Json or Bson today, but a future message built the same way would print "stored as BSON json" or "stored as BSON bson".
Where.mongoScalarAuthoringTypes in packages/3-mongo-target/2-mongo-adapter/src/exports/control.ts; the message in packages/2-mongo-family/2-authoring/contract-psl/src/interpreter.ts; the framework requires nativeType on a type constructor's output (framework-authoring.ts).
Likely fix. In the framework, make nativeType optional for type constructors whose codec declares no single storage type, or add a separate display label, and have messages read the codec's targetTypes instead of nativeType.
Activity