Skip to content

Provide example data on definition properties#1091

Open
danpetitt wants to merge 1 commit intodomaindrivendev:masterfrom
danpetitt:definition-property-example
Open

Provide example data on definition properties#1091
danpetitt wants to merge 1 commit intodomaindrivendev:masterfrom
danpetitt:definition-property-example

Conversation

@danpetitt
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

+1 For getting this merged

@hfurubotten
Copy link
Copy Markdown

+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