{"record":{"id":"036b513b93a007f3","repo":"quarkusio/quarkus","slug":"invalid-quarkus-extension-yaml-metadata-schema-v","errorCode":null,"errorMessage":"Invalid quarkus-extension.yaml metadata: <schema validation errors>","messagePattern":"Invalid quarkus-extension\\.yaml metadata: <schema validation errors>","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ExtensionMetadataValidator.java","lineNumber":54,"sourceCode":"            if (is == null) {\n                throw new IOException(\n                        \"Failed to load extension metadata schema from \" + ToolsConstants.EXTENSION_SCHEMA_RESOURCE);\n            }\n\n            final SchemaRegistry schemaRegistry = SchemaRegistry.withDefaultDialect(SpecificationVersion.DRAFT_2020_12);\n            schema = schemaRegistry.getSchema(is, InputFormat.JSON);\n            schema.initializeValidators();\n        }\n\n        final List<com.networknt.schema.Error> errors = schema.validate(extObject.toString(), InputFormat.JSON);\n        if (!errors.isEmpty()) {\n            final StringBuilder sb = new StringBuilder();\n            sb.append(\"Invalid \").append(BootstrapConstants.QUARKUS_EXTENSION_FILE_NAME).append(\" metadata:\");\n            for (com.networknt.schema.Error err : errors) {\n                sb.append(System.lineSeparator()).append(\"- \").append(err.getInstanceLocation()).append(\": \")\n                        .append(err.getMessage());\n            }\n            throw new IOException(sb.toString());\n        }\n    }\n}\n","sourceCodeStart":36,"sourceCodeEnd":58,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ExtensionMetadataValidator.java#L36-L58","documentation":"validate checks an extension descriptor object against the JSON Schema (draft 2020-12). When schema validation fails, all errors are collected into a single IOException whose message lists each instance location and message, prefixed 'Invalid quarkus-extension.yaml metadata:'.","triggerScenarios":"Calling validate(ObjectNode) with a descriptor whose content violates the schema: missing required fields (group-id/artifact-id/version/name), wrong types, unknown parent info, or malformed dependency entries.","commonSituations":"Hand-edited quarkus-extension.yaml; third-party/legacy extensions produced by old tooling; generated descriptors from custom build integrations missing newly-required schema fields after a Quarkus upgrade.","solutions":["Read each '- <location>: <message>' line in the error to identify the offending fields and fix the quarkus-extension.yaml accordingly","Regenerate the descriptor with the current Quarkus extension tooling (quarkus-maven-plugin extension goals) instead of hand-editing","Compare the descriptor against the schema resource shipped with your Quarkus version to see required fields"],"exampleFix":"// before\nname: \"\"            # empty name fails schema\nartifact: \"my-ext\"  # missing group/version\n// after\nname: \"My Extension\"\ndescription: \"An example extension\"\nartifact: \"com.example:my-ext::jar:1.0.0\"","handlingStrategy":"validation","validationCode":"// pre-check the essential required fields before validation\nif (extObject.path(\"group-id\").isMissingNode() || extObject.path(\"artifact-id\").isMissingNode()\n        || extObject.path(\"version\").isMissingNode()) {\n    throw new IllegalArgumentException(\"Descriptor missing group-id/artifact-id/version\");\n}\nExtensionMetadataValidator.validate(extObject);","typeGuard":null,"tryCatchPattern":"try {\n    ExtensionMetadataValidator.validate(extObject);\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"Invalid quarkus-extension.yaml\")) {\n        // e.getMessage() lists '- <location>: <message>' per error; log or surface them\n        throw new IllegalArgumentException(\"Fix descriptor fields listed in: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Generate descriptors with the current quarkus-maven-plugin instead of hand-editing","Re-validate extensions after Quarkus upgrades; schema requirements evolve","Keep group-id, artifact-id, version, and name fields present and non-empty"],"tags":["schema-validation","yaml","metadata"],"backgroundTag":"schema-validation-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}