Skip to content

Commit

Permalink
Allow $schema in JSON schema (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmajor committed Sep 25, 2022
1 parent 8a516af commit 5b2e12d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions res/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"description": "JSON schema location, e.g. ``vendor\/humbug\/box\/res\/schema.json``",
"type": [ "string", "null"]
},
"algorithm": {
"description": "The algorithm to use for signing the PHAR.",
"type": ["string", "null"]
Expand Down
4 changes: 2 additions & 2 deletions tests/DocumentationSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function test_the_documentation_schema_is_up_to_date(): void
),
);

$this->assertSame($schemaKeys, $docKeys);
$this->assertSame($schemaKeys, ['$schema', ...$docKeys]);
}

public function test_all_the_doc_keys_are_valid(): void
Expand Down Expand Up @@ -90,7 +90,7 @@ public function test_there_is_a_doc_entry_for_each_schema_key(): void
),
);

$this->assertEquals($schemaKeys, $docKeys);
$this->assertEquals($schemaKeys, '$schema', ...$docKeys]);
}

/**
Expand Down

0 comments on commit 5b2e12d

Please sign in to comment.