⚡ Build Full API Collection directly from code.
This package enables you to build full API collection directly from code without added it manually .
🚀 Getting started
Usage
Before every method in controllers write some details about method to make it more readable and Thunder will use this details to build API collection ( JSON / Web page )
thunder_api --build-api-doc
- Use ( // @desc Some of description ) to add request name in collection
- Use ( // @route GET /api/v1/addresses ) to add route in collection
- Use ( // @@param {"sort" : "desc"} ) to add params in collection
- Use ( // @header {"key" : "this is key"} ) to add headers in collection
- Use ( // @body {"product_name" : "Iphone 15", "product_image_cover" : "images/iphone15", "option" : {"
files_key" :
"product_image_cover"}}) to add body in collection ( Add option key when you want to publish media ) - Use ( // @access Privet (user) ) to add Auth in collection
// @desc Add user address
// @route formdata /api/v1/addresses
// @param {"sort" : "desc"}
// @header {"api_key" : "1kwQTz8Kkc2KWrrUvBvBSkiEZ7RCEQ"}
// @body {"product_name" : "Iphone 15", "product_image_cover" : "images/iphone15", "option" : {"files_key" : ["product_image_cover"]}}
// @access Privet (user)
exports.addUserAddressHandler = asyncHandler(async (req, res, next) => {
// write you code here
});
Contact with me
Contributing
Feel free to contribute to this project by opening issues, suggesting new features, or submitting pull requests.
License
This project is licensed under the MIT License.
Libraries
- core/extensions/string_extensions
- core/model/api_collection_model
- core/model/detail_request_code
- core/model/event_model
- core/model/folder_request_collection_model
- core/model/info_model
- core/model/request_data
- core/model/variable_model
- core/services/command_service/command_service
- core/services/command_service/get_command
- core/services/folder_and_file_service/create_path_if_not_found
- core/services/folder_and_file_service/folder_and_file_service
- core/utils/read_controllers_path
- core/utils/string_consts
- features/build_api_collection/build_collections
- features/build_api_collection/print_request_data
- features/build_api_collection/read_base_data_collection
- features/build_api_collection/read_request_from_methods
- features/build_api_collection/read_variables_from_user
- features/build_api_collection/requests_adapter
- features/build_web_version/build_web_version
- main
- thunder_api
- Support for doing something awesome.