apidoc/apidoc-spec

Remove markup from generated JSON

lararosekelley opened this issue · 2 comments

I noticed that in the generated JSON output, there are p tags in sections like description and type, etc. Example:

{
    "type": "get",
    "url": "/assembly/definition/:did/workspace/:wid/element/:eid",
    "title": "Assembly Definition",
    "name": "GetAssemblyDefinition",
    "description": "<p>Get definition of requested assembly</p> ",
    "group": "Model",
    "version": "0.1.0",
    "permission": [
      {
        "name": "auth",
        "title": "Authenticated access only",
        "description": "<p>Must be logged in to access this resource.</p> "
      }
    ]
}

These are simple to get rid of on the front end that I'm feeding the JSON to, but I think it'd be best to not have them be there in the first place, to separate data from markup. Thoughts? I understand the appeal of support for links in the comments, but feel as though a clean, HTML-free JSON file would be best for most people. Perhaps a new @apilink annotation could help keep the link support

The fields are HTML capable, if you don't want the HTML-Code disable the markdown parser --markdown false or set a path to an own parser example in https://github.com/apidoc/apidoc/blob/master/MARKDOWN.md where you can remove the p-tags.

Great, don't know how that slipped by me! Closing issue.