for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Apie\OpenapiSchema\Spec;
use Apie\OpenapiSchema\Concerns\CompositeValueObjectWithExtension;
use Apie\OpenapiSchema\Contract\SchemaContract;
use Apie\OpenapiSchema\Exceptions\ExampleAndExamplesAreMutuallyExclusive;
use Apie\OpenapiSchema\Map\EncodingMap;
use Apie\OpenapiSchema\Map\ExampleMap;
use Apie\ValueObjects\ValueObjectInterface;
/**
* @see https://swagger.io/specification/#media-type-object
*/
class MediaType implements ValueObjectInterface
{
use CompositeValueObjectWithExtension;
Apie\OpenapiSchema\Conce...alueObjectWithExtension
$name
Apie\OpenapiSchema\Spec\MediaType
* @var SchemaContract|Schema|Reference|null
private $schema;
$schema
* @var mixed|null
private $example;
* @var ExampleMap|null
private $examples;
* @var EncodingMap|null
private $encoding;
$encoding
private function validateProperties()
if (isset($this->example) && isset($this->examples)) {
throw new ExampleAndExamplesAreMutuallyExclusive();
}