Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Remove markup from generated JSON #2

Closed
lararosekelley opened this issue Jun 1, 2015 · 2 comments
Closed

Remove markup from generated JSON #2

lararosekelley opened this issue Jun 1, 2015 · 2 comments

Comments

@lararosekelley
Copy link

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

@rottmann
Copy link
Member

rottmann commented Jun 1, 2015

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.

@lararosekelley
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants