Skip to content

Node validation #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ftomassetti opened this issue Feb 3, 2023 · 4 comments
Closed

Node validation #74

ftomassetti opened this issue Feb 3, 2023 · 4 comments

Comments

@ftomassetti
Copy link
Contributor

Should we have a standard way to report issues on nodes?

This could be useful for integrating editors with other components (i.e., editors would consume issues by displaying them).

It could also be useful if we wanted to have pipelines: a component could get a model, perform resolution on it, and add issues for things that are inconsistent (for example, calling a method with the wrong number of parameters).

@dslmeinte
Copy link
Contributor

I think it'd be useful, because it's a chance to define how to pinpoint a certain location within a model, e.g. (ID, [feature, [index within value]]).

@enikao
Copy link
Contributor

enikao commented Feb 3, 2023

I think we need to separate two cases:
a. How to handle technically invalid nodes sent along. There are different levels:

  • Invalid JSON (syntax error)
  • Missing / unknown JSON entries
  • Inconsistencies (e.g. parent/child mismatch)
  • Unknown node ids
  • Unknown concepts / features

b. Handle nodes inconsistent with metamodel, e.g.

  • Reference out-of-scope
  • child link not part of parent concept
  • constraint violations

For a), we need to think how a server reacts if it gets a "write request" where parts of the data is invalid. Don't do anything? Apply the valid changes? In the latter case, how do we report back which parts worked?

For b), I think we only need to talk about reporting -- each LIonWeb system needs to decide on its own how to handle them.

@joswarmer
Copy link
Contributor

Good separation of the two cases. The first one is essential for the API, as the client needs to know whether something sent is applied or not and why.

@enikao
Copy link
Contributor

enikao commented Aug 31, 2023

Relates to #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants