I am working on a multitenant service, where each tenant can have their schema (data fields).
For example, if a sushi restaurant is signed up for the service then they will create a sushi menu (schema) that their customer can order from.
If burger restaurants sign up for the service, then they will create a burger menu (schema) that their customer can order from.
Just like Uber Eats.
QUESTION
I am using NoSql DB, so storing the various schema is not an issue, but how do I store the allowed schema(data fields) created by the tenant (restaurant owner) and verify in the backend that the orders placed by the customers are satisfying the schema requirements before storing in the DB?
I need to make sure the order placed satisfies the schema since the customer can use API as well instead of web UI.
I am using Golang for backend.
Thank you