OpenApiParent301
extends OpenApiParent300
in package
Class to generate default elements for OpenApi v3.0.1.
Table of Contents
- $definition : stdClass
- $settings : Config
- $version : string
- OpenApi doc version.
- __construct() : mixed
- export() : stdClass|string
- Export the definition.
- getAccount() : string
- Get the account name from the schema
- getApplication() : string
- Get the application name from the schema
- import() : mixed
- Import an existing definition.
- setAccount() : mixed
- Set the account name.
- setApplication() : mixed
- Set the application name.
- setDefault() : mixed
- Sets the default OpenApi parent schema fragments to define the resources in the doc (application).
- setDomain() : mixed
- Set the domain.
- getDefaultComponents() : stdClass
- Returns the default components element.
- getDefaultInfo() : stdClass
- Returns the default info element.
- getDefaultResponses() : stdClass
- Returns the default responses element.
- getDefaultSchemas() : stdClass
- Returns the default schemas element.
- getDefaultSecuritySchemes() : stdClass
- Returns the default securitySchemes element.
- getDefaultServers() : array<string|int, mixed>
- Returns the default servers, based on settings.php.
Properties
$definition
protected
stdClass
$definition
Doc definition.
$settings
protected
Config
$settings
Settings object.
$version
OpenApi doc version.
protected
string
$version
= "3.0.1"
Methods
__construct()
public
__construct([Config|null $settings = null ]) : mixed
Parameters
- $settings : Config|null = null
Return values
mixed —export()
Export the definition.
public
export([bool $encoded = true ]) : stdClass|string
Parameters
- $encoded : bool = true
-
JSON encoded.
Tags
Return values
stdClass|string —getAccount()
Get the account name from the schema
public
abstract getAccount() : string
Tags
Return values
string —getApplication()
Get the application name from the schema
public
abstract getApplication() : string
Tags
Return values
string —import()
Import an existing definition.
public
import(array<string|int, mixed>|string $definition) : mixed
Parameters
- $definition : array<string|int, mixed>|string
Tags
Return values
mixed —setAccount()
Set the account name.
public
abstract setAccount(string $accountName) : mixed
Parameters
- $accountName : string
Tags
Return values
mixed —setApplication()
Set the application name.
public
abstract setApplication(string $applicationName) : mixed
Parameters
- $applicationName : string
Tags
Return values
mixed —setDefault()
Sets the default OpenApi parent schema fragments to define the resources in the doc (application).
public
abstract setDefault(string $accountName, string $applicationName) : mixed
Parameters
- $accountName : string
- $applicationName : string
Tags
Return values
mixed —setDomain()
Set the domain.
public
abstract setDomain() : mixed
Tags
Return values
mixed —getDefaultComponents()
Returns the default components element.
protected
getDefaultComponents() : stdClass
Tags
Return values
stdClass —getDefaultInfo()
Returns the default info element.
protected
getDefaultInfo(string $applicationName) : stdClass
Parameters
- $applicationName : string
Tags
Return values
stdClass —getDefaultResponses()
Returns the default responses element.
protected
getDefaultResponses() : stdClass
Tags
Return values
stdClass —getDefaultSchemas()
Returns the default schemas element.
protected
getDefaultSchemas() : stdClass
Tags
Return values
stdClass —getDefaultSecuritySchemes()
Returns the default securitySchemes element.
protected
getDefaultSecuritySchemes() : stdClass
Return values
stdClass —getDefaultServers()
Returns the default servers, based on settings.php.
protected
getDefaultServers(string $accountName, string $applicationName) : array<string|int, mixed>
Parameters
- $accountName : string
- $applicationName : string