Giter Club home page Giter Club logo

openapi-readme's Introduction

OpenAPI Readme Generator

Generates Markdown suitable for a README file from a local openapi.json file.

This tool is still under development, progress so far is only a days work so there is a lot to do with extra functionality and refactoring.

Usage

openapi-readme [OPTIONS]

Run this in the same directory as your openapi.json file. By default the Markdown output will be printed to the console, but you can redirect it out to a file too.

The particular styling of the generated Markdown is currently hardcoded, though plans are afoot to implement some sort of themeing.

Options Summary

  • --route-level INTEGER: Number of heading levels to use. [default: 4]
  • --inject / --no-inject: Inject generated output into a README file. [default: False]
  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Options in Detail

--route-level

Specify the heading level for each Route in the generated documentation. This defaults to 4 if not specified, ie:

#### **`GET`** _/user/list_

--inject

Injects the new Markdown directly into a README.md file in the current directory, if it is found. You need to add the placeholder comment <!-- openapi-schema --> to your markdown where you want it to be injected:

This is some preceeding text

### API Schema description
<!-- openapi-schema -->

### Next section
The document continues unaffected after the injection.

Existing (previously injected) Schemas will be replaced by this new data.

TODO

Future improvement plans

  • Take more info from the openapi.json file

openapi-readme's People

Contributors

dependabot[bot] avatar seapagan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

petitlepton

openapi-readme's Issues

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.