Skip to content

Commit 3c8ad02

Browse files
committed
update
1 parent 097534d commit 3c8ad02

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Types of changes:
2828

2929
**changed**
3030

31+
- `modules/OpenApi/etc/config/OpenApi/composer.json`: changed library versions to auto-patch level (`.*`)
3132
- Logs are fired to Events
3233
- variable names
3334
- "zircote/swagger-php": "4.7.10"

Model/Route.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace OpenApi\Model;
44

55
use HKarlstrom\OpenApiReader\OpenApiReader;
6+
use MVC\Debug;
67
use MVC\Error;
78

89
class Route

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
## Requirements
55

66
- Linux
7-
- php >=7.4
8-
- myMVC
9-
- myMVC 3.2.x: https://github.com/gueff/myMVC/tree/3.2.x
10-
- ZIP: https://github.com/gueff/myMVC/archive/refs/heads/3.2.x.zip
11-
- Doku: https://mymvc.ueffing.net/
7+
- php >= 8
8+
- `pdo` extension
9+
- myMVC 3.3.x
10+
- `git clone --branch 3.3.x https://github.com/gueff/myMVC.git myMVC_3.3.x`
11+
- Docs: <https://mymvc.ueffing.net/>
12+
- github: <https://github.com/gueff/myMVC/tree/3.3.x>
13+
14+
---
1215

1316
## Installation
1417

@@ -21,22 +24,24 @@ https://github.com/gueff/myMVC_module_OpenApi.git \
2124
OpenApi;
2225
~~~
2326

27+
---
28+
2429
## Usage
2530

26-
_validate against openapi file_
31+
_validate against openapi **file**_
2732
~~~php
2833
use OpenApi\Model\Validate;
2934

3035
$oDTValidateRequestResponse = Validate::request(
3136
$oDTRequestCurrent,
32-
Config::get_MVC_PUBLIC_PATH(). '/openapi/api.yaml'
37+
Config::get_MVC_PUBLIC_PATH() . '/openapi/api.yaml'
3338
);
3439

3540
header('Content-Type: application/json');
3641
echo json_encode(Convert::objectToArray($oDTValidateRequestResponse));
3742
~~~
3843

39-
_validate against openapi URL_
44+
_validate against openapi **URL**_
4045
~~~php
4146
use OpenApi\Model\Validate;
4247

@@ -55,20 +60,21 @@ echo json_encode(Convert::objectToArray($oDTValidateRequestResponse));
5560
_All Routes lead to their given `operationId`, set in openapi_
5661
~~~php
5762
\OpenApi\Model\Route::autoCreateFromOpenApiFile(
58-
'/absolute/path/to/openapi.yaml',
63+
Config::get_MVC_PUBLIC_PATH() . '/openapi/api.yaml',
5964
'\Foo\Controller\Api'
6065
);
6166
~~~
6267

6368
_All Routes lead explicitely to `Api::delegate()`_
6469
~~~php
6570
\OpenApi\Model\Route::autoCreateFromOpenApiFile(
66-
'/absolute/path/to/openapi.yaml',
71+
Config::get_MVC_PUBLIC_PATH() . '/openapi/api.yaml',
6772
'\Foo\Controller\Api',
6873
'delegate'
6974
);
7075
~~~
7176

77+
---
7278

7379
## Get Logs
7480

etc/config/OpenApi/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"require": {
3-
"zircote/swagger-php": "4.7.10",
4-
"cebe/php-openapi": "1.7.0",
3+
"zircote/swagger-php": "4.7.*",
4+
"cebe/php-openapi": "1.7.*",
55
"opis/string": "2.0.1",
6-
"hkarlstrom/openapi-reader": "0.5",
7-
"hkarlstrom/openapi-validation-middleware": "0.5.2"
6+
"hkarlstrom/openapi-reader": "0.5.*",
7+
"hkarlstrom/openapi-validation-middleware": "0.5.*"
88
}
99
}

0 commit comments

Comments
 (0)