Skip to content

openapi-generator template for PHP8.1(enum, type declarations)

Notifications You must be signed in to change notification settings

77web/openapi-generator-php81-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

openapi-generator-php81-templates

openapi-generator template for PHP8.1(enum, type declarations)

usage

create package.json

npm init

add this package(templates) as dependency

npm install "77web/openapi-generator-php81-templates#v1.0.1"

run openapi-generator-cli with -t option

openapi-generator-cli generate -g php -i path/to/spec.yaml -c path/to/config.json -o ./ -t ./node_modules/quartetcom-openapi-generator-php81-templates/templates

features

  • PHP8.1: require PHP8.1+ in composer.json
  • Enums: OpenAPI enums are provided in PHP native enums
  • Type declarations for Model methods: No #[ReturnTypeWillChange] needed

how it works

About

openapi-generator template for PHP8.1(enum, type declarations)

Resources

Stars

Watchers

Forks

Packages

No packages published