All Projects β†’ dgarcia360 β†’ openapi-boilerplate

dgarcia360 / openapi-boilerplate

Licence: other
πŸ“˜ Multi-file boilerplate for Open API Specification

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to openapi-boilerplate

Api2html
A CLI tool to transform Swagger/OpenAPI/AsyncAPI docs to beautiful HTML pages via Shins/Widdershins.
Stars: ✭ 103 (-63.21%)
Mutual labels:  api-documentation, openapi, openapi3
Create Openapi Repo
πŸ€– Generator for GH repo to help you manage the OpenAPI definition lifecycle
Stars: ✭ 513 (+83.21%)
Mutual labels:  api-documentation, openapi, openapi3
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (-69.64%)
Mutual labels:  api-documentation, openapi, openapi3
specifications-ITS-REST
openEHR REST API Specifications
Stars: ✭ 20 (-92.86%)
Mutual labels:  api-documentation, openapi, openapi3
Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-70.71%)
Mutual labels:  api-documentation, openapi, openapi3
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (-53.21%)
Mutual labels:  api-documentation, openapi, openapi3
Redoc
πŸ“˜ OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+5591.07%)
Mutual labels:  api-documentation, openapi, openapi3
Documentation Starter
Interactive REST API Documentation
Stars: ✭ 156 (-44.29%)
Mutual labels:  api-documentation, openapi
restdocs-spec
A maven plugin for generating Open API and Postman Collection specifications using Spring Restdocs.
Stars: ✭ 43 (-84.64%)
Mutual labels:  api-documentation, openapi
mattermost-api-reference
Mattermost API reference documentation.
Stars: ✭ 74 (-73.57%)
Mutual labels:  api-documentation, openapi
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (-17.86%)
Mutual labels:  openapi, openapi3
idoc
πŸ“’πŸ“šGenerate beautiful interactive documentation and Open-API 3.0 spec file from your existing Laravel app.
Stars: ✭ 95 (-66.07%)
Mutual labels:  api-documentation, openapi
Ghlocalapi
(Unofficial) Google Home local API documentation.
Stars: ✭ 334 (+19.29%)
Mutual labels:  api-documentation, openapi3
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (-13.21%)
Mutual labels:  openapi, openapi3
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+1131.43%)
Mutual labels:  openapi, openapi3
Class Validator Jsonschema
Convert class-validator-decorated classes into JSON schema
Stars: ✭ 118 (-57.86%)
Mutual labels:  api-documentation, openapi3
Generators
API Generator - instantly generate REST and GraphQL APIs (openapi (OAS) 3.0.0)
Stars: ✭ 213 (-23.93%)
Mutual labels:  openapi, openapi3
Openapi Codegen
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis
Stars: ✭ 224 (-20%)
Mutual labels:  openapi, openapi3
Molten Boilerplate
A boilerplate for the molten framework by Bogdanp https://github.com/Bogdanp/molten
Stars: ✭ 50 (-82.14%)
Mutual labels:  api-documentation, openapi
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+908.93%)
Mutual labels:  api-documentation, openapi

build License: MIT

OpenAPI boilerplate

A starter template for OpenAPI Specification (OAS) projects.

This project splits the Swagger Petstore example from the official documentation into smaller files. It also adds handy commands to build, lint, and preview the OpenAPI document from the terminal.

You can use this template to guide the organization of your project. Either if you want to create a new OpenAPI document from scratch or if you already have it defined.

Features

Why?

When I used to document APIs following the OpenAPI spec, I always ended up with documents of thousands of lines, which were a nightmare to maintain.

For this reason, I explored how to split OpenAPI documents. Jump over to my blog to learn more about the process. Based on my research, I created this opinionated template to define, test, and publish modular OpenAPI projects.

Properly organizing your project comes with great advantages. By splitting a large OpenAPI spec into multiple files, it will not only be much easier to handle. Documenting it will be much more enjoyable, too. I also regularly get the feedback that other developers are more willing to contribute and propose changes to the document with this structure.

Getting started

Requirements

  • Node.js 16 (current)

Installation

  1. Clone the repository.

    git clone https://github.com/dgarcia360/openapi-boilerplate.git
    
  2. Install the project dependencies.

    npm install
    
  3. Edit openapi.yaml to fit your API definition. If you’re not familiar with the OpenAPI Specification, read Getting started with OAS first.

Useful commands

The project will build, lint, and preview the OpenAPI document from the terminal, with the following commands:

Build

The command bundles the spec as one .yaml file.

npm run build

The minified document is stored in _build/openapi.yaml.

Test

The command checks if the document follows the OpenAPI 3.0 Specification.

npm run test

Preview

The command builds a docs site so that you can view the rendering on your local browser.

npm run preview

The server starts on http://127.0.0.1:8080.

The site is generated with ReDoc. Here's a preview of a site generated with this command: Swagger Petstore Reference Documentation.

Ready-to-use workflows

The project uses GitHub Actions for Continuous Integration (CI).

On every new pull request, the OpenAPI document is linted with spectral. If there are changes that introduce errors, the bot will highlight them replying to the pull request.

When the default branch (e.g. master) receives an update, a workflow automatically publishes the API reference documentation site to GitHub Pages.

See .github/workflows to customize the available workflows. If you don't plan to use GitHub to host your spec or prefer to keep docs private, delete the .github folder.

Contributing

Contributions are welcome and appreciated! If you want to enhance the boilerplate, please read CONTRIBUTING.md file first.

License

Copyright (c) 2019-present David Garcia (@dgarcia360). Licensed under the MIT License.

The PetStore example used is derived from OAI/OpenAPI-Specification, Copyright The Linux Foundation, Licensed under the Apache License, Version 2.0.

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].