Adding Markdown to Swagger Documentation swagger.json

650 views
Skip to first unread message

Zack Herbert

unread,
Jul 10, 2015, 9:39:29 AM7/10/15
to swagger-sw...@googlegroups.com
I am currently trying to add some mardown to my swagger.json documentation. I tried the below markdown in "description" but it didn't work
When i tried to load swagger.json in the UI it wouldn't load. I used a validator next to make sure that the JSON was formatted correctly, but it is saying
that i have invalid/illegal characters where the markdown is. Are there only certain parts of the GFM markdown that can be used, or is there a better way of
adding mardown to the UI to add come custom content?
 
"paths":{

 
"/customers/{primay_bic}":{

     
"get":{

       
"tags":[

         
"customers"

       
],
 
       
"description":"Will return the Customer details
                     ```
                     ## Availability
                     Immediate
                     ```"
,  

       
"produces":[

         
"application/hal+json"

       
],

       
"parameters":[

       
{

         
"name":"primay_bic",

         
"in":"path",

         
"description":"Bic number of the customer.",

         
"required":true,

         
"type":"string"

       
}

     
],

 
"responses":{

 
"200":{

 
"description":"OK"

 
}

 
}

 
}

 
}


Ron Ratovsky

unread,
Jul 10, 2015, 11:00:33 AM7/10/15
to swagger-sw...@googlegroups.com
In the string itself, use \r\n instead of newlines.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------
Reply all
Reply to author
Forward
0 new messages