Skip to content

Validation feature implemented - #53

Merged
a77med-Ibrahim merged 1 commit into
mainfrom
52-validate-projects-without-building-them
Nov 4, 2026
Merged

a77med-Ibrahim merged 1 commit into
mainfrom
52-validate-projects-without-building-them

Conversation

@a77med-Ibrahim

Copy link
Copy Markdown
Member

Adds POST /api/vsum/validate, which checks a project like a build does before Maven runs, without building it. The platform calls it after every auto-save to show problems as warnings while users edit (vitruv-tools/Vitruv-UI-Methodologist#635).

  • Takes the same multipart input as /api/vsum/build.
  • Returns 200 with { valid, problems }, also for invalid projects; valid is false if there are any problems. Returns 400 only for malformed requests.
  • Runs the same checks through the same code: MetamodelProcessor and ReactionsProcessor now have a check(...) method that runs in memory, and process() calls it before writing the project.
  • Writes no project and doesn't run Maven, so no files are left in the build workspace.
  • Doesn't use the build slots (max-concurrent-builds), so it never waits behind a running build.
  • The README documents the endpoint.

Like the build, the checks stop at the first stage with problems: reactions are only checked once the metamodels are valid. Empty uploads are rejected with 400, as for builds.

@a77med-Ibrahim a77med-Ibrahim self-assigned this Nov 4, 2026
@a77med-Ibrahim a77med-Ibrahim linked an issue Nov 4, 2026 that may be closed by this pull request
@arlange

arlange commented Nov 4, 2026

Copy link
Copy Markdown
Member

Have a look at what I have implemented recently. Maybe you also want these errors explained so the users know what they should work on and correct.

@a77med-Ibrahim

Copy link
Copy Markdown
Member Author

@arlange
The problems are already explained: /validate returns the same problems as the build, including excerpt and hint from #48/#49. Or did you mean something else, e.g. telling users that "reactions weren’t checked because the metamodels have problems" ?

@a77med-Ibrahim
a77med-Ibrahim merged commit 9c5e4d4 into main Nov 4, 2026
5 checks passed
@a77med-Ibrahim
a77med-Ibrahim deleted the 52-validate-projects-without-building-them branch November 4, 2026 16:42
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.

Validate projects without building them

2 participants