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
Unknown values for the three validation mode properties are handled three different ways; two of them mask a typo (follow-up to #392, which fixed the third):
storm.validation.schema_mode: an unknown value logs a boot warning and skips validation entirely, at both entry points (storm-spring/src/main/java/st/orm/spring/boot/StormValidationAutoConfiguration.java:64, storm-ktor/src/main/kotlin/st/orm/ktor/Storm.kt:403). A deployment that sets schema_mode to a misspelled fail runs with schema validation disabled and only a log line to show for it.
storm.validation.record_mode: only none and warn are special-cased (storm-core/src/main/java/st/orm/core/template/impl/RecordValidation.java:95-99), so any unknown value behaves as fail. Strict by accident: the typo is never reported, it just changes meaning.
All three should fail fast on unknown values with an error naming the property, the given value, and the valid values. Matching normalization applies: the siblings match case-insensitively after trimming, so unknown means unknown after that normalization.
Related detail worth aligning in the same change: blank values diverge. The Spring entry point treats blank schema_mode as the fail default (StormValidationAutoConfiguration.java:52), while the Ktor entry point treats blank as none (Storm.kt:394).
Unknown values for the three validation mode properties are handled three different ways; two of them mask a typo (follow-up to #392, which fixed the third):
storm.validation.schema_mode: an unknown value logs a boot warning and skips validation entirely, at both entry points (storm-spring/src/main/java/st/orm/spring/boot/StormValidationAutoConfiguration.java:64,storm-ktor/src/main/kotlin/st/orm/ktor/Storm.kt:403). A deployment that setsschema_modeto a misspelledfailruns with schema validation disabled and only a log line to show for it.storm.validation.record_mode: onlynoneandwarnare special-cased (storm-core/src/main/java/st/orm/core/template/impl/RecordValidation.java:95-99), so any unknown value behaves asfail. Strict by accident: the typo is never reported, it just changes meaning.storm.validation.interpolation_mode: fails fast naming the valid values since Interpolation safety check: bypassed by one explicit t(), no else on the mode switch, mode name mismatch #392.All three should fail fast on unknown values with an error naming the property, the given value, and the valid values. Matching normalization applies: the siblings match case-insensitively after trimming, so unknown means unknown after that normalization.
Related detail worth aligning in the same change: blank values diverge. The Spring entry point treats blank
schema_modeas thefaildefault (StormValidationAutoConfiguration.java:52), while the Ktor entry point treats blank asnone(Storm.kt:394).