-
Notifications
You must be signed in to change notification settings - Fork 6k
[ASP.NET Core] Operation now returns StatusCode Stubs as well #7098
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
Conversation
|
@knom Thanks this is a really helpful addition. My only comment is more of a question (or suggestion). Rather than returning actual code, couldn't we just document the returns as todos themselves, for example: Reason I ask is because many people use static code analysis and |
|
@jimschubert: Should I update it or will you? |
|
@knom If you could, it would be faster. I don't have push access to the repo. I really appreciate the contributions! |
return StatusCode(..) is now commented out.
|
@jimschubert all done! |
default(dataType) --> default(&dataType)
| { {{#responses}}{{#dataType}} | ||
| //TODO: Uncomment the next line to return response {{code}} or use other options such as return this.NotFound(), return this.BadRequest(..), ... | ||
| // return StatusCode({{code}}, default({{&dataType}})); | ||
| {{/dataType}}{{^dataType}} |
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.
@knom Please use the following instead to allow empty lines with spaces:
{{#dataType}}
...
{{/dataType}}
{{^dataType}}
....
{{/dataType}}
|
@knom please run |
|
Just updated the formatting! Your comment wasn't fully clear to me.. THANKS! |
| "Newtonsoft.Json": "9.0.1" | ||
| "Newtonsoft.Json": "10.0.3", | ||
| "JsonSubTypes": "1.1.3" | ||
| }, |
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.
This is not part of my updates.. note sure why this is changing...
| [EnumMember(Value = "sold")] | ||
| SoldEnum | ||
| SoldEnum = 3 | ||
| } |
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.
This is not part of my updates.. note sure why this is changing...
| [EnumMember(Value = "placed")] | ||
| PlacedEnum, | ||
| PlacedEnum = 1, | ||
|
|
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.
This is not part of my updates.. note sure why this is changing...
| /// Add a new pet to the store | ||
| /// </summary> | ||
| /// <remarks></remarks> | ||
|
|
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.
This is not part of my updates.. note sure why this is changing...
Yup, sorry that I wasn't clear. |
@mandrean @jimschubert
#7097
This uses this.StatusCode(..) to render more verbose STUBS for the Controllers.
So people that are less familiar with ASP.NET Core can understand how it works..