papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
241 stars 42 forks source link

create tag with name and description #46

Closed y9san9 closed 4 years ago

y9san9 commented 4 years ago

inline fun NormalOpenAPIRoute.tag(name: String = "", description: String = "", crossinline fn: NormalOpenAPIRoute.() -> Unit) { tag(object : APITag { override val description = description override val name = name }, fn) } Sorry now I have a little bit time to create PM. You can add this code to create tags with name and description instead of implementing interface (or write if this functionality already exists)

Wicpar commented 4 years ago

This can create bugs of you define multiple ones with the same name, i have to rework the tag system if you want to be able to define them like that.

y9san9 commented 4 years ago

Thanks, I have checked first reply and now I've reworked my tags with enums. That's better and it's not important to implement my way of creating tags