SchemaVersionProbe

@Serializable
data class SchemaVersionProbe(val schemaVersion: Int = SchemaVersions.LEGACY)

ファイルから schemaVersion だけを先読み(probe)するための最小 DTO

本来の型(ManagedPluginDto)で読んでしまうと、未来の版数で増えたフィールドにより strictMode を有効にした Yaml.default が例外を投げてしまう。 そのため「版数の先読み専用」に、未知フィールドを無視する Yaml と組で使う。

YAML だけでなく JSON(mpm.json / config.json)の先読みにも同じ DTO を使う。 Utils.json は ignoreUnknownKeys = true のため、そのままデコードできる。 実際の利用箇所は SchemaMigratorImpl と SchemaVersionGuard。

Constructors

Link copied to clipboard
constructor(schemaVersion: Int = SchemaVersions.LEGACY)

Properties

Link copied to clipboard