All Projects → readmeio → Oas

readmeio / Oas

Licence: mit
Easily create and manage OpenAPI Documents.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Oas

Generators
API Generator - instantly generate REST and GraphQL APIs (openapi (OAS) 3.0.0)
Stars: ✭ 213 (+126.6%)
Mutual labels:  openapi, oas
openapi
OpenAPI (fka Swagger) spec renderer for Sphinx.
Stars: ✭ 78 (-17.02%)
Mutual labels:  openapi, oas
Api Generator
PHP-code generator for Laravel framework, with complete support of JSON-API data format
Stars: ✭ 244 (+159.57%)
Mutual labels:  openapi, oas
Oooas
An object oriented approach to generating OpenAPI specs, implemented in PHP.
Stars: ✭ 162 (+72.34%)
Mutual labels:  openapi, oas
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 (+22537.23%)
Mutual labels:  openapi, oas
Openapi Spec Validator
OpenAPI Spec validator
Stars: ✭ 161 (+71.28%)
Mutual labels:  openapi, oas
swaggerhub-cli
SwaggerHub CLI
Stars: ✭ 28 (-70.21%)
Mutual labels:  openapi, oas
portman
Port OpenAPI Specs to Postman Collections, inject test suite and run via Newman 👨🏽‍🚀
Stars: ✭ 530 (+463.83%)
Mutual labels:  openapi, oas
Swaggen
OpenAPI/Swagger 3.0 Parser and Swift code generator
Stars: ✭ 385 (+309.57%)
Mutual labels:  openapi, oas
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (-62.77%)
Mutual labels:  openapi, oas
Prism
Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations.
Stars: ✭ 2,484 (+2542.55%)
Mutual labels:  openapi, oas
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (+398.94%)
Mutual labels:  openapi, oas
Openapi Core
OpenAPI core
Stars: ✭ 119 (+26.6%)
Mutual labels:  openapi, oas
Openapi Directory
🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
Stars: ✭ 2,635 (+2703.19%)
Mutual labels:  openapi, oas
openapi-lint-vscode
OpenAPI 2.0/3.0.x intellisense, validator, linter, converter and resolver extension for Visual Studio Code
Stars: ✭ 47 (-50%)
Mutual labels:  openapi, oas
Openapi Specification
The OpenAPI Specification Repository
Stars: ✭ 22,603 (+23945.74%)
Mutual labels:  openapi, oas
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+831.91%)
Mutual labels:  openapi, oas
Openapi Javascript
KKBOX Open API SDK for JavaScript.
Stars: ✭ 64 (-31.91%)
Mutual labels:  openapi
Dredd Example
Example application using Dredd and CI
Stars: ✭ 79 (-15.96%)
Mutual labels:  openapi
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+1089.36%)
Mutual labels:  openapi

oas

Working with Swagger and OpenAPI definitions is hard. This makes it easier.

Build

Installation

npm install oas

CLI

The CLI tool makes creating API definition files easier. It currently supports Swagger 2 and OpenAPI 3.x documents.

Usage

Go to a directory with your API, and type:

oas init

It will walk you through how to document your API with a OpenAPI 3.0 Spec.

Swagger Inline

oas uses swagger-inline which allows you include a little OpenAPI snippet in a comment above your code, and collects them all together into one OpenAPI file:

/*
 * @oas [get] /pet/{petId}
 * description: "Returns all pets from the system that the user has access to"
 * parameters:
 *   - (path) petId=hi* {String} The pet ID
 *   - (query) limit {Integer:int32} The number of resources to return
*/
route.get("/pet/:petId", pet.show);

You need to start with @oas [method] path, but everything below it is a valid Path Definition.

You can also do inline parameters, which are shorthand for parameters. They aren't valid OpenAPI properties but swagger-inline knows how to compile them:

- (in) name=default* {type:format} Description

Host your API definition

Hosting API documentation is hard so, we have an online component that hosts your OpenAPI/Swagger file for you. Just type the following to get a URL:

oas host

This will upload your API definition and give you a public URL you can use.

Tooling

This library also exposes a set of tooling to help you manage OpenAPI definitions. You can access it by loading:

require('oas/tooling')

To use a compiled version of this offering within a browser, you can load oas/.tooling

Components available are the following:

  • oas/tooling: An OAS class can help you discover operations within a large OpenAPI file.
  • oas/tooling/operation: An Operation class that can help you manage and retrieve specific data from an API operation.
  • oas/tooling/utils
    • findSchemaDefinition: Function to assist with $ref lookups.
    • flattenSchema: Function to reduce a schema definition into a singular list.
    • getSchema: Retrieve the first requestBody schema on an operation.
    • parametersToJsonSchema: Warehouse method to reduce an operation down into a JSON Schema-compatible representation.
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].