private $service;
protected function setUp(): void
{ $this->service =
$this->
getContainer()->
get(OpenApiDefinitionSchemaBuilder::
class);
} public function testFieldIsMarkedAsNew(): void
{ $definition =
$this->
registerDefinition(SimpleDefinition::
class);
$build =
json_decode(json_encode($this->service->
getSchemaByDefinition($definition, '', false
), \JSON_THROW_ON_ERROR
), true, 512, \JSON_THROW_ON_ERROR
);
static::
assertSame('Added since version: 6.0.0.0',
$build['SimpleJsonApi'
]['description'
]);
static::
assertSame('Added since version: 6.3.9.9.',
$build['SimpleJsonApi'
]['allOf'
][1
]['properties'
]['i_am_a_new_field'
]['description'
]);
} public function testFieldIsMarkedAsNewWithJsonType(): void
{ $definition =
$this->
registerDefinition(SimpleDefinition::
class);
$build =
json_decode(json_encode( $this->service->
getSchemaByDefinition(