GithubHelp home page GithubHelp logo

oas2md's Introduction

oas2md

oas2md is a simple program to create markdown documentation of an OpenAPI defined API. It uses libopenapi to parse the specification and go templates for rendering the pages.

The program was designed to create pages for a Hugo website but it can also create pages more suitable for display on Github by passing the -g option.

Who this project is for

This project is intended for developers who want to create static documentation from their OpenAPI specifications.

Project dependencies

Before using oas2md, ensure you have:

  • An OpenAPI specification. This can be a file or a URL to a spec.
  • golang 1.18+ if developing

When using the binary the templates are embedded.

Instructions for using oas2md

Get started with oas2md by installing the program.

Installing

  1. Download the latest binary from Github

Running

Oas2md will create markdown files from your OpenAPI specification. All configuration is done via command-line switches. By default it will create Hugo-compatible files with the main file being _index.md.

Command-line switches:

-d : The directory in which to create the file(s)

-s : The location of the specification. Can be a filepath or URL

-g : makes Github-compatible files. The main page is README.md

-1 : creates a single file for the entire API rather than a file per path

Troubleshooting

The program will panic if there are any issues creating files, rendering templates, etc. Most errors can be traced back to issues with the specification. The program attempts to validate the spec before running, but some issues can still get through. It is recommended to run the spec through Vacuum and clean up any issues before attempting to generate the documentation.

Contributing guidelines

If you wish to contribute to oas2md fork the project and submit a pull request.

How to get help

Requests for help can be made by starting a discussion on Github. Problems can be reported by creating an issue.

Terms of use

oas2md is licensed under the MIT License.


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.