Giter Site home page Giter Site logo

th3mouk / openapigenerator Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 14 KB

PHP library which provide a scaffolding and generate an OpenAPI file :books: :gear:

License: MIT License

PHP 98.82% Makefile 1.18%
openapi openapi-generator yaml-processor openapi-specification rest generator

openapigenerator's Introduction

Open API Generator

This PHP library allows you to cut and organize your HUGE openapi.yml file, into small slices.

Versioning and deploy your OpenAPI documentation become easier.

Latest Stable Version Latest Unstable Version Total Downloads License

Build Status Scrutinizer Code Quality

Installation

composer require th3mouk/openapi-generator

Usage

Inside your project you can now run additional commands:

  • vendor/bin/openapi scaffold
  • vendor/bin/openapi generate

Scaffold

To prepare your project, run the first command scaffold.

It will create new folders.

specs
├── components
│   ├── schemas
│   ├── responses
│   ├── parameters
│   ├── examples
│   ├── requestBodies
│   ├── headers
│   ├── securitySchemes
│   ├── links
│   └── callbacks
└── paths

Add your schema

I personnaly use Swagger OpenAPI specifications to write my schema.

One example of organization can be :

specs
├── components
└── paths
    ├── authentication
    │   ├── login.yaml
    │   └── register.yaml
    └── unicorn
        ├── list.yaml
        └── detail.yaml

Generate

The command vendor/bin/openapi generate take arguments and options to generate the openapi.yml file.

You can add a path like this vendor/bin/openapi generate /in-this-folder/sub

And it exists a --pretty-json or -p option to obtain a human readable file.

Please

Feel free to improve this library.

openapigenerator's People

Contributors

th3mouk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

gillesbourgeat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.