In the previous post, I introduced Swagger and showed how to set up your project for Swagger. In this post I will show how to add Swagger comments to annotate your program.
In earlier posts we looked at the database of cars and the Get method that retrieves the entire list. That can be quite a lot of data going over the wire. What we want instead is to send pages. I’ll show that briefly and then we’ll annotate that code.
In the CarController we’ll have a Get method that takes three parameters: showDeleted, pageNumber and pageSize. The first we’ve seen before, it determines whether the list returned to the caller will include our deleted records. The second, pageNumber, will designate which page of data we want to return (zero based). The third parameter, pageSize, will designate how many records to return per page.
Thus, if we were to write
Get(false,3,4)
we would expect to get back records 17, 18, 19 and 20, because page 0 would have records 1-4, page 1 would have 5-8, etc.
Here is the compete endpoint that will directly call our repository (we won’t bother with a service for this example).
public async Task<IEnumerable<Car>> Get([FromRoute] bool showDeleted, int pageNumber, int pageSize )
{
return await _carRepository.Get(showDeleted, pageNumber, pageSize);
}
When the repository is called, the parameters are passed in, and it does its magic. For now, however, we are only concerned with documenting this method. We do that with XML comments, designated by three forward slash marks (///).
First, we will document the purpose of the endpoint; that is, what it does. We do that in the summary
/// <summary>
/// Get all the cars in the Database
/// </summary>
Next, we want to document the parameters
/// <param name="returnDeletedRecords">If true, the method will return all the records,
/// including the ones that have been deleted</param>
/// <param name="pageOffset">which page to display</param>
/// <param name="pageSize">how many records to display per page</param>
Finally, I’m going to document the possible response codes. Note, these are, by no means, all that you can document, but they’ll give us a good idea of how it is done
/// <response code="200">Cars returned</response>
/// <response code="404">Specified Car not found</response>
/// <response code="500">An Internal Server Error prevented the request from being executed.</response>
When an error is encountered and we return one of these codes, the text we’ve specified goes along for the ride, which is enormously helpful to the calling client.
At the top of the swagger page is our summary

At each parameter is our designated text

Finally, each of the error codes is documented

It is a best practice to document all of the endpoints. Many developers go further, and document all of the methods in both the service and the repository; that is a decision to be made by the team. Since the endpoint is the only thing visible to the client, it has the greatest claim on your time and effort. Remember, “comments rust,” and that is as true for Swagger comments as any other.






































XRumer представляет собой популярным программным комплексом для автоматизированной регистрации и постинга на блогах.
Софт умеет решать различные ограничения, включая Captcha.
Массовое использование веб-ресурсов обеспечивает быстро увеличивать обратные ссылки.
прогоны XRumer
Большинство вебмастера задействуют вышеупомянутый комплекс для продвижения в проблемных нишах.
Функционирование с софтом этим комплексом предполагает сноровки и точных настроек.
Иначе есть риск заработать бан от ПС и снижение позиций.
Несмотря на минусы, спрос на подобные программы держится стабильным.
Have you ever considered publishing an ebook or guest authoring on other sites?
I have a blog based on the same information you
discuss and would love to have you share some stories/information.
I know my subscribers would value your work.
If you are even remotely interested, feel free to shoot me an e-mail.
เบทฟิก
Quick question — does this approach still work if the conditions are slightly different? I’d love to see a follow-up on that.
Часы Audemars Piguet 15407ST является выдающимся образцом в часовой индустрии.
Ключевая особенность этой модели Royal Oak — полностью открытый скелетонизированный механизм.
Благодаря сдвоенному балансирному колесу обеспечивается высокая стабильность хода.
Стальной корпус диаметром 41 миллиметр отлично лежит на руке.
Заводная головка и зеркальные фаски демонстрируют фирменный почерк бренда.
Толщина корпуса равняется всего 9,9 миллиметра, что де лает часы комфортными в ежедневном использовании.
Автономность механизма 3132 достигает примерно 45 часов работы.
Данные часы производится небольшим тиражом, что превращает её в объект вожделения для коллекционеров.
pinterest.com
Часы AP 15407st является уникальным образцом в мире часов.
Ключевая изюминка этой модели Royal Oak — абсолютно сквозной скелетонизированный механизм.
За счёт двойному балансирному колесу достигается высокая стабильность хода.
Стальной корпус диаметром 41 миллиметр отлично сидит на руке.
Заводная головка и зеркальные фаски подчёркивают узнаваемый почерк марки.
Толщина модели составляет всего 9,9 мм, что делает их удобными в повседневной носке.
Запас хода калибра 3132 достигает примерно 45 часов.
Данные часы выпускается небольшим тиражом, что делает её в объект охоты для ценителей.
pinterest.com
这里有您最想看的精彩影视内容,欢迎在线点播哪吒之魔童闹海剧情介绍
What’s up, after reading this awesome post i am as well glad to share my knowledge here with friends.
在线购买大麻用于XXX成人色情视频
โพสต์นี้ มีประโยชน์มาก ค่ะ
ผม ไปเจอรายละเอียดของ หัวข้อที่คล้ายกัน
ดูต่อได้ที่ Darell
เผื่อใครสนใจ
เพราะให้ข้อมูลเชิงลึก
ขอบคุณที่แชร์ เนื้อหาดีๆ
นี้
และหวังว่าจะมีข้อมูลใหม่ๆ มาแบ่งปันอีก
Cialis 20mg price in USA Cialis 20mg price Cialis 20mg price in USA
нажмите https://hpc.name/thread/f400/106473/kak-skompilirovat-skript-autoit-au3-v-exe-fayl-s-ikonkoy.html
сайт https://hpc.name/thread/j122/128688/kak-nastroit-skud-na-bronirovannuyu-dver-dlya-vygruzki-dannyh-na-server.html
подробнее https://hpc.name/thread/d671/95879/kak-otsledit-sobytie-perehoda-na-stranicu-s-ispolzovaniem-redux-i-react-router.html
Wonderful data. Cheers. https://issuu.com/bfservice
cipheredge – Overall, professional vibe here; trustworthy, polished, and pleasantly minimal throughout.
Incredible loads of superb advice. https://www.demilked.com/author/sphynxdoll95/
Howdy! This is my 1st comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading your articles. Can you suggest any other blogs/websites/forums that deal with the same topics? Appreciate it!
Wolf Gold
How to Find the Best Active Adult 18 Communities on Telegram (2026 Guide)
How To Get Free Damian Box in Brawl Stars
На этом этом портале содержится нужная сведения.
На этом портале вы сможете обнаружить много полезного для своего развития.
Этот ресурс дает возможность понять в многих ситуациях.
Рекомендуем внимательно ознакомиться с представленные здесь материалы.
https://egomoda.ru/read/2026-04-15-materialy-i-tekhnologii-kak-audemars-piguet-sozdaet-royal-oak
โพสต์นี้ อ่านแล้วเข้าใจง่าย ครับ
ผม ไปเจอรายละเอียดของ ข้อมูลเพิ่มเติม
สามารถอ่านได้ที่ fast789 auto
เผื่อใครสนใจ
เพราะให้ข้อมูลเชิงลึก
ขอบคุณที่แชร์ บทความคุณภาพ นี้
และหวังว่าจะได้เห็นโพสต์แนวนี้อีก
Thanks for any other fantastic article. The place else may just anybody get that kind of info in such an ideal way of writing? I’ve a presentation next week, and I am at the search for such information.
no deposit bonus
Really loads of fantastic information. https://www.blurb.com/user/pigeffect3
It’s really helpful to see how XML documentation directly translates into a more readable Swagger UI. I’ve often neglected documenting the response codes, but seeing how much clarity that provides for the calling client makes it clear why it should be standard practice.
บทความนี้ มีประโยชน์มาก ครับ
ผม ไปอ่านเพิ่มเติมเกี่ยวกับ เรื่องที่เกี่ยวข้อง
ดูต่อได้ที่ สล็อตออนไลน์
ลองแวะไปดู
เพราะให้ข้อมูลเชิงลึก
ขอบคุณที่แชร์ ข้อมูลที่มีประโยชน์
นี้
และหวังว่าจะมีข้อมูลใหม่ๆ มาแบ่งปันอีก
References:
Swift Casino Quickspin
References:
https://gitea.morawietz.dev/camilledrigger
The CBD amassment – gummies for focus offers a medley of formats that please different preferences, and each undivided feels ok executed. The lubricant appears blameless and compatible, the packaging materials sensible of sturdy, and the layout is unostentatious until now elegant. The products are quiet to assemble and fraternize with, thanks to make fast lids and aphoristic sizing. Total, the label delivers a proficient and carefully crafted test without unnecessary extras.
strategystore – Mobile version looks perfect; no glitches, fast scrolling, crisp text.
metricmarket – Bookmarked this immediately, planning to revisit for updates and inspiration.
References:
Buy testosterone safe online
References:
https://onlinevetjobs.com/author/ghanalisa9/
check it out https://yomix.biz/
I’m amazed, I have to admit. Seldom do I encounter a blog
that’s both equally educative and entertaining, and let me tell you, you have hit the nail on the head.
The issue is something which too few men and women are speaking intelligently about.
Now i’m very happy I stumbled across this
during my search for something regarding this.
searchpilot – Appreciate the typography choices; comfortable spacing improved my reading experience.
algorankai – Color palette felt calming, nothing distracting, just focused, thoughtful design.
my latest blog post https://daobase.io/
smarttrafficai – Loved the layout today; clean, simple, and genuinely user-friendly overall.
searchboosters – Color palette felt calming, nothing distracting, just focused, thoughtful design.
Amazing tons of great information. https://rentry.co/qzapyacf
why not try here https://daobase.io/
adrankerai – Mobile version looks perfect; no glitches, fast scrolling, crisp text.
you could try these out https://bitmix.app
hop over to this site https://daobase.io/
you could try these out https://mixmy.money/
canadian pharmacies Canadian Tabs Canadian Tabs
Thanks , I have recently been looking for info approximately
this topic for ages and yours is the greatest I’ve found out so far.
However, what about the conclusion? Are you sure about the supply?
Useful forum posts, Cheers. https://www.wall-bookmarkings.win/betflix-sl-xtfrkhe-rdt-ped-xokas-chna-ngay-dwykhe-rdtfr-laea-betflix-web-trng-thm-rabb-say-trng-sb-rkar-phr-xm-the-khn-kh-kem
I’m really impressed with your writing skills as well as with
the layout on your blog. Is that this a paid theme or
did you customize it your self? Either way stay
up the excellent quality writing, it is uncommon to see
a great weblog like this one nowadays..
A CBD balm from this brand has a winning, even consistency that spreads easily. The container is compact and travel-friendly, and the lid closes securely. The scent is light and botanical, which makes it lovely to keep nearby.
Wonderful posts With thanks! https://www.hometalk.com/member/235000510/juan1524562
I was curious if you ever thought of changing the layout of your site?
Its very well written; I love what youve got
to say. But maybe you could a little more in the way of content so people could connect with it better.
Youve got an awful lot of text for only having 1 or 2 images.
Maybe you could space it out better?
A CBD balm and https://www.nothingbuthemp.net/products/indica-gummies from this mark has a orderly, even consistency that spreads easily. The container is consolidated and travel-friendly, and the lid closes securely. The smell is light and botanical, which makes it lovely to put nearby.