PHP Class Joli\Jane\OpenApi\JaneOpenApi

Mostrar archivo Open project: jolicode/jane-openapi Class Usage Examples

Public Methods

Method Description
__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

Protected Methods

Method Description
fix ( string $directory ) : array | void Use php cs fixer to have a nice formatting of generated files

Method Details

__construct() public method

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 method

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

createContext() public method

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
return Joli\Jane\Generator\Context\Context

fix() protected method

Use php cs fixer to have a nice formatting of generated files
protected fix ( string $directory ) : array | void
$directory string
return array | void

generate() public method

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
return Joli\Jane\Generator\File[]

printFiles() public method

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