Skip to content

v2.1.1 (2021-07-29) Improved markdown support

Choose a tag to compare

@paulRbr paulRbr released this 29 Jul 08:38
· 535 commits to main since this release
60212fe

Check our blog post announcement talking about our new bump diff feature if you missed the v2.1.0 release

🆕 Features

  • You can now include Markdown files as an external reference within your contract document with the $ref syntax $ref: "./path/to/local-markdown.md". In the same way you can extract part of your contract (usually JSON schema of your models into dedicated *.yaml or *.json files), you can now extract your markdown content into dedicated files.

    E.g. Your OpenAPI contract api-contract.yml can thus looks like:

    openapi: 3.1.0
    info:
      title: Bump API documentation
      version: 1.0.0
      description:
        $ref: "./docs/introduction.md"
    x-topics:
      - title: Getting started
        content:
          $ref: "./docs/getting-started.md"
      - title: Use cases
        content:
          $ref: "./docs/use-cases.md"
        example:
          $ref: "./docs/use-cases-examples.md"
    servers:
      ...
    paths:
      ...

    With files docs/introduction.md, docs/getting-started.md, docs/use-cases.md and docs/use-cases-examples.md right next to your contract document you will be able to generate a comprehensive API documentation with nicely formatted content for your users.

    It's a great new way to include “Topic” sections with hand written content before the documentation of endpoints/webhooks (or channels in case of an AsyncAPI contract) in dedicated Markdown files. Thanks to the x-topics top level property in your contract (As explained in our help page)

Bump markdown syntax

We support common markdown syntax:

  • h1, h2, h3, … headers (with ### Title)
  • **bold** will render bold
  • _italic_ will render italic
  • [links](https://bump.sh) will render links
  • ̀inline code ̀ will render inline code
  • > quotes will render

    quotes

And now all those additional syntax:

  • 🆕 ==highlight== will render highlight

  • 🆕 ~~strikethrough~~ will render strikethrough

  • 🆕 Footnote[^1] will render Footnote1

  • 🆕 Multiline code blocks with language color syntax highlighting

        ```json
        {
          "hello": "world",
          "number": 1,
          "boolean": true
        }
        ```
    

    Will render

    {
      "hello": "world",
      "number": 1,
      "boolean": true
    }
  • 🆕 ℹ️ Information call-out

    > info
    >
    > this is an important information to **standout**
    

    will render a blue background information call-out

  • 🆕 ✔️ Successfull call-out

    > success
    >
    > This is a *successful* information
    

    will render a green background information call-out

  • 🆕 ⚠️ Warning call-out

    > warn
    >
    > This is a *warning* information
    

    will render an orange background information call-out

  • 🆕 ❌ Error call-out

    > error
    >
    > This is a *error* information
    

    will render a red background information call-out

🆙 Upgrades

Thanks to @dependabot, all the node dependencies we use are now up-to-date.

  1. This is the content of the first footnote