Skip to content

Commit

Permalink
Merge pull request #6 from kynx/markdown-lint
Browse files Browse the repository at this point in the history
Fix markdown style
  • Loading branch information
kynx authored Oct 21, 2024
2 parents ae213e5 + 31899bc commit 9066f39
Show file tree
Hide file tree
Showing 7 changed files with 1,176 additions and 835 deletions.
9 changes: 9 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"default": true,
"MD013": false,
"MD014": false,
"MD024": false,
"MD028": false,
"MD031": { "list_items": false },
"MD034": false
}
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Create pipeline [delegator factory]. This includes standard middleware (ProblemD

### Considerations

* Pipeline delegator factory should be opt-in from command line - too much stuff a user might want to customise later.

* Pipeline delegator factory should be opt-in from command line - too much stuff a user might want to customise later.

## Routing

Expand All @@ -25,31 +24,28 @@ Routes have the original OpenApi path set as an option so it is available to mid

Add `mezzio/authentication` implementations. OAuth2 is a bitch.


### Validator

Use [openapi-psr7-validator]?

### Considerations

* Do we validate before or after authentication? Probably after: [Google Cloud Endpoints] could replace the authentication, but
* Do we validate before or after authentication? Probably after: [Google Cloud Endpoints] could replace the authentication, but
doesn't really validate requests.

### RequestParser

Adds OpenApiRequestInterface attribute to request. This contains path, query, header and cookie parameters along with
Adds OpenApiRequestInterface attribute to request. This contains path, query, header and cookie parameters along with
parsed request body. Everything is strongly typed - ie query params converted to ints / model objects / etc.

TOOD: handling XML request bodies. Add / find an XML strategy to add to BodyParamsMiddleware. The schema includes extra
TOOD: handling XML request bodies. Add / find an XML strategy to add to BodyParamsMiddleware. The schema includes extra
stuff on how the XML is formatted that we will need to figure out...


## Handlers

Handler per operation with `get` / `patch` / `post` / etc methods. Uses `operationId` for naming. Will need
to construct a default name (path + method?) if no `operationId` given.


## TODO

[ ] Sanitize hydration errors - ie `Cannot hydrate My\Api\Operation\Services\Search\Get\QueryParams: My\Api\Operation\Services\Search\Get\QueryParams::__construct(): Argument #2 ($search) must be of type ?string, array given, called in /Users/matt/www/lifecycle-calculator/src/Api/Operation/Services/Search/Get/QueryParamsHydrator.php on line 37`
Expand Down
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@
}
},
"require": {
"php": "~8.1 || ~8.2 || ~8.3",
"league/openapi-psr7-validator": "^0.18.0",
"php": "~8.2 || ~8.3",
"devizzent/cebe-php-openapi": "^1.0.3",
"league/openapi-psr7-validator": "^0.22",
"mezzio/mezzio": "^3.15",
"psr/http-message": "^1.0 || ^2.0",
"psr/http-server-middleware": "^1.0",
"rize/uri-template": "^0.3.5",
"symfony/yaml": "^7.0",
"webimpress/safe-writer": "^2.2",
"willdurand/negotiation": "^3.1"
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.4",
"laminas/laminas-coding-standard": "^3.0",
"laminas/laminas-diactoros": "^3.2",
"laminas/laminas-servicemanager": "^3.20",
"phpunit/phpunit": "^10.4",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-phpunit": "^0.19",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.7",
"vimeo/psalm": "^5.15"
Expand Down
Loading

0 comments on commit 9066f39

Please sign in to comment.