Custom schema name in NSwag
14:27 03 Jun 2019

I've gone through lots of documentation and searching the internet, however I am not able to find how could I do the following using NSwag:

services.AddSwaggerGen(c =>
{
    c.CustomSchemaIds(type => type.FullName);
};

This is taken from Swashbuckle and I'm looking for equivalent in NSwag.

I want this because I've got nested DTO classes, which appear with numbered suffixes, I want to be able to distinguish these DTOs by parent class + the actual DTO instead of numbered suffixes: enter image description here

using System.Collections.Generic;

namespace Blog.Api.Responses
{
    public class IndustriesResponse : List
    {
        public class IndustryDto
        {
            public string Code { get; set; }
            public bool IsEditable { get; set; }
        }
    }
}
using System.Collections.Generic;

namespace Blog.Api.Requests
{
    public class UpdateIndustriesRequest : List
    {
        public class IndustryDto
        {
            public string Code { get; set; }
            public bool IsEditable { get; set; }
        }
    }
}
nswag