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

chore: Remove swagger docs #220

Merged
merged 4 commits into from
May 15, 2024

Conversation

Ratnesh2003
Copy link
Contributor

@Ratnesh2003 Ratnesh2003 commented May 15, 2024

User description

Description

  • Removed the initialisation of the swagger docs from main.ts.
  • Also removed all the tags for swagger docs which won't be required.

Fixes #218

Mentions

@rajdip-b

Screenshots of relevant screens

Add screenshots of relevant screens

Developer's checklist

  • My PR follows the style guidelines of this project
  • I have performed a self-check on my work

If changes are made in the code:

  • I have followed the coding guidelines
  • My changes in code generate no new warnings
  • My changes are breaking another fix/feature of the project
  • I have added test cases to show that my feature works
  • I have added relevant screenshots in my PR
  • There are no UI/UX issues

Documentation Update

  • This PR requires an update to the documentation at docs.keyshade.xyz
  • I have made the necessary updates to the documentation, or no documentation changes are required.

PR Type

enhancement, documentation


Description

  • Removed Swagger documentation and related decorators across multiple controllers and DTOs.
  • Simplified API controllers by removing Swagger API documentation, which includes decorators like ApiTags, ApiOperation, and ApiResponse.
  • Removed Swagger setup from the main application file, reducing complexity and potential security issues related to API documentation exposure.

Changes walkthrough 📝

Relevant files
Enhancement
12 files
api-key.controller.ts
Remove Swagger Documentation from API Key Controller         

apps/api/src/api-key/controller/api-key.controller.ts

  • Removed Swagger decorators from all API key controller methods.
  • Simplified the controller by removing unnecessary Swagger
    documentation.
  • +0/-120 
    create.api-key.ts
    Simplify CreateApiKey DTO by Removing Swagger Decorators 

    apps/api/src/api-key/dto/create.api-key/create.api-key.ts

    • Removed Swagger ApiProperty decorators from the DTO properties.
    +0/-24   
    app.controller.ts
    Remove Swagger Tags from App Controller                                   

    apps/api/src/app/app.controller.ts

    • Removed Swagger ApiTags decorator from the App Controller.
    +0/-2     
    auth.controller.ts
    Clean Up Auth Controller by Removing Swagger Documentation

    apps/api/src/auth/controller/auth.controller.ts

  • Removed all Swagger decorators and simplified the Auth Controller
    methods.
  • +0/-108 
    environment.controller.ts
    Remove Swagger Tags from Environment Controller                   

    apps/api/src/environment/controller/environment.controller.ts

  • Removed Swagger ApiTags decorator from the Environment Controller.
  • +0/-2     
    event.controller.ts
    Remove Swagger Tags from Event Controller                               

    apps/api/src/event/controller/event.controller.ts

    • Removed Swagger ApiTags decorator from the Event Controller.
    +0/-2     
    feedback.controller.ts
    Remove Swagger Documentation from Feedback Controller       

    apps/api/src/feedback/controller/feedback.controller.ts

    • Removed Swagger decorators from the feedback POST method.
    +0/-22   
    integration.controller.ts
    Remove Swagger Tags from Integration Controller                   

    apps/api/src/integration/controller/integration.controller.ts

  • Removed Swagger ApiTags decorator from the Integration Controller.
  • +0/-2     
    main.ts
    Remove Swagger Setup from Main Application File                   

    apps/api/src/main.ts

  • Removed Swagger setup and configuration from the main application
    file.
  • +0/-14   
    project.controller.ts
    Remove Swagger Tags from Project Controller                           

    apps/api/src/project/controller/project.controller.ts

    • Removed Swagger ApiTags decorator from the Project Controller.
    +0/-2     
    secret.controller.ts
    Remove Swagger Tags from Secret Controller                             

    apps/api/src/secret/controller/secret.controller.ts

    • Removed Swagger ApiTags decorator from the Secret Controller.
    +0/-2     
    variable.controller.ts
    Remove Swagger Tags from Variable Controller                         

    apps/api/src/variable/controller/variable.controller.ts

    • Removed Swagger ApiTags decorator from the Variable Controller.
    +0/-2     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    PR Description updated to latest commit (1e9d5bb)

    Copy link
    Contributor

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are straightforward and involve removing Swagger documentation across various files. The PR is large in terms of the number of files changed, but the nature of the changes (mostly deletions) makes it relatively easy to review.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Possible Loss of Functionality: Ensure that the removal of Swagger does not affect any runtime functionality or endpoint accessibility, as Swagger annotations can sometimes be intertwined with routing or middleware.

    Documentation Update Required: The removal of Swagger documentation means that the API documentation needs to be updated or replaced to ensure that API consumers have the necessary information.

    🔒 Security concerns

    No

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for PR.

    Copy link
    Member

    @rajdip-b rajdip-b left a comment

    Choose a reason for hiding this comment

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

    Copy link

    sonarcloud bot commented May 15, 2024

    Quality Gate Passed Quality Gate passed

    Issues
    0 New issues
    0 Accepted issues

    Measures
    0 Security Hotspots
    No data about Coverage
    0.0% Duplication on New Code

    See analysis details on SonarCloud

    @rajdip-b rajdip-b merged commit 7640299 into keyshade-xyz:develop May 15, 2024
    5 checks passed
    rajdip-b pushed a commit that referenced this pull request May 24, 2024
    ## [1.4.0](v1.3.0...v1.4.0) (2024-05-24)
    
    ### 🚀 Features
    
    * add example for health and email auth ([b834d25](b834d25))
    * **api:** Add `minio-client` provider ([#237](#237)) ([cd71c5a](cd71c5a))
    * **api:** Add feature to fork projects ([#239](#239)) ([3bab653](3bab653))
    * **api:** Added feedback form module ([#210](#210)) ([ae1efd8](ae1efd8))
    * **api:** Added Project Level Access  ([#221](#221)) ([564f5ed](564f5ed))
    * **api:** Added support for changing email of users ([#233](#233)) ([5ea9a10](5ea9a10))
    * implemented auth, ui for most, and fixed cors ([#217](#217)) ([feace86](feace86))
    * **platfrom:** add delete method in api client ([#225](#225)) ([55cf09f](55cf09f))
    * **postman:** add example for get_self and update_self ([e015acf](e015acf))
    * **web:** Add and link privacy and tnc page ([#226](#226)) ([ec81eb9](ec81eb9))
    
    ### 🐛 Bug Fixes
    
    * **web:** docker next config not found ([#228](#228)) ([afe3160](afe3160))
    
    ### 📚 Documentation
    
    * Added docs regarding postman, and refactored architecture diagrams ([f1c9777](f1c9777))
    * Fix typo in organization-of-code.md ([#234](#234)) ([11244a2](11244a2))
    
    ### 🔧 Miscellaneous Chores
    
    * **api:** Get feedback forward email from process.env ([#236](#236)) ([204c9d1](204c9d1))
    * **postman:** Initialized postman ([bb76384](bb76384))
    * **release:** Update changelog config ([af91283](af91283))
    * Remove swagger docs ([#220](#220)) ([7640299](7640299))
    
    ### 🔨 Code Refactoring
    
    * **api:** Replaced OTP code from alphanumeric to numeric ([#230](#230)) ([f16162a](f16162a))
    @rajdip-b
    Copy link
    Member

    🎉 This PR is included in version 1.4.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    Successfully merging this pull request may close these issues.

    API: Remove Swagger docs
    2 participants