-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional attributes from System.ComponentModel namespace #1954
Comments
Is there any progress on this issue? It would be really good to have this because it allows to use framework-defined attributes to annotate classes, without a need to add additional assembly. Consider the following setup. There's a common library with business objects, having all the descriptions. And there's a number of services using this library, one of those provides web api with CRUD operations over the business objects, but other services have no relation to OpenAPI, and web at all. So to have the API service display a nice swagger UI it's necessary to add a reference to Instead of doing all this, it would be great to just use well-known and supported framework attributes. |
I've looked through the sources and was quite puzzled because Anyway I've quickly mocked a filter (based on |
@domaindrivendev I’m part of the API team at Criteo, and as such we provide common, generic, models to be used in our various internal and external APIs to have an homogenous input/output/error structure. As such we currently have to rely an xmlDoc/filters/customSchemaIds to fine tune the description and schemaIds for our generic models. But this require internal teams to correctly reference the correct assembly and inject the correct filters and such. And it’s quite hard to fully enforce that. So relying on DescriptionAttribute for schema/field description and DisplayNameAttribute for schemaId would be beneficial as those would not require any custom configuration. If the support of those attributes is still in line with the Swashbuckle roadmap, I would be happy to work on a PR :) |
For example:
The text was updated successfully, but these errors were encountered: