Skip to content

Commit

Permalink
fix api uses
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Mar 29, 2016
1 parent 8fd60ee commit 95f42c1
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
5 changes: 2 additions & 3 deletions library/PSX/Framework/Console/ResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
namespace PSX\Framework\Console;

use PSX\Api\Resource;
use PSX\Api\Resource\Generator;
use PSX\Api\Resource\ListingInterface;
use PSX\Api\Generator;
use PSX\Api\ListingInterface;
use PSX\Data\ExporterInterface;
use PSX\Data\Processor;
use PSX\Framework\Config\Config;
use RuntimeException;
use Symfony\Component\Console\Command\Command;
Expand Down
2 changes: 1 addition & 1 deletion library/PSX/Framework/Controller/AnnotationApiAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace PSX\Framework\Controller;

use PSX\Api\Resource\Parser;
use PSX\Api\Parser;
use PSX\Framework\Loader\Context;

/**
Expand Down
6 changes: 3 additions & 3 deletions library/PSX/Framework/Controller/Generator/RamlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
namespace PSX\Framework\Controller\Generator;

use PSX\Api\Resource;
use PSX\Api\Resource\Generator;
use PSX\Api\Resource\Util\Inflection;
use PSX\Api\Generator;
use PSX\Api\Util\Inflection;
use PSX\Framework\Controller\ControllerAbstract;
use PSX\Http\Exception as HttpException;

Expand All @@ -37,7 +37,7 @@ class RamlController extends ControllerAbstract
{
/**
* @Inject
* @var \PSX\Api\Resource\ListingInterface
* @var \PSX\Api\ListingInterface
*/
protected $resourceListing;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
namespace PSX\Framework\Controller\Generator;

use PSX\Api\Resource;
use PSX\Api\Resource\Generator;
use PSX\Api\Resource\Util\Inflection;
use PSX\Api\Generator;
use PSX\Api\Util\Inflection;
use PSX\Data\Exporter;
use PSX\Framework\Controller\ControllerAbstract;
use PSX\Data\WriterInterface;
Expand All @@ -41,7 +41,7 @@ class SwaggerController extends ControllerAbstract
{
/**
* @Inject
* @var \PSX\Api\Resource\ListingInterface
* @var \PSX\Api\ListingInterface
*/
protected $resourceListing;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace PSX\Framework\Controller\Tool;

use PSX\Api\Resource;
use PSX\Api\Resource\Generator;
use PSX\Api\Generator;
use PSX\Framework\Controller\ApiAbstract;
use PSX\Data\Record;
use PSX\Schema\Generator as SchemaGenerator;
Expand All @@ -39,7 +39,7 @@ class DocumentationController extends ApiAbstract
{
/**
* @Inject
* @var \PSX\Api\Resource\ListingInterface
* @var \PSX\Api\ListingInterface
*/
protected $resourceListing;

Expand Down
5 changes: 3 additions & 2 deletions library/PSX/Framework/Exception/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
use PSX\Framework\DisplayException;
use PSX\Framework\Template\ErrorException;
use PSX\Model\Common\Error;
use PSX\Schema\ValidationException;
use PSX\Schema;
use PSX\Validate;

/**
* Converter
Expand Down Expand Up @@ -80,7 +81,7 @@ public function convert(Exception $exception)
} else {
// if we have an display exception we can use the error message else
// we hide the message with an general error message
if ($exception instanceof DisplayException || $exception instanceof ValidationException) {
if ($exception instanceof DisplayException || $exception instanceof Schema\ValidationException || $exception instanceof Validate\ValidationException) {
$message = $exception->getMessage();
} else {
$message = 'The server encountered an internal error and was unable to complete your request.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace PSX\Framework\Tests\Controller\Foo\Application\SchemaApi;

use PSX\Api\Resource\Parser;
use PSX\Api\Parser;
use PSX\Api\Resource;
use PSX\Framework\Controller\SchemaApiAbstract;
use PSX\Framework\Loader\Context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public function testWsdlSchema()
$dom = new DOMDocument();
$dom->loadXML($wsdl);

$result = $dom->schemaValidate(__DIR__ . '/../../../../Api/Tests/Resource/Generator/Wsdl/wsdl1.xsd');
$result = $dom->schemaValidate(__DIR__ . '/../../../../Api/Tests/Generator/Wsdl/wsdl1.xsd');

$this->assertTrue($result);
}
Expand Down

0 comments on commit 95f42c1

Please sign in to comment.