-
Notifications
You must be signed in to change notification settings - Fork 46
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
Include function annotations in request attribute #759
base: master
Are you sure you want to change the base?
Conversation
c8bbdd2
to
2868a6a
Compare
@Foso sorry for being impatient but can I have this looked at and merged? |
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.
Hi @dewantawsif thank you for your pull request! I looked at it, but for me it's not working. I can only find the annotations from Ktorfit and nothing else. Also please write a test for the code generation
![Screenshot 2025-02-03 at 19 23 47](https://private-user-images.githubusercontent.com/5015532/409238455-ef18ef01-3679-4cbf-ad28-b715b9ba7874.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTUwNzUsIm5iZiI6MTczOTU1NDc3NSwicGF0aCI6Ii81MDE1NTMyLzQwOTIzODQ1NS1lZjE4ZWYwMS0zNjc5LTRjYmYtYWQyOC1iNzE1YjliYTc4NzQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTczOTM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjA5YWEwZDdkMTkwM2ViNjY2YTU2YmE2MzkyNWM5NTg3OTgwMzA2OGRiYzFiMTM2MGMwZjcwZjU1YTFjY2ZlNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.d6R9ItM31HwWB_NLjzYmPEaXRrQeog7ygt3VvqrV5ts)
Hi @Foso I've did my own testing and even looked at the generated code and everything seems to be working fine. But I did notice that you've added the annotation to
If this isn't the issue please let me know the steps you took to test the code so I could try to reproduce. |
I changed the file name 😕 |
@dewantawsif Your code is working, but i'm thinking about if we should limit the functionality to non-Ktorfit annotations. Currently all information of the Ktorfit annotations gets added to the RequestBuilder and to the attributes. I think that unnecessarily bloats the source files of the implementation class. When someone creates a ClientPlugin and has access to the HTTPRequestBuilder they can already use it to access things like request method, headers, etc . |
Yeah that makes sense. I'll exclude the following ktorfit annotations: GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH, Headers, FormUrlEncoded, Multipart and Streaming |
Closes #751
🤔 DOD Checklist