You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ Full compatible smart structured API defined by schema.
10
10
- Full compatible with Nette framework,
11
11
- Inject dependencies by `@inject` annotation in public property.
12
12
13
-
How to install
14
-
--------------
13
+
📦 Installation & Basic Usage
14
+
-----------------------------
15
15
16
16
This package can be installed using [PackageRegistrator](https://github.com/baraja-core/package-manager) which is also part of the Baraja [Sandbox](https://github.com/baraja-core/sandbox). If you are not using it, you have to install the package manually following this guide.
17
17
@@ -20,11 +20,11 @@ A model configuration can be found in the `common.neon` file inside the root of
20
20
To manually install the package call Composer and execute the following command:
21
21
22
22
```shell
23
-
composer require baraja-core/structured-api
23
+
$ composer require baraja-core/structured-api
24
24
```
25
25
26
-
API endpoint
27
-
------------
26
+
🛠️ API endpoint
27
+
---------------
28
28
29
29
API endpoint is simple class with action methods and dependencies. For best comfort please use your custom BaseEndpoint with declaring all required dependencies.
30
30
@@ -35,10 +35,10 @@ Simple example:
35
35
36
36
declare(strict_types=1);
37
37
38
-
namespace Baraja\StructuredApi;
38
+
namespace App\Model;
39
39
40
40
41
-
class TestEndpoint extends BaseEndpoint
41
+
final class MyAwesomeEndpoint extends BaseEndpoint
42
42
{
43
43
44
44
/**
@@ -70,3 +70,17 @@ class TestEndpoint extends BaseEndpoint
70
70
Method `actionDefault` is used for request in format `/api/v1/test` with query parameter `?hello=...`.
71
71
72
72
Method `postCreateUser` will be called by POST request with all data.
73
+
74
+
🗺️ Project endpoint documentation
75
+
---------------------------------
76
+
77
+
When developing a real application, you will often need to pass work between the backend and the frontend.
78
+
79
+
To describe all endpoints, the package offers an optional extension that generates documentation automatically based on real code scanning.
80
+
81
+
Try the [Structured API Documentation](https://github.com/baraja-core/structured-api-doc).
82
+
83
+
📄 License
84
+
-----------
85
+
86
+
`baraja-core/structured-api` is licensed under the MIT license. See the [LICENSE](https://github.com/baraja-core/structured-api/blob/master/LICENSE) file for more details.
0 commit comments