09 February 2021

Swagger to PDF/HTML5

     Pasos swagger:


    We need to have installed the following tools: swagger2markup and asciidoctor

  • brew install asciidoctor
  • brew install swagger2markup-cli    
  1.     get swagger.json with springboot up&running:
        http://127.0.0.1:8080/v2/api-docs
  2.     copy swagger.json
  3.     mkdir adocs
  4.     swagger2markup convert -i swagger.json -d adocs
  5.     modify overview.adoc (title =)
  6.     asciidoctor index.adoc
  7.     asciidoctor-pdf index.adoc



    $  cat index.adoc
    :doctype: book
    :toc: left
    :toclevels: 3
    :numbered:
    :hardbreaks:
    :sectlinks:
    :sectanchors:

    include::./overview.adoc[]
    include::./paths.adoc[]
    include::./security.adoc[]
    include::./definitions.adoc[]


No comments :

Blog Archive

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.