private SwaggerDocument CreateDocument(WebApiToSwaggerGeneratorSettings settings)
        {
            var document = !string.IsNullOrEmpty(settings.DocumentTemplate)
                ? SwaggerDocument.FromJson(settings.DocumentTemplate)
                : new SwaggerDocument();

            document.Consumes = new List <string> {
                "application/json"
            };
            document.Produces = new List <string> {
                "application/json"
            };
            document.Info = new SwaggerInfo
            {
                Title       = settings.Title,
                Description = settings.Description,
                Version     = settings.Version
            };

            return(document);
        }
 /// <summary>Initializes a new instance of the <see cref="WebApiToSwaggerGenerator" /> class.</summary>
 /// <param name="settings">The settings.</param>
 /// <param name="schemaGenerator">The schema generator.</param>
 public WebApiToSwaggerGenerator(WebApiToSwaggerGeneratorSettings settings,
                                 SwaggerJsonSchemaGenerator schemaGenerator)
 {
     Settings         = settings;
     _schemaGenerator = schemaGenerator;
 }
 /// <summary>Initializes a new instance of the <see cref="WebApiToSwaggerGenerator" /> class.</summary>
 /// <param name="settings">The settings.</param>
 public WebApiToSwaggerGenerator(WebApiToSwaggerGeneratorSettings settings)
     : this(settings, new SwaggerJsonSchemaGenerator(settings))
 {
 }