I think you need to look at the MinOccurs
and MaxOccurs
on each field. MinOccurs
will be 1
for mandatory fields. Remember the Schema is an XSD.
There will be set to but there'sThere's probably a simpler way but I've never done this before.
See here for example of creating the fields: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-5A946CBF-36D3-4D11-BE04-4901F9ED88E3