All Projects β†’ Redocly β†’ Create Openapi Repo

Redocly / Create Openapi Repo

Licence: mit
πŸ€– Generator for GH repo to help you manage the OpenAPI definition lifecycle

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Create Openapi Repo

Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-84.02%)
Mutual labels:  swagger, openapi, openapi3, api-documentation
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (-74.46%)
Mutual labels:  swagger, openapi, openapi3, api-documentation
Redoc
πŸ“˜ OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+3006.24%)
Mutual labels:  swagger, openapi, openapi3, api-documentation
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (-83.43%)
Mutual labels:  api-documentation, openapi, openapi3
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+4047.95%)
Mutual labels:  swagger, openapi, openapi3
openapi-boilerplate
πŸ“˜ Multi-file boilerplate for Open API Specification
Stars: ✭ 280 (-45.42%)
Mutual labels:  api-documentation, openapi, openapi3
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+450.68%)
Mutual labels:  swagger, openapi, api-documentation
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+634.89%)
Mutual labels:  swagger, openapi, openapi3
shipengine-openapi
The official OpenAPI 3.0 definitions for ShipEngineβ„’
Stars: ✭ 13 (-97.47%)
Mutual labels:  swagger, openapi, openapi3
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (-8.58%)
Mutual labels:  swagger, openapi, openapi3
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (-8.77%)
Mutual labels:  swagger, openapi, openapi3
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (-52.63%)
Mutual labels:  swagger, 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 (+572.12%)
Mutual labels:  swagger, openapi, openapi3
specifications-ITS-REST
openEHR REST API Specifications
Stars: ✭ 20 (-96.1%)
Mutual labels:  api-documentation, openapi, openapi3
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (-55.17%)
Mutual labels:  swagger, openapi, openapi3
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (-93.18%)
Mutual labels:  swagger, openapi, openapi3
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-95.71%)
Mutual labels:  swagger, openapi, openapi3
Studio
The modern editor for API Design and Technical Writing.
Stars: ✭ 459 (-10.53%)
Mutual labels:  swagger, openapi, openapi3
Openapi.tools
A collection of Editors, Linters, Parsers, Code Generators, Documentation, Testing
Stars: ✭ 257 (-49.9%)
Mutual labels:  swagger, openapi, openapi3
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (-59.45%)
Mutual labels:  swagger, openapi, openapi3

create-openapi-repo

NPM version Dependency Status

Generate an organized multi-file OpenAPI repository.

Who?

You! Hello. Do you need to write or contribute to an OpenAPI definition? If so, read on...

What?

We recommend a docs-like-code approach to OpenAPI definitions:

  • Write it using your favorite text-editor or IDE (we love VSCode).
  • Organize it into multiple files and folders to make it easy to navigate.
  • Store it using source control (such as GitHub).
  • Continuously validate it using our free openapi-cli tool or our free continuous validation service (coming soon).
  • Bundle it (for a smaller footprint to use in other tools or for tools that do not support a multi-file format).

Why?

There are a few advantages in hosting your API definition on GitHub:

  • Community engagement (PR's and issues -- if you have a public repo)
  • Advertisment in the GitHub community
  • Hosting on GitHub pages (perfect uptime, CDN, Jekyll, custom domains with CNAME)
  • Revision history, branching, CI
  • Review and approval workflows using Pull Requests
  • Fast on-boarding time (developers and tech writers know how to use GitHub πŸ˜„)
  • Fully compatible with Redocly API Reference too

There are also some advantages to a multi-file YAML format OpenAPI definition:

  • Reuse schema objects to keep things DRY (don't repeat yourself)
  • Smaller diffs compared to JSON (especially for markdown descriptions)
  • Easier to navigate
  • Easier to edit with confidence

Features

This generator helps to create a GitHub repo with the following features:

  • Split a big (or small) OpenAPI definition into smaller files organized into folders
  • Bundle it into a single file for deployment
  • Continuous integration/deployment on Travis or Redocly Workflows
  • Code samples as separate files
  • Automate deployment of your OpenAPI definition and docs
  • OpenAPI definition is validated after each commit
  • Live editing in your editor of choice 😍

Structure

You will have a structure similar to this:

    β”œβ”€β”€ .redocly.yaml
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ README.md
    β”œβ”€β”€ docs
    β”‚   β”œβ”€β”€ favicon.png
    β”‚   └── index.html
    β”œβ”€β”€ openapi
    β”‚   β”œβ”€β”€ README.md
    β”‚   β”œβ”€β”€ code_samples
    β”‚   β”‚   β”œβ”€β”€ C#
    β”‚   β”‚   β”‚   └── echo
    β”‚   β”‚   β”‚       └── post.cs
    β”‚   β”‚   β”œβ”€β”€ PHP
    β”‚   β”‚   β”‚   └── echo
    β”‚   β”‚   β”‚       └── post.php
    β”‚   β”‚   └── README.md
    β”‚   β”œβ”€β”€ components
    β”‚   β”‚   └── README.md
    β”‚   └── paths
    β”‚       └── README.md
    └── package.json

However, you can adjust it to any structure you prefer.

The openapi folder is where your OpenAPI definition will live. Inside there, and the sub-folders, there are README.md files to help guide you further. This is also where your entrypoint openapi.yaml will live.

The components folder is where you will organize sub-folders such as schema to define your schema.

The paths folder is where you will organize your paths. There will be a 'README.md' file in there with suggestions for how to organize it into specially named files (or folders) that use an @ in place of a / (because files cannot have a / character in them). You will also be able to use path parameters by wrapping them in curly braces {example}.

The .redocly.yaml file is a universal configuration for various Redocly tools including the lint tool and reference doc engine.

Commands

The generated repository includes installing a dependency for our openapi-cli tool which supports commands such as validate, bundle, and more. There are scripted shortcuts defined in the repository's package.json.

Examples of generated repositories

How to generate your repository

We assume you already have node.js installed.

  • Install create-openapi-repo globally:
npm install -g create-openapi-repo

or use npx:

We'll use npx in this example. However, remove npx if you installed it globally.

npx create-openapi-repo

You will be presented with some questions. You can create a new definition or use an existing definition to initialize your project.

Please note, if you do start a new one, remember to create a GitHub repo where your OpenAPI definition will live.

If you use the prior version of this generated repository, please read the following upgrade instructions.

Upgrading from a prior version

Migrate your repository from a previous structure of OpenAPI repo to this newer structure with our migration tool.

Run this in the root folder of your repo.

npx create-openapi-repo --migrate-2-3

Note: the migration tool does not migrate plugins automatically. You would need to manually add them to the transformers folder.

Support

Thank you for wanting to support us. Here are some ideas how to support us:

  • Star us
  • Tell a friend or colleague about us (or Tweet about us)
  • Write an article about it (and let us know) -- open an issue to let us know, with the link.
  • Consider our commercial products if are looking for automation to ease the docs-like code workflow, hosting along with conveniences like custom domains, access controls and previews, API reference documentation, or a full developer portal: https://redoc.ly
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].