swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

Markdown in schema descriptions

Open henkosch opened this issue 11 years ago • 3 comments

GFM in schema descriptions should be supported according to the specs, but it is displayed as plain text. HTML works, but it is much easier to write gfm, so it would be nice to have that. http://swagger.io/specification/#schemaObject

Example:

swagger: '2.0'
info:
  version: 0.0.0
  title: Simple API
paths:
  /:
    get:
      description: GFM is supported here. **bold** *italic*
      responses:
        '200':
          description: OK
          schema:
            $ref: "#/definitions/TestType"
definitions:
  TestType:
    type: object
    description: GFM should be supported here. **bold** *italic*

gfm

henkosch avatar Oct 06 '15 23:10 henkosch

For rendering JSON Schema object we are using json-schema-view-js lib which does not support Markdown. Swagger Editor can not change behavior of this lib and this behavior is not something common to add to the lib.

mohsen1 avatar Oct 07 '15 23:10 mohsen1

I'm experiencing this issue as well.

I see that the current rendering library doesn't support GFM, but it seems like it might be worth switching to an alternate rendering library then, seeing as this is a question of spec compliance.

michaelkourlas avatar Feb 07 '17 18:02 michaelkourlas

how to change the description size in swagger.

rdooda avatar Nov 09 '22 05:11 rdooda