Skip to content
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

Provide example data on definition properties #1091

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Provide example data on definition properties #1091

wants to merge 1 commit into from

Conversation

danpetitt
Copy link

By decorating a definition property with an xml comment, you will get proper 'live' sample data in the example section of a response.

Hope this is okay, not done many PRs before :-)

@heldersepu
Copy link
Contributor

Looks good, I like the idea!

And the <example> is not a new tag:
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/recommended-tags-for-documentation-comments

@danpetitt
Copy link
Author

Yeah thats why i did it that way, as i saw it being emitted into the XMLComments; i was originally doing a custom attribute in my own OperationFilter and thought there may be a more native way to do this.

@jcharlesworthuk
Copy link

+1 For getting this merged

@hfurubotten
Copy link

+1 from me as well on this. Not only will this make it easier to get more rich information in the UI, but also improve documentation a lot for many. At least will it help the team im on here tremendously.

This might also help on the issue reported on #1137, which we also are experiencing on many of our apis, by doing this correctly natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants