Skip to content

Commit 8791bc4

Browse files
committed
overriding mapping classes
1 parent a53ad07 commit 8791bc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ $this->assertSame('my-value', $myMeta->name);
314314

315315
If you want to tolerate invalid data or improve mapping performance you can specify `skipValidation` flag in processing `Context`
316316

317-
```
317+
```php
318318
$schema = Schema::object();
319319
$schema->setProperty('one', Schema::integer());
320320
$schema->properties->one->minimum = 5;
@@ -331,7 +331,7 @@ $this->assertSame(4, $res->one);
331331

332332
If you want to map data to a different class you can register mapping at top level of your importer structure.
333333

334-
```
334+
```php
335335
class CustomSwaggerSchema extends SwaggerSchema
336336
{
337337
public static function setUpProperties($properties, JsonBasicSchema $ownerSchema)
@@ -344,7 +344,7 @@ class CustomSwaggerSchema extends SwaggerSchema
344344

345345
Or specify it in processing context
346346

347-
```
347+
```php
348348
$context = new Context();
349349
$context->objectItemClassMapping[Schema::className()] = CustomSchema::className();
350350
$schema = SwaggerSchema::schema()->in(json_decode(

0 commit comments

Comments
 (0)