deliveryhero / serverless-aws-documentation

Serverless 1.0 plugin to add documentation and models to the serverless generated API Gateway
MIT License
309 stars 148 forks source link

markdown in description? #145

Closed lsanders closed 4 years ago

lsanders commented 4 years ago

Long shot, but has anyone done this?

lsanders commented 4 years ago

My coworker figured this out - turns out to be pretty straight forward!

In case anyone stumbles on this issue:

Just put your markdown in a separate yml file that starts with a pipe (|) newline:

|
# Heading one

Some valid markdown
- item one

in serverless.yml

functions:
  method:
 ...
    events:
      - http:
          path: ...
          method: post
          cors:
            origin: "*"
            allowCredentials: false
            documentation:
            summary: Method Summary 
            description: ${file(./source/apidocs/method-descriptions/method.yml)}