code: function generateModelOpenApiSchema(schema, definitionName) {
      var oaSchema = {
        required: [],
        properties: {}
      };
      mergePaths(oaSchema, schema.paths, definitionName);
      mergePaths(oaSchema, schema.virtuals, definitionName);
  
      //remove empty arrays -> OpenAPI 3.0 validates 
      if (oaSchema.required.length === 0) {
        delete(oaSchema.required);
      }
      if (oaSchema.properties.length === 0) {
        delete(oaSchema.properties);
      }
      return oaSchema;
    }
docs: A method used to generate an OpenAPI model schema for a controller