All Projects → Nexmo → nexmo-oas-renderer

Nexmo / nexmo-oas-renderer

Licence: MIT license
Render your API references, Nexmo-style!

Programming Languages

HTML
75241 projects
ruby
36898 projects - #4 most used programming language
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to nexmo-oas-renderer

oas parser
An open source Open API Spec 3 Definition Parser
Stars: ✭ 52 (+30%)
Mutual labels:  nexmo, openapi3, oas3, developer-destination
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (-12.5%)
Mutual labels:  openapi, openapi3, oas3
oaie-sketch
OpenAPI Visual Editor
Stars: ✭ 54 (+35%)
Mutual labels:  openapi, openapi3, oas3
HibiAPI
一个实现了多种常用站点的易用化API的程序 / A program that implements easy-to-use APIs for a variety of commonly used sites.
Stars: ✭ 427 (+967.5%)
Mutual labels:  openapi, openapi3
whook
Build strong and efficient REST web services.
Stars: ✭ 18 (-55%)
Mutual labels:  openapi, openapi3
openapi-generator-go
An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding.
Stars: ✭ 42 (+5%)
Mutual labels:  openapi, openapi3
ogen
OpenAPI v3 code generator for go
Stars: ✭ 436 (+990%)
Mutual labels:  openapi, openapi3
n26-api
Unofficial N26 Bank API documentation
Stars: ✭ 41 (+2.5%)
Mutual labels:  openapi, openapi3
comms-router
A server which allows you to route tasks to agents.
Stars: ✭ 18 (-55%)
Mutual labels:  nexmo, developer-destination
Unchase.OpenAPI.Connectedservice
📜 Visual Studio extension to generate OpenAPI (Swagger) web service reference.
Stars: ✭ 69 (+72.5%)
Mutual labels:  openapi, openapi3
openapi-petstore
The pet store sample
Stars: ✭ 35 (-12.5%)
Mutual labels:  openapi, openapi3
KaiZen-OpenApi-Parser
High-performance Parser, Validator, and Java Object Model for OpenAPI 3.x
Stars: ✭ 119 (+197.5%)
Mutual labels:  openapi, openapi3
openapi
OpenAPI 3 Specification for golang
Stars: ✭ 18 (-55%)
Mutual labels:  openapi, openapi3
oas
OpenAPI Spec builder in go
Stars: ✭ 15 (-62.5%)
Mutual labels:  openapi, openapi3
swagger-converter
OpenAPI/Swagger 2.0 to OpenAPI 3.0 Converter WebService
Stars: ✭ 58 (+45%)
Mutual labels:  openapi, openapi3
OpenAlchemy
Define SQLAlchemy models using the OpenAPI specification.
Stars: ✭ 39 (-2.5%)
Mutual labels:  openapi, openapi3
openapimux
Open API router in go
Stars: ✭ 21 (-47.5%)
Mutual labels:  openapi, openapi3
Tavis.OpenApi
Parser for OpenAPI Specification
Stars: ✭ 18 (-55%)
Mutual labels:  openapi, openapi3
swagger-petstore
petstore.swagger.io
Stars: ✭ 84 (+110%)
Mutual labels:  openapi, openapi3
openapi4j
OpenAPI 3 parser, JSON schema and request validator.
Stars: ✭ 92 (+130%)
Mutual labels:  openapi, openapi3

Nexmo OAS Renderer

Build Status MIT licensed

Sinatra application that provides a preview of how the OAS documents will be rendered within Nexmo Developer.

Dependencies

Installation and Usage

Using Docker

You can run using Docker and it will serve the current directory (this will usually be the api-specification repo):

Mac/Linux

docker run --rm -p 4567:4567 -v `pwd`:/definitions -e 'OAS_PATH=/definitions' nexmodev/nexmo-oas-renderer:latest

Alternatively, add the following to your ~/.bashrc file and you'll be able to run nexmo-oas-renderer

function nexmo-oas-renderer() {
  docker run --rm -p 4567:4567 -v `pwd`:/definitions -e 'OAS_PATH=/definitions' nexmodev/nexmo-oas-renderer:latest
}

Windows

docker run --rm -p 4567:4567 -v %CD%:/definitions -e 'OAS_PATH=/definitions' nexmodev/nexmo-oas-renderer:latest

As a standalone application

Install the gem:

$ gem install nexmo-oas-renderer

And simply run the executable with the corresponding env variables set (see Note):

$ nexmo-oas-renderer

Or, if you want to make code changes, just run the following command which will start the web server on http://localhost:9393:

OAS_PATH=... bundle exec shotgun lib/nexmo/oas/renderer/config.ru

Mounted into a Rails Application

Add this to your application's Gemfile:

gem 'nexmo-oas-renderer', require: false

And then run bundle install.

Require the gem in config/environment.rb as follows:

# Load the Rails application.
require_relative 'application'

require 'nexmo/oas/renderer'

# Initialize the Rails application.
Rails.application.initialize!

And finally mount the Sinatra app into your Rails application by adding the following line to config/routes.rb:

mount Nexmo::OAS::Renderer::API, at: '/api'

Specifying the path to the documents

This gem uses dotenv to handle environment variables, so you should copy the .env.example provided by running:

$ cp .env.example .env

and assign values to the corresponding variables.

Note

The env variable OAS_PATH indicates the path to the documents that will be rendered.

Contributing

We ❤️ contributions from everyone! Bug reports, bug fixes and feedback on the library is always appreciated. Look at the Contributor Guidelines for more information and please follow the GitHub Flow.

License

This project is under the MIT LICENSE.

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