Swashbuckle.aspnetcore: Change name of model classes

Created on 17 Nov 2016  路  2Comments  路  Source: domaindrivendev/Swashbuckle.AspNetCore

Is there a way to change the name of the models in the Swagger definition? Our classes end in "DTO" and we would prefer to strip that from the documentation.

Most helpful comment

Or easier still, you can provide your own schema Id strategy with a call to _CustomSchemaIds_ as described here - https://github.com/domaindrivendev/Swashbuckle.AspNetCore#customize-schema-ids

All 2 comments

You can by implementing a ISchemaFilter and removing DTO from the schema name

Or easier still, you can provide your own schema Id strategy with a call to _CustomSchemaIds_ as described here - https://github.com/domaindrivendev/Swashbuckle.AspNetCore#customize-schema-ids

Was this page helpful?
0 / 5 - 0 ratings