build: upgrade typescript and align TD schema with W3C IRI standards#24
build: upgrade typescript and align TD schema with W3C IRI standards#24siddharthbaleja7 wants to merge 1 commit intoeclipse-thingweb:masterfrom
Conversation
|
Hi @egekorkan and @relu91 ! I've submitted this PR to resolve the TypeScript build blockers I encountered. I also took the opportunity to align the anyUri definition in the TD schema with the W3C IRI standards. This provides a stable foundation for the EdiTDor integration and ensures the validation logic is spec-compliant. I'm looking forward to your feedback! |
| "type": "string" | ||
| "type": "string", | ||
| "format": "iri-reference" |
There was a problem hiding this comment.
The validation schema should be compliant with https://github.com/w3c/wot-resources/blob/main/td/v1.1/validation/td-json-schema-validation.json, which does not have the format keyword. I don't remember why it was removed, but I recall it was problematic for some reason. @egekorkan do you remember?
There was a problem hiding this comment.
This was due to different implementations not validating it exactly correct. So we just say string now.
There was a problem hiding this comment.
Ok, we should then see how vscode interpret it. Do you have some test cases we can use?
This PR addresses build failures caused by a TypeScript version mismatch and improves schema validation.
Issues Fixed
^3.8.3, which is incompatible with newer type definitions in dependencies like@types/whatwg-url. This caused errors likeTS1109: Expression expectedduring compilation."format": "iri-reference"to theTD.schema.jsonto ensure proper validation of IRI references.Changes
typescriptdev dependency to^4.9.5in package.json."format": "iri-reference".Verification
npm installto update dependencies.npm run compileto verify the build succeeds.