Skip to content

Latest commit

 

History

History
164 lines (63 loc) · 1.99 KB

ExpandTraits.md

File metadata and controls

164 lines (63 loc) · 1.99 KB

ExpandTraits

Look at all (direct) traits for a schema and:

  • merge trait annotations/methods/properties into the schema if the trait does not have a schema itself
  • inherit from the trait if it has a schema (allOf).
  • Full name: \OpenApi\Processors\ExpandTraits

Methods

__invoke

public __invoke(\OpenApi\Analysis $analysis): mixed

Parameters:

Parameter Type Description
$analysis \OpenApi\Analysis

Inherited methods

inheritFrom

protected inheritFrom(\OpenApi\Annotations\Schema $schema, \OpenApi\Annotations\Schema $from, string $refPath, ?\OpenApi\Context $context): void

Parameters:

Parameter Type Description
$schema \OpenApi\Annotations\Schema
$from \OpenApi\Annotations\Schema
$refPath string
$context ?\OpenApi\Context

mergeAnnotations

protected mergeAnnotations(\OpenApi\Annotations\Schema $schema, array $from, array& $existing): void

Parameters:

Parameter Type Description
$schema \OpenApi\Annotations\Schema
$from array
$existing array

mergeProperties

protected mergeProperties(\OpenApi\Annotations\Schema $schema, array $from, array& $existing): void

Parameters:

Parameter Type Description
$schema \OpenApi\Annotations\Schema
$from array
$existing array

mergeMethods

protected mergeMethods(\OpenApi\Annotations\Schema $schema, array $from, array& $existing): void

Parameters:

Parameter Type Description
$schema \OpenApi\Annotations\Schema
$from array
$existing array