PHP Configuration Options
This section details the available configuration options for the PHP SDK. All configuration is managed in the gen.yaml file under the php section.
Version and general configuration
php:
version: 1.2.3
packageName: "openapi/openapi"
namespace: "OpenAPI\\OpenAPI"Method and parameter management
php:
maxMethodParams: 4Security configuration
php:
flattenGlobalSecurity: trueImport management
php:
imports:
option: "openapi"
paths:
callbacks: models/Callbacks
errors: models/Errors
operations: models/Operations
shared: models/Components
webhooks: models/WebhooksImport paths
Error and Response Handling
php:
clientServerStatusCodesAsErrors: true
responseFormat: "flat"
enumFormat: "enum"Laravel service provider
When a PHP SDK is used within a Laravel application, Speakeasy is able to generate the needed Service Provider
…all of Laravel’s core services, are bootstrapped via service providers.
But, what do we mean by “bootstrapped”? In general, we mean registering things, including registering service container bindings, event listeners, middleware, and even routes. Service providers are the central place to configure the application.
To enable the Laravel Service Provider generation, update the gen.yaml configuration setting enabled to true, and set svcName appropriately.
php:
laravelServiceProvider:
enabled: true
svcName: "openapi"Laravel service provider configuration
Additional dependencies
php:
additionalDependencies: {
"autoload": {
"OpenAPI\\OpenAPI\\Lib\\": "lib/"
},
"autoload-dev": {
"OpenAPI\\OpenAPI\\Test\\": "Tests/"
},
"require": {
"firebase/php-jwt": "^6.10",
"phpseclib/phpseclib": "^3.0"
},
"require-dev": {
"monolog/monolog": "^3.0"
}
}Additional dependencies configuration
Last updated on