Skip to content
Permalink
Browse files

Remove schema from request

  • Loading branch information...
mabar committed Feb 24, 2019
1 parent 38785e1 commit 44c2e28d071c5971c5c127bbb351dd9fbc9fb5e1
Showing with 1 addition and 6 deletions.
  1. +0 −3 .docs/router.md
  2. +0 −1 src/Http/RequestAttributes.php
  3. +1 −2 src/Router/SimpleRouter.php
@@ -27,9 +27,6 @@ use Apitte\Core\Schema\Schema;
/** @var Endpoint $endpoint Schema of matched endpoint */
$endpoint = $request->getAttribute(RequestAttributes::ATTR_ENDPOINT);
/** @var Schema $schema */
$schema = $request->getAttribute(RequestAttributes::ATTR_SCHEMA);
/** @var mixed $match All matched parts of url */
$match = $request->getAttribute(RequestAttributes::ATTR_ROUTER);
@@ -5,7 +5,6 @@
interface RequestAttributes
{
public const ATTR_SCHEMA = 'apitte.core.schema';
public const ATTR_ENDPOINT = 'apitte.core.endpoint';
public const ATTR_ROUTER = 'apitte.core.router';
public const ATTR_PARAMETERS = 'apitte.core.parameters';
@@ -42,8 +42,7 @@ public function match(ServerRequestInterface $request): ?ServerRequestInterface
// with all parsed arguments and data,
// also append given Endpoint
$matched = $matched
->withAttribute(RequestAttributes::ATTR_ENDPOINT, $endpoint)
->withAttribute(RequestAttributes::ATTR_SCHEMA, $this->schema);
->withAttribute(RequestAttributes::ATTR_ENDPOINT, $endpoint);
return $matched;
}

0 comments on commit 44c2e28

Please sign in to comment.
You can’t perform that action at this time.