Skip to content

feat(core): bundle process-model JSON schema in the jar - #86

Merged
emaarco merged 1 commit into
mainfrom
emaarco/bundle-json-schema-in-jar
Aug 19, 2026
Merged

feat(core): bundle process-model JSON schema in the jar#86
emaarco merged 1 commit into
mainfrom
emaarco/bundle-json-schema-in-jar

Conversation

@emaarco

@emaarco emaarco commented Aug 19, 2026

Copy link
Copy Markdown
Member

What

Ships the process-model JSON schema inside the bpmn-to-code-core JAR at a stable classpath location:

META-INF/bpmn-to-code/schema/process-model/2.0.json

Consumers can now load it off the classpath instead of hardcoding the JSON structure:

javaClass.getResourceAsStream("/META-INF/bpmn-to-code/schema/process-model/2.0.json")

Why

A downstream consumer generates test facades from our process JSON and today traverses it with hardcoded strings. Having the schema on the classpath lets them codegen against the actual contract.

How

  • processResources maps the existing docs/public/schema dir into the core main resources under the META-INF prefix — no file is duplicated; it stays the same single source docs publishes at the $schema URL.
  • ProcessJsonSchemaTest now validates against the packaged classpath path, proving the exact JAR entry is correct.

Not a breaking change.

Ship docs/public/schema on the core classpath at
META-INF/bpmn-to-code/schema/process-model/2.0.json so consumers can
read the schema off the classpath instead of hardcoding its structure.
Single source: the same file docs publishes at the $schema URL.
@emaarco
emaarco enabled auto-merge (squash) August 19, 2026 12:59
@github-actions

Copy link
Copy Markdown
Contributor

Test Coverage

Module Line Coverage
bpmn-to-code-core 97.6% (2244/2300 lines)
bpmn-to-code-gradle 25.7% (29/113 lines)
bpmn-to-code-maven 62.2% (28/45 lines)
bpmn-to-code-web 95.6% (196/205 lines)
bpmn-to-code-testing 97.2% (171/176 lines)
bpmn-to-code-runtime 100.0% (80/80 lines)

@emaarco
emaarco merged commit a1f9fe9 into main Aug 19, 2026
5 checks passed
@emaarco
emaarco deleted the emaarco/bundle-json-schema-in-jar branch August 19, 2026 13:01
This was referenced Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant