Skip to content

Conversation

@RajvardhanT7747
Copy link

This PR improves Swagger/OpenAPI documentation for two REST controllers:

  • PackageController
  • ProjectController

The goal is to document all possible HTTP response codes properly, as currently most APIs only show 200 in Swagger.

Changes done:

  • Added missing @apiresponse annotations for common response codes such as 200, 201, 400, 401, 403, 404, 409 and 500
  • Updated @operation descriptions where required to better explain API behavior
  • Ensured the annotations reflect actual behavior based on security checks, exceptions and API semantics

Important notes:

  • No core logic is changed
  • No API behavior is modified
  • This is documentation-only improvement

Testing:

  • Project builds successfully after the changes
  • Application starts without errors
  • Swagger/OpenAPI annotations are picked up during build

Since there are many controllers in the codebase, I have started with these two files.
If this approach looks correct, I can apply the same pattern to the remaining controllers.

Please let me know if any changes or improvements are needed.

heliocastro
heliocastro previously approved these changes Dec 19, 2025
Copy link
Contributor

@heliocastro heliocastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

@heliocastro
Copy link
Contributor

@RajvardhanT7747 You have to fix some issues..

@heliocastro heliocastro self-requested a review December 19, 2025 07:23
@RajvardhanT7747
Copy link
Author

@RajvardhanT7747 You have to fix some issues..

Thanks for pointing this out.
I’ll review the failing checks and required items, address them, and update the PR shortly.
I’ll keep you posted.

@RajvardhanT7747
Copy link
Author

RajvardhanT7747 commented Dec 19, 2025

hey @heliocastro , I’ve resolved the conflicts, updated the commit author to match my signed ECA, and force-pushed the changes.
The checks are re-running now. Please let me know if anything else is needed.

@RajvardhanT7747 RajvardhanT7747 force-pushed the feature/swagger-annotations-update branch 4 times, most recently from db31968 to 0612fe3 Compare December 19, 2025 08:58
@RajvardhanT7747
Copy link
Author

Hey @heliocastro ,

Sorry for taking a bit more of your time. While addressing the CI and ECA checks, I had to make a few additional changes and resolve some conflicts, so I’ve updated the PR again.

Could you please take another look when you get a chance and let me know if everything looks fine now?

I really appreciate your patience and guidance — I was running into quite a few first-time contributor issues here.

Thanks a lot!

@RajvardhanT7747
Copy link
Author

Hi team , @heliocastro @amritkv,

The CI is failing due to a CouchDB _users database issue in the test environment. This appears to be a CI infrastructure issue unrelated to my documentation changes (Swagger annotations only).

The error: "chttpd_auth_cache changes listener died because the _users database does not exist"

Could you please check the CI setup? My changes don't modify any database-related code.

Thank you!

@RajvardhanT7747
Copy link
Author

Hey @heliocastro ,

My PR is failing in CI with a CouchDB _users database error. Since I only added Swagger annotations (no database changes), this seems like a CI infrastructure issue.

Should I:
Fix the CI workflow myself and include it in this PR ?
Create a separate PR for the CI fix ?
Wait for maintainers to fix the CI ?

What would you recommend?

@RajvardhanT7747 RajvardhanT7747 force-pushed the feature/swagger-annotations-update branch from e4169a7 to 2e6cab2 Compare December 19, 2025 15:00
@RajvardhanT7747
Copy link
Author

Hi @heliocastro ,

Thank you so much for your support . The ECA issue is resolved now and that check is passing.
The remaining blocker seems to be the CI build failure.

Could you please let me know how you’d prefer I proceed here , should I investigate and fix the CI failure on my side, or is this something a maintainer usually handles ?

Happy to take care of it either way.
Thanks!

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Dec 22, 2025
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @RajvardhanT7747 , the documentation changes you have done are acceptable. We just need to be careful about what possible error the endpoint can throw.

In addition, your PR is very difficult to review as it contains lot's of unnecessary changes (mostly formatting). Please do not change lines which are irrelevant for this PR, it makes it very hard to find the actual changed lines and connect the dots.

@GMishx
Copy link
Member

GMishx commented Dec 30, 2025

Also, your code is not compiling in the test cases. Please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants