I came across a scenario where i need to make the mandatory fields(required) to nonmandatory in one of the document service.
The requirement was Biz dont want to pass few mandatory fields values but they want us to initialize the values to them through number sequences.
In this case by default, the schema gets generated based on the mandatory fields that are set as mandatory in the table level.
To change this we need to make the fields as non mandatory so that schema gets changed and biz need not pass the these field values to create the new record.
As you know we have a AxBC classes for every table, just go that class for the table in the query you want make the fields as non mandatory.
Override the method initMandatoryFieldsExemptionList and write the below code for the required fields.
protected void initMandatoryFieldsExemptionList()
This should do the job for you provided when you redeploy the service that you want to see the changes for.