Skip to content

Conversation

@AlexPalaz
Copy link
Collaborator

@AlexPalaz AlexPalaz commented Oct 1, 2025

✅ What's been done

Fixed validation failures due to unknown YAML fields by sanitizing the YAML before passing it to the WASM validator.


✨ Features

  • YAML sanitization before validation: The editor now produces a clean, schema-compliant PublicCode and serializes it to YAML before validation. Unknown fields are dropped and structure is normalized.
  • WASM validator receives clean YAML: Prevents errors like field foobar not found in type publiccode.PublicCodeV0 caused by unexpected/unknown keys.
  • Showing Info alert during the import to explain which fields have been removed.

💥 Breaking changes

  • Sanitize YAML before validation inside the validatorFn

@AlexPalaz AlexPalaz requested a review from valeriocomo October 1, 2025 13:56
@vercel
Copy link

vercel bot commented Oct 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
publiccode-editor Ready Ready Preview Oct 1, 2025 2:03pm

@AlexPalaz AlexPalaz marked this pull request as draft October 1, 2025 14:06
@AlexPalaz AlexPalaz marked this pull request as ready for review October 10, 2025 14:04
@valeriocomo
Copy link
Member

fix #508 #510

Copy link
Member

@valeriocomo valeriocomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@valeriocomo valeriocomo merged commit 8b3656e into main Oct 13, 2025
9 checks passed
@valeriocomo valeriocomo deleted the fix/508-unrecoverable-validation-error branch October 13, 2025 08:14
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.

2 participants