Writing backend without good API documentation - b...
# ktor
n
Writing backend without good API documentation - bad practice. Now I use spring kotlin + RestDocs and want to see that ktor in the future have same ability. Description: Spring REST Docs helps you to document RESTful services. It combines hand-written documentation written with Asciidoctor and auto-generated snippets produced with Spring MVC Test. Writing unit tests for testing api and simultaneously generate json payloads and descriptions - is very good approach to have up2date documentation. Additionally RestAuto docs can help for using jdoc for automatically describing fields in json payloads. So question: Does ktor have any plans to make possible to generate Json’s body with payload descriptions via unit test like in Spring Rest Docs? Thanks!
👍 1
🤔 1
r
Why not just use Spring REST docs? I'm pretty sure you could use the REST-assured URI to connect to and document ktor endpoints.
n
Hm. Thanks for advice. I never touched the REST Assured so I do not think that it possible. Now I will try
r
Please let me know how it goes!
@Nail Gilaziev Before this thread is lost to Slack's /dev/null, how did it go?
n
My knowledge for now is next: Rest Assured can be used for testing ktor endpoints. But spring rest docs is available for spring only. So, maybe I can write unit tests in separate spring project - but it a huge lack of abilities