PHP Класс Joli\Jane\OpenApi\JaneOpenApi

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( SchemaParser $schemaParser, ChainGuesser $chainGuesser, Joli\Jane\Generator\ModelGenerator $modelGenerator, NormalizerGenerator $normalizerGenerator, ClientGenerator $clientGenerator, PrettyPrinterAbstract $prettyPrinter, PhpCsFixer\ConfigInterface $fixerConfig = null ) JaneOpenApi constructor.
build ( array $options = [] )
createContext ( string $openApiSpec, string $name, string $namespace, string $directory ) : Joli\Jane\Generator\Context\Context Return a list of class guessed
generate ( string $openApiSpec, string $namespace, string $directory ) : File[] Generate a list of files
printFiles ( File[] $files, string $directory ) Print files

Защищенные методы

Метод Описание
fix ( string $directory ) : array | void Use php cs fixer to have a nice formatting of generated files

Описание методов

__construct() публичный Метод

JaneOpenApi constructor.
public __construct ( SchemaParser $schemaParser, ChainGuesser $chainGuesser, Joli\Jane\Generator\ModelGenerator $modelGenerator, NormalizerGenerator $normalizerGenerator, ClientGenerator $clientGenerator, PrettyPrinterAbstract $prettyPrinter, PhpCsFixer\ConfigInterface $fixerConfig = null )
$schemaParser Joli\Jane\OpenApi\SchemaParser\SchemaParser
$chainGuesser Joli\Jane\Guesser\ChainGuesser
$modelGenerator Joli\Jane\Generator\ModelGenerator
$normalizerGenerator Joli\Jane\Generator\NormalizerGenerator
$clientGenerator Joli\Jane\OpenApi\Generator\ClientGenerator
$prettyPrinter PhpParser\PrettyPrinterAbstract
$fixerConfig PhpCsFixer\ConfigInterface

build() публичный статический Метод

public static build ( array $options = [] )
$options array

createContext() публичный Метод

Return a list of class guessed
public createContext ( string $openApiSpec, string $name, string $namespace, string $directory ) : Joli\Jane\Generator\Context\Context
$openApiSpec string
$name string
$namespace string
$directory string
Результат Joli\Jane\Generator\Context\Context

fix() защищенный Метод

Use php cs fixer to have a nice formatting of generated files
protected fix ( string $directory ) : array | void
$directory string
Результат array | void

generate() публичный Метод

Generate a list of files
public generate ( string $openApiSpec, string $namespace, string $directory ) : File[]
$openApiSpec string Location of the specification
$namespace string Namespace of the library
$directory string Path for the root directory of the generated files
Результат Joli\Jane\Generator\File[]

printFiles() публичный Метод

Print files
public printFiles ( File[] $files, string $directory )
$files Joli\Jane\Generator\File[]
$directory string