Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Nov 22, 2018
1 parent 320be70 commit fb5f1c4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/spec/Components.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Components extends SpecBaseObject
protected function attributes(): array
{
return [
'schemas' => [Type::STRING, Schema::class],// TODO implement support for reference
'schemas' => [Type::STRING, Schema::class],
'responses' => [Type::STRING, Response::class],
'parameters' => [Type::STRING, Parameter::class],
'examples' => [Type::STRING, Example::class],
Expand Down
4 changes: 2 additions & 2 deletions src/spec/MediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class MediaType extends SpecBaseObject
protected function attributes(): array
{
return [
'schema' => Schema::class, // TODO support Reference
'schema' => Schema::class,
'example' => Type::ANY,
'examples' => [Type::STRING, Example::class], // TODO support Reference
'examples' => [Type::STRING, Example::class],
'encoding' => [Type::STRING, Encoding::class],
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/spec/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ protected function attributes(): array
'description' => Type::STRING,
'externalDocs' => ExternalDocumentation::class,
'operationId' => Type::STRING,
'parameters' => [Parameter::class],// TODO reference
'parameters' => [Parameter::class],
'requestBody' => RequestBody::class,
'responses' => Responses::class,
'callbacks' => [Type::STRING, Callback::class],// TODO reference
'callbacks' => [Type::STRING, Callback::class],
'deprecated' => Type::BOOLEAN,
'security' => [SecurityRequirement::class],
'servers' => [Server::class],
Expand Down
2 changes: 1 addition & 1 deletion src/spec/PathItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function attributes(): array
'patch' => Operation::class,
'trace' => Operation::class,
'servers' => [Server::class],
'parameters' => [Parameter::class], // @TODO Reference::class
'parameters' => [Parameter::class],
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/spec/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Response extends SpecBaseObject
protected function attributes(): array
{
return [
'description' => Type::STRING,// TODO implement support for reference
'description' => Type::STRING,
'headers' => [Type::STRING, Header::class],
'content' => [Type::STRING, MediaType::class],
'links' => [Type::STRING, Link::class],
Expand Down
2 changes: 1 addition & 1 deletion src/spec/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function attributes(): array
{
return [
'type' => Type::STRING,
'allOf' => [Schema::class], // TODO allow reference
'allOf' => [Schema::class],
'oneOf' => [Schema::class],
'anyOf' => [Schema::class],
'not' => Schema::class,
Expand Down
2 changes: 1 addition & 1 deletion tests/spec/MediaTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testRead()
$this->assertEquals([], $mediaType->getErrors());
$this->assertTrue($result);

//$this->assertEquals('schema', $mediaType->name);// TODO support for reference
$this->assertInstanceOf(Reference::class, $mediaType->schema);
$this->assertInternalType('array', $mediaType->examples);
$this->assertCount(3, $mediaType->examples);
$this->assertArrayHasKey('cat', $mediaType->examples);
Expand Down

0 comments on commit fb5f1c4

Please sign in to comment.