Hi Team I've used the cbswagger and cbswaggerUI m...
# box-products
k
Hi Team I've used the cbswagger and cbswaggerUI module for the api documentaion in the coldbox framework. I've done all the cbswagger configuration in the coldbox.cfc. There two different type of code available in my application. 1. Script based 2. Tag based 1. Script based I've used the annotation to display the endpoint with param and sample responce in the swaggerUI. See below.
/**
* @x-route (POST) /api/login
* @tags Authentication
* @requestBody ~login/requestBody.json
* @response-default ~login/responses.json##200
* @response-401 ~login/responses.json##401
*/
function login( event, rc, prc ) {}
2. Tag based
<cffunction name="login" tags="Authentication">
Showing only the endpoints in the swagger UI. I tried with the same annotation like script based but not working.
<!---
@requestBody ~login/requestBody.json
@response-default ~login/responses.json##200
@response-401 ~login/responses.json##401
--->
I want to show the endpoint with param and sample response through tag based code. How to add the param and sample response in the tag based code? Could you please advise me?