Skip to content

Commit 5438e05

Browse files
committed
Have the opag command in the bin vendor folder
1 parent b5e2167 commit 5438e05

2 files changed

Lines changed: 28 additions & 9 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@
22

33
This CLI Tool is able to generate an OpenApi JSON file description according to PHP attributes contained in your files.
44

5-
65
## ⚠️ Missing something ?
7-
Just open an issue saying what's missing ! Feel free to open a PR but we recommend opening an issue beforehand.
8-
6+
Just open an issue saying what's missing ! Feel free to open a PR but we recommend opening an issue beforehand.
97

108
## Where to start ?
11-
- `composer require uderline/openapi-php-attributes`
12-
- Describe your API by following this documentation: https://uderline.github.io/openapi-php-attributes/
13-
- Then, generate the JSON file: `php ./vendor/uderline/openapi-php-attributes/opag /src/files/project openapi.json`.
9+
1 - Install the package openapi-php-attributes-generator with composer.
1410

15-
A new file called `openapi.json` has been generated !
11+
```bash
12+
composer require uderline/openapi-php-attributes
13+
```
1614

15+
2 - Describe your API by following this documentation: https://uderline.github.io/openapi-php-attributes/
16+
17+
3 - Generate the JSON file:
18+
```bash
19+
php ./vendor/bin/opag /src/files/project openapi.json
20+
```
21+
22+
A new file called `openapi.json` has been generated !
1723

1824
## Example
1925
```php

composer.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
22
"name": "uderline/openapi-php-attributes",
33
"description": "Automatically render your OpenApi 3 file describing your PHP API using attributes",
4-
"keywords": ["api", "php", "json", "attributes", "openapi", "renderer", "api-rest", "openapi3", "php8"],
4+
"keywords": [
5+
"api",
6+
"php",
7+
"json",
8+
"attributes",
9+
"openapi",
10+
"renderer",
11+
"api-rest",
12+
"openapi3",
13+
"php8"
14+
],
515
"minimum-stability": "stable",
616
"homepage": "https://uderline.github.io/openapi-php-attributes/",
717
"license": "MIT",
@@ -32,5 +42,8 @@
3242
},
3343
"scripts": {
3444
"test": "vendor/bin/phpunit tests"
35-
}
45+
},
46+
"bin": [
47+
"opag"
48+
]
3649
}

0 commit comments

Comments
 (0)