nicordev/openapi_phpdoc_generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nicordev/openapi_phpdoc_generator

Composer 安装命令:

composer require nicordev/openapi_phpdoc_generator

包简介

Convert JSON content into OpenApi phpdoc block

README 文档

README

Generate OpenApi phpdoc from json content.

Installation

Here we assume that you have php installed locally under /usr/bin:

cp src/Shell/openapi_phpdoc_generator_command.php /usr/local/bin/openapi_phpdoc_generator # To copy the command into one of our $PATH directory
chmod +x src/Shell/openapi_phpdoc_generator_command.php /usr/local/bin # To be able to execute the script without adding php in front of the command name

Usage

In your terminal, run:

openapi_phpdoc_generator

Then you will get some explanation about how to use the command, like this:

[IS_IN_MIDDLE=1] php openapi_phpdoc_generator yourJsonFileHere [startingDepthLevelHere]

To use the OpenApiPhpdocGenerator class in your codebase, use:

use Nicordev\OpenApiPhpdocGenerator\OpenApiPhpdocGenerator;

$ourAwesomeDecodedJsonContent = file_get_contents($ourAwesomeDecodedJsonContentFilePath);
$openApiPhpdocGenerator = new OpenApiPhpdocGenerator();
$result = $openApiPhpdocGenerator->generate($ourDecodedJsonContent, $ourStartingDepthLevel, $isInMiddleOfExistingPhpDoc);

I wish you a happy phpdoc generation!

Test

To run the test suite:

  1. composer install
  2. make test

If you're a docker enthusiast and you don't have php installed locally, you can do this instead:

  1. make composer-install-using-docker
  2. make test-using-docker

PhpStan

I've also added PHPStan, you can use it using make commands.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固