-
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
Add examples to XML params #1629
Add examples to XML params #1629
Conversation
test/WebSites/CliExampleWithFactory/wwwroot/api-docs/v1/*.json | ||
*ncrunch* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the NCrunch test runner so I added this. I can remove it if you prefer.
Hi @mattfrear, when do you think it would be possible to accept other datatypes e.g. guids rather than just primitive data types? Love the work you are doing btw! |
Hi. Would you mind if I ask why did you put examples under the parameter's schema? I think it would've generated a more concise document if you put it |
That's a good question. I didn't know that XmlCommentsParameterFilter exists. I added it to the schema.Example because I was copying the existing logic which sets schema examples from XML comments. |
@mattfrear Thank you for the clarification 👍 |
Hi Matt, love your work! would you please add an example for IList param type? Is it supported? |
Yes @gohawks3, lists are supported, see this comment: |
Fixes #1628.
I ensure the example type is the correct type and not always a string.
Includes unit tests and updated Readme.