src/Controller.js
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;
  }
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;
  }
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 ; }
A method used to generate an OpenAPI model schema for a controller
A method used to generate an OpenAPI model schema for a controller