Swagger for Codeigniter 4 |
Hi there! I'm looking for a package or indications on how to install Swagger on CI 4.
Appreciate any help.
Do you mean like this?
https://github.com/pandigresik/easyAPI (07-07-2023, 04:53 PM)kenjis Wrote: Do you mean like this? Not exactly, I need to install and configure Swagger on an existing project. EasyAPI creates a brand new project.
at the this time there is no such CI and SWagger module,package or library to do in CI unless if you are good and familiarized with CI you can and create your own module to inject to your wish
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals
(07-10-2023, 04:04 PM)kenjis Wrote: What is Swagger? Yes, swagger UI. There is a package for laravel "https://packagist.org/packages/darkaonline/l5-swagger". I want the same functionality as this package with Codeigniter4.
Step-by-Step Guide to Integrate Swagger with CodeIgniter 4 !!!
I’m working on an open-source package to automate this process. Feel free to share corrections or suggestions in the comments or reach me via email: [email protected] Also, you guys can read this article at the following links: Dev.to: https://dev.to/robinncode/integrate-swagger-ui-with-codeigniter4-47je Hashnode: https://msmrobin.hashnode.dev/integrate-...deigniter4
If I got you right, you need to install the necessary dependencies using composer. composer require zircote/swagger-php doctrine/annotations
```[_{{{CITATION{{{_1{Integrate Swagger UI with Codeigniter4 - DEV Community](https://dev.to/robinncode/integrate-swag...iter4-47je) Then download the Swagger UI files and create a new controller to generate the Swagger documentation. Next add routes to your Config/Routes.php file. Create a view file to render the Swagger UI: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Swagger UI</title> <link rel="stylesheet" type="text/css" href="<?php echo base_url('swagger_ui/swagger-ui.css'); ?>"> <link rel="icon" type="image/png" href="<?php echo base_url('swagger_ui/favicon-32x32.png'); ?>" sizes="32x32"> <link rel="icon" type="image/png" href="<?php echo base_url('swagger_ui/favicon-16x16.png'); ?>" sizes="16x16"> </head> <body> <div id="swagger-ui"></div> <script src="<?php echo base_url('swagger_ui/swagger-ui-bundle.js'); ?>"></script> <script src="<?php echo base_url('swagger_ui/swagger-ui-standalone-preset.js'); ?>"></script> </body> </html> ```[_{{{CITATION{{{_1{Integrate Swagger UI with Codeigniter4 - DEV Community](https://dev.to/robinncode/integrate-swag...iter4-47je) and generate the Swagger UI assets php spark swagger:assets ```[_{{{CITATION{{{_2{arbims/Swagger-ci: third party Code for generate swagger api - GitHub](https://github.com/arbims/Swagger-ci)
Not exactly, I need to install and configure Swagger on an existing project.
|
Welcome Guest, Not a member yet? Register Sign In |