{"id":"ad359aab4ed99d2c","repo":"docker/cli","slug":"unsupported-compose-file-version-s","errorCode":null,"errorMessage":"unsupported Compose file version: %s","messagePattern":"unsupported Compose file version: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/schema/schema.go","lineNumber":82,"sourceCode":"\nfunc normalizeVersion(version string) string {\n\tswitch version {\n\tcase \"\", \"3\":\n\t\treturn defaultVersion\n\tdefault:\n\t\treturn version\n\t}\n}\n\n//go:embed data/config_schema_v*.json\nvar schemas embed.FS\n\n// Validate uses the jsonschema to validate the configuration\nfunc Validate(config map[string]any, version string) error {\n\tversion = normalizeVersion(version)\n\tschemaData, err := schemas.ReadFile(\"data/config_schema_v\" + version + \".json\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unsupported Compose file version: %s\", version)\n\t}\n\n\tschemaLoader := gojsonschema.NewStringLoader(string(schemaData))\n\tdataLoader := gojsonschema.NewGoLoader(config)\n\n\tresult, err := gojsonschema.Validate(schemaLoader, dataLoader)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !result.Valid() {\n\t\treturn toError(result)\n\t}\n\n\treturn nil\n}\n\nfunc toError(result *gojsonschema.Result) error {","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/schema/schema.go#L64-L100","documentation":"Error \"unsupported Compose file version: %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/schema/schema.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}