All Projects â†’ tobilg â†’ Api2html

tobilg / Api2html

Licence: mit
A CLI tool to transform Swagger/OpenAPI/AsyncAPI docs to beautiful HTML pages via Shins/Widdershins.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Api2html

Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+15370.87%)
Mutual labels:  openapi, openapi3, api-documentation
Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+731.07%)
Mutual labels:  openapi, openapi3, slate
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (+27.18%)
Mutual labels:  openapi, openapi3, api-documentation
Slate
Beautiful static documentation for your API
Stars: ✭ 33,447 (+32372.82%)
Mutual labels:  api-documentation, static-site-generator, slate
go-slate
A CLI tool to generate API documentation using Slate layout by Robert Lord
Stars: ✭ 19 (-81.55%)
Mutual labels:  static-site-generator, api-documentation, slate
openapi-boilerplate
📘 Multi-file boilerplate for Open API Specification
Stars: ✭ 280 (+171.84%)
Mutual labels:  api-documentation, openapi, openapi3
Shins
Shins development continues at
Stars: ✭ 250 (+142.72%)
Mutual labels:  openapi, static-site-generator, slate
Create Openapi Repo
🤖 Generator for GH repo to help you manage the OpenAPI definition lifecycle
Stars: ✭ 513 (+398.06%)
Mutual labels:  openapi, openapi3, api-documentation
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (-17.48%)
Mutual labels:  api-documentation, openapi, openapi3
specifications-ITS-REST
openEHR REST API Specifications
Stars: ✭ 20 (-80.58%)
Mutual labels:  api-documentation, openapi, openapi3
node-slate
📓 Node.js port of lord/slate
Stars: ✭ 18 (-82.52%)
Mutual labels:  static-site-generator, api-documentation, slate
Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-20.39%)
Mutual labels:  openapi, openapi3, api-documentation
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+750.49%)
Mutual labels:  openapi, openapi3
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+38334.95%)
Mutual labels:  openapi, openapi3
Kaizen Openapi Editor
Eclipse Editor for the Swagger-OpenAPI Description Language
Stars: ✭ 97 (-5.83%)
Mutual labels:  openapi, openapi3
Gnostic
A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks.
Stars: ✭ 870 (+744.66%)
Mutual labels:  openapi, openapi3
Rolodex
📇API Documentation Generator for Phoenix
Stars: ✭ 34 (-66.99%)
Mutual labels:  openapi, openapi3
Uvicorn Gunicorn Fastapi Docker
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.
Stars: ✭ 1,014 (+884.47%)
Mutual labels:  openapi, openapi3
Php Openapi Faker
Library to generate fake data for OpenAPI request/response/schemas
Stars: ✭ 54 (-47.57%)
Mutual labels:  openapi, openapi3
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+10224.27%)
Mutual labels:  openapi, openapi3

api2html

A CLI tool to transform Swagger/OpenAPI/AsyncAPI docs to beautiful HTML pages via Shins/Widdershins.

You can find an example generated page at http://tobilg.github.io/api2html/petstore/.

Installation

To install api2html globally, use

$ npm i api2html -g

You can also install it to use as devDependencies, and use it locally via a npm run task in your package.json:

$ npm i api2html --save-dev

Usage in package.json:

{
  "scripts": {
    "api-docs": "node_modules/.bin/api2html -o docs/api.html -l shell,javascript--nodejs docs/openapi/api.yml"
  }
}

Usage

Available commands

$ api2html --help 
Usage: api2html [options] <sourcePath>
  
  Options:
    -V, --version                   output the version number
    -r, --resolve <source>          resolve external dependencies, source should be a url or a path
    -o, --out <outputPath>          output path for the resulting HTML document
    -t, --theme <themeName>         theme to use (see https://highlightjs.org/static/demo/ for a list)
    -c, --customLogo <logoPath>     use custom logo at the respective path
    -u, --customLogoUrl <logoURL>   url for the custom logo to point to
    -C, --customCss                 use custom css
    -P, --customCssPath <cssPath>   use custom css file
    -i, --includes <includesList>   comma-separated list of files to include
    -l, --languages <languageList>  comma-separated list of languages to use for the language tabs (out of shell, http, javascript, javascript--nodejs, ruby, python, java, go)
    -s, --search                    enable search
    -S, --summary                   use summary instead of operationId for TOC
    -b, --omitBody                  Omit top-level fake body parameter object
    -R, --raw                       Show raw schemas in samples, not example values
    -h, --help                      output usage information

Usage examples

Render OpenAPI v3 file as HTML

This will render the api.yml file in the current directory as myapi.html file in the current directory.

$ api2html -o myapi.html myapi.yml

Use custom logo

This will render the api.yml file in the current directory as myapi.html file in the same directory, and use the custom logo mylogo.png.

$ api2html -o myapi.html -c mylogo.png myapi.yml

Define which language examples should be generated

This will render the api.yml file in the current directory as myapi.html file in the same directory, and use go and javascript examples.

$ api2html -o myapi.html -l go,javascript myapi.yml

Use different syntax highlighter

This will render the api.yml file in the current directory as myapi.html file in the same directory, and use go and javascript examples, as well as a different syntax higlighter from highlight.js.

$ api2html -o myapi.html -l go,javascript -t arta myapi.yml

Resolve external dependencies

If you add refs to external files in your source file, you can enable them by using -r <source>. The following command will resolve all your relative imports from the current directory.

$ api2html -o myapi.html -r ./ myapi.yml
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].