Skip to main content
Solved

Schema validation inconsistencies when publishing data model through UI


The change in the requiredness of one of the field is not consistently validated across all the inherited types.

Below works and the data model is published.

Data Model Version - 1

interface Person @view(version: "1"){

name: String

}​​​​​​​

type Actor implements Person @view(version: "1") {​​​​​​​​​​​​

 name: String

 didWinOscar: Boolean

}​​​​​​​​​​​​

Next step

Below doesn't work and I get an error "Can not change the nullability of the property\n We do not support modifying a field's 'required'ness at the moment."

interface Person @view(version: "2"){​​​​​​​​​​​​​​​​

name: String!

}​​​​​​​​​​​​​​​​

type Actor implements Person @view(version: "2") {​​​​​​​​​​​​​​

 name: String!

 didWinOscar: Boolean

}​​​​​​​​​​​​​​

Next step

Below works

interface Person @view(version: "2"){​​​​​​​​​​​​​​​​

name: String

}​​​​​​​​​​​​​​​​

type Actor implements Person @view(version: "2") {​​​​​​​​​​​​​​

 name: String!

 didWinOscar: Boolean

}​​​​​​​​​​​​​​

Best answer by Dilini Fernando

Hi @Shreyas Mehta,

I hope above issue is solved. As of now, I will solve this thread. Please feel free to create a new post if you still experience problems.

Best regards,
Dilini

View original
Did this topic help you find an answer to your question?

3 replies

Hi,

Thank you for the report! This is indeed a bug, however this should not affect the underlying container, so the ‘name’ in this case will still be nullable.


 


Anita Hæhre
Seasoned Practitioner
Forum|alt.badge.img+1
  • Head of Academy and Community
  • 590 replies
  • April 13, 2023

Hi @Shreyas Mehta checking if the above is resolved or if you could need more help from us on the matter? 


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 671 replies
  • Answer
  • April 26, 2023

Hi @Shreyas Mehta,

I hope above issue is solved. As of now, I will solve this thread. Please feel free to create a new post if you still experience problems.

Best regards,
Dilini


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings