diff --git a/src/Mpociot/ApiDoc/ApiDocGenerator.php b/src/Mpociot/ApiDoc/ApiDocGenerator.php index 2fc07653..f6a475e2 100644 --- a/src/Mpociot/ApiDoc/ApiDocGenerator.php +++ b/src/Mpociot/ApiDoc/ApiDocGenerator.php @@ -137,6 +137,7 @@ protected function parseRule($rule, &$attributeData) $attributeData['required'] = true; break; case 'accepted': + $attributeData['required'] = true; $attributeData['type'] = 'boolean'; break; case 'after': diff --git a/tests/ApiDocGeneratorTest.php b/tests/ApiDocGeneratorTest.php index 38e6ea26..0349ecc1 100644 --- a/tests/ApiDocGeneratorTest.php +++ b/tests/ApiDocGeneratorTest.php @@ -79,7 +79,7 @@ public function testCanParseFormRequestRules() case 'accepted': - $this->assertFalse( $attribute['required'] ); + $this->assertTrue( $attribute['required'] ); $this->assertEquals( 'boolean', $attribute['type'] ); $this->assertCount( 0, $attribute['description'] ); break;