Skip to content

Increase manifest validation - #40

Open
matthieubosquet wants to merge 1 commit into
mainfrom
improve-manifest-validation
Open

matthieubosquet wants to merge 1 commit into
mainfrom
improve-manifest-validation

Conversation

@matthieubosquet

Copy link
Copy Markdown
Contributor

Validate parameter names, datatypes, frames and paths in the manifest

Some manifest mistakes passed build-time validation and then made the app return 500s, including /, /openapi.json and MCP tools/list for every tool. They now fail the build with an NQ1003 error that says what is wrong.

New validation rules

  1. Parameter :name is required, appears once, and contains only letters, digits and _.
  2. Parameter names are unique within an endpoint, ignoring case (case-insensitive, like query-string matching).
  3. Parameter :datatype must be an IRI (xsd:integer, not "integer").
  4. Endpoint :frame must be an xsd:anyURI starting with ./, like :sparql.
  5. Endpoint :path must not start with /. Such endpoints built fine but always returned 404.

Other changes

  • The README manifest tables document these rules.
  • New ValidatorTests cover each rule, plus one valid typed parameter.

This branch has not been deployed

No deployments
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