Skip to content

Commit

Permalink
add conditionals and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
tymondesigns committed Jan 13, 2025
1 parent 5593a6b commit 35d95f5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Types/AbstractSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,25 @@
use Cortex\JsonSchema\Types\Concerns\HasConst;
use Cortex\JsonSchema\Types\Concerns\HasTitle;
use Cortex\JsonSchema\Types\Concerns\HasFormat;
use Cortex\JsonSchema\Types\Concerns\HasMetadata;
use Cortex\JsonSchema\Types\Concerns\HasRequired;
use Cortex\JsonSchema\Types\Concerns\HasReadWrite;
use Cortex\JsonSchema\Types\Concerns\HasValidation;
use Cortex\JsonSchema\Types\Concerns\HasDescription;
use Cortex\JsonSchema\Types\Concerns\HasConditionals;

abstract class AbstractSchema implements Schema

Check failure on line 20 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / PHP8.3 - prefer-lowest - ubuntu-latest

Trait "Cortex\JsonSchema\Types\Concerns\HasMetadata" not found

Check failure on line 20 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / PHP8.3 - prefer-stable - ubuntu-latest

Trait "Cortex\JsonSchema\Types\Concerns\HasMetadata" not found

Check failure on line 20 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / PHP8.4 - prefer-lowest - ubuntu-latest

Trait "Cortex\JsonSchema\Types\Concerns\HasMetadata" not found

Check failure on line 20 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / PHP8.4 - prefer-stable - ubuntu-latest

Trait "Cortex\JsonSchema\Types\Concerns\HasMetadata" not found
{
use HasEnum;
use HasConst;
use HasTitle;
use HasFormat;
use HasMetadata;

Check failure on line 26 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / phpstan

Class Cortex\JsonSchema\Types\AbstractSchema uses unknown trait Cortex\JsonSchema\Types\Concerns\HasMetadata.
use HasRequired;
use HasReadWrite;
use HasValidation;
use HasDescription;
use HasEnum;
use HasConst;
use HasConditionals;

Check failure on line 31 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / phpstan

Class Cortex\JsonSchema\Types\AbstractSchema uses unknown trait Cortex\JsonSchema\Types\Concerns\HasConditionals.

protected string $schemaVersion = 'http://json-schema.org/draft-07/schema#';

Expand Down Expand Up @@ -99,6 +103,8 @@ public function toArray(bool $includeSchemaRef = true, bool $includeTitle = true
$schema = $this->addDescriptionToSchema($schema);
$schema = $this->addEnumToSchema($schema);
$schema = $this->addConstToSchema($schema);
$schema = $this->addConditionalsToSchema($schema);

Check failure on line 106 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Cortex\JsonSchema\Types\AbstractSchema::addConditionalsToSchema().
$schema = $this->addMetadataToSchema($schema);

Check failure on line 107 in src/Types/AbstractSchema.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Cortex\JsonSchema\Types\AbstractSchema::addMetadataToSchema().

return $this->addReadWriteToSchema($schema);
}
Expand Down

0 comments on commit 35d95f5

Please sign in to comment.