Hi Yusuf,
If you want to make required field in REST API, you have to use path parameters in REST API.
Check this article
To clarify, I am working on setting up a REST service in Mendix, and I am using a YAML file to configure our API in the Azure API Portal. My main challenge is making certain fields appear as required in the Swagger documentation generated from this YAML file. This requirement is not currently visible in the API Portal because the YAML file does not specify which fields are mandatory.