Skip to content
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

Use generics for documentation instead of class parameters #1

Closed
Burtan opened this issue Sep 9, 2022 · 1 comment
Closed

Use generics for documentation instead of class parameters #1

Burtan opened this issue Sep 9, 2022 · 1 comment

Comments

@Burtan
Copy link

Burtan commented Sep 9, 2022

Hey,

what about the following:

            request {
                body(GetItemParams::class)
            }
            response {
                HttpStatusCode.OK to {
                    body(GetItemResponse::class)
                }
            }

replaced by this:

            request {
                body<GetItemParams>()
            }
            response {
                HttpStatusCode.OK to {
                    body<GetItemResponse>()
                }
            }

It is less to write and you can use generics:

            request {
                body<GetItemParams>()
            }
            response {
                HttpStatusCode.OK to {
                    body<GetItemResponse<FirstItem>>()
                }
            }
@SMILEY4
Copy link
Owner

SMILEY4 commented Sep 9, 2022

Hey,

good idea! Thanks for the suggestion. I'll try it and see where it leads.

@SMILEY4 SMILEY4 closed this as completed Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants