membrane/openapi-reader 问题修复 & 功能扩展

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

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

membrane/openapi-reader

最新稳定版本:3.0.0

Composer 安装命令:

composer require membrane/openapi-reader

包简介

无描述信息

README 文档

README

This library is intended to be used in conjunction with other Membrane libraries.

It wraps the php-openapi library with some additional validation, including Membrane-specific requirements.

Requirements

Installation

composer require membrane/openapi-router 

Quick Start

Instantiate a Reader

$versions = [\Membrane\OpenAPIReader\OpenAPIVersion::Version_3_0]; $reader = new \Membrane\OpenAPIReader\Reader($versions);

Read From An Absolute File Path

This method is the main use-case of the reader and is capable of resolving all references.

If your file path contains the file extension then the reader can use this to determine which language the OpenAPI is written in.

// code to instantiate reader...  $reader->readFromAbsoluteFilePath('~/path/to/my-openapi.yaml');

Otherwise, you may ensure it reads the file as a specific format by providing a second argument:

// code to instantiate reader...  $fileFormat = \Membrane\OpenAPIReader\FileFormat::Json; $reader->readFromAbsoluteFilePath('my-openapi', $fileFormat);

Read From A String

This method is only capable of resolving Reference Objects, it cannot resolve references to Relative Documents .

Because the OpenAPI will be read from a string, the FileFormat MUST be provided.

// code to instantiate reader...  $myOpenAPI = '<Insert your OpenAPI Spec here>'; $fileFormat = \Membrane\OpenAPIReader\FileFormat::Json; $reader->readFromString($myOpenAPI, $fileFormat)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固