NSwag.SwaggerDocument.SwaggerDocument C# (CSharp) Method

SwaggerDocument() public method

Initializes a new instance of the SwaggerDocument class.
public SwaggerDocument ( ) : System.Collections.Generic
return System.Collections.Generic
        public SwaggerDocument()
        {
            Swagger = "2.0";
            Info = new SwaggerInfo();
            Schemes = new List<SwaggerSchema>();
            Responses = new Dictionary<string, SwaggerResponse>();
            SecurityDefinitions = new Dictionary<string, SwaggerSecurityScheme>();

            Info = new SwaggerInfo
            {
                Version = string.Empty,
                Title = string.Empty
            };

            Definitions = new ObservableDictionary<string, JsonSchema4>();

            Paths = new ObservableDictionary<string, SwaggerOperations>();
            Paths.CollectionChanged += (sender, args) =>
            {
                foreach (var path in Paths.Values)
                    path.Parent = this;
            };
        }