Giter Site home page Giter Site logo

vnmedeiros / document-generator-for-openapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from schneiderundschuetz/document-generator-for-openapi

0.0 0.0 0.0 154 KB

WordPress plugin that generates OpenAPI (fka. Swagger) documents for a given WordPress REST Api namespace.

License: GNU General Public License v2.0

PHP 95.40% Dockerfile 1.80% Shell 2.80%

document-generator-for-openapi's Introduction

WordPress Document Generator for OpenAPI

Description

This plugin generates OpenAPI (fka. Swagger) documents for a given WordPress REST Api namespace.

How it works

This plugin reads the schema definition of a given WordPress REST Api namespace and transforms it to a OpenAPI document. The generator itself is exposed via the WordPress REST Api with the namespace document-generator-for-openapi/v1.

There is also a built in WP-CLI Command.

Usage

  1. Install plugin via WordPress Plugin repository or by manually copying files
  2. Activate the plugin
  3. Access the REST Api of the generator by calling /wp-json/document-generator-for-openapi/v1/document?namespace=\<NAMESPACE\> and your OpenAPI document will be returned.
  4. Or use the integrated WP-CLI command wp openapi-generator export-file

Limitations and known issues

  • Beware that currently the generator is exposeed to anonymous users since the WordPress schema endpoint is also publicly available. Use it at your own risk or disable the plugin after use.
  • No UI for configuration yet
  • Currently only version 3.1.0 of the OpenAPI specification is implemented. Swagger tools for 3.0.0 might work though.
  • Unittests need to be extended and improved
  • Extensibility with hooks needs to be improved

document-generator-for-openapi's People

Contributors

vnmedeiros avatar snandos avatar

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.