feat(verification): add XML Schema, OpenAPI, and Avro Docker verification targets - #270
Merged
Conversation
- Introduced XML Schema as a new target in the Docker verification setup. - Updated package.json, Dockerfiles, and entrypoint scripts to support XML Schema validation using xmllint. - Added a new validation test for XML Schema to ensure proper generation and verification. - Enhanced the verification manifest to include XML Schema as a target. This commit expands the verification capabilities to include XML Schema, ensuring a consistent environment for testing and validation. Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
…ification - Introduced OpenAPI and Avro as new targets in the Docker verification setup. - Updated package.json and package-lock.json to include necessary dependencies for OpenAPI and Avro. - Enhanced the verification manifest and Docker configuration to support validation for OpenAPI and Avro. - Added skip reasons for specific test cases related to OpenAPI and Avro in the verification tests. This commit expands the verification capabilities to include OpenAPI and Avro, ensuring a consistent environment for testing and validation. Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
…ignment for consistency Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
Contributor
Author
|
@DianaLease @ekarademir and if possible @mttrbrts , please review and approve this, |
ekarademir
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the Docker based codegen verification harness with three new schema targets: XML Schema, OpenAPI, and Avro. Each target gets a Docker image, an entrypoint that generates from the corpus and runs an external validator, a local Mocha verification test, registration in
verification/docker/targets.jsonandscripts/verification/docker-run.js, averify:docker:<target>npm script, and a matrix entry in.github/workflows/verify-codegen.yml.Where generated output is known to be rejected by the external tool because of existing visitor limitations, the affected case and target pairs are skipped with an explicit reason (same pattern as protobuf, graphql, rust, and java).
Changes
Shared wiring
xmlschema,openapi, andavroinverification/docker/targets.json.scripts/verification/docker-run.jsTARGETSto include all three.verify:docker:xmlschema,verify:docker:openapi,verify:docker:avro.verify-codegenGitHub Actions matrix.test/verification/cases.jsand, for the Docker corpus metamodel case, inverification/corpus/manifest.json.XML Schema (
xmlschema)verification/docker/xmlschema/Dockerfileandentrypoint.sh.libxml2-utilsand downloads the W3C XML Schema for Schemas (XMLSchema.xsd) at build time..xsdvia CLI targetXMLSchema, then validates each file withxmllint --noout --schemaagainst the bundled meta schema.test/verification/xmlschema.validate.test.js: generates withXmlSchemaVisitor, validates withxmllint --schema. Locally skips the suite whenxmllintis not installed. Falls back to the W3C URL if the local meta schema path is missing (override withXMLSCHEMA_META_SCHEMA).OpenAPI (
openapi)verification/docker/openapi/Dockerfile,entrypoint.sh, andredocly.yaml(extends: minimal).@redocly/cli@1.34.3globally. Entrypoint generates via CLI targetOpenApi, then runsredocly linton eachopenapi.json.test/verification/openapi.validate.test.js: generates withOpenApiVisitor, lints with the local@redocly/clipackage (devDependency) viarequire.resolveandnode, so no global CLI install is required on developer machines.verification/docker/openapi/redocly.yamlconfig locally (override withREDOCLY_CONFIG).Avro (
avro)verification/docker/avro/Dockerfileandentrypoint.sh.avro-tools-1.12.0.jar. Entrypoint generates via CLI targetAvro, then runsjava -jar … idlon each.avdl.test/verification/avro.validate.test.js: mirrors the Java Jackson jar pattern. Downloadsavro-tools-1.12.0.jarfrom Maven Central intoverification/templates/on first run when missing (override withAVRO_TOOLS_JAR). Only skips when Java is not installed.verification/templates/avro-tools-*.jar(same approach asjackson-annotations-*.jar).Skips (what and why)
These skips document known visitor output issues. They are not Docker or harness bugs. Fixing them belongs in follow up visitor PRs (plus snapshot updates).
Avro: illegal versioned namespaces
AvroVisitoremits@namespace("concerto.decorator@1.0.0")(and similar). Avro IDL rejects that namespace because version segments such as0are illegal identifiers (SchemaParseException: Illegal name: 0).metamodelavroconcerto.decorator@1.0.0hr_baseavrohr_integrationavrostringlengthavromodel-baseavroagreementavrocircularavroDocker corpus: metamodel case also skips
avrofor the same reason inverification/corpus/manifest.json.OpenAPI:
$decoratorsand invalid schema nestingOpenApiVisitorembeds JSON Schema fromJSONSchemaVisitor. That payload includes$decorators(and in some graphs invalidschemanesting) which Redocly's OpenAPI struct rules reject. Component map keys with@in FQNs also warn under Redocly naming rules; the hard failures that forced skips are the struct errors.hr_integrationopenapi$decoratorsand invalid schema nesting fail OpenAPI struct validationmodel-baseopenapi$decoratorsfail OpenAPI struct validationagreementopenapi$decoratorsfail OpenAPI struct validationCases that still run for OpenAPI (for example
metamodel,hr_base,stringlength,circular) lint clean under the current minimal Redocly config.Unrelated existing skips (unchanged intent)
Other skips already present for protobuf, graphql, rust, java, and csharp remain; this PR does not change their meaning. New
avro/openapientries were added alongside them where needed.Flags
xmllint(libxml2). Without it, those tests are pending rather than failing.@redocly/clifromdevDependencies; Docker still installs it globally in the target image.XMLSchema.xsd, Maven/Apacheavro-tools, npm@redocly/cli).AvroVisitorsanitizes versioned namespaces and when OpenAPI generation stops emitting non OAS$decorators(or maps them tox-extensions).Screenshots or Video
N/A. Verification is exercised via Mocha (
npm run test:verify) and Docker (npm run verify:docker:xmlschema,verify:docker:openapi,verify:docker:avro).Author Checklist
--signoffoption of git commit.mainfromfork:branchname