4
4
- IX-API V2 Schema: https://docs.ix-api.net/v2/redoc
5
5
6
6
## What is this framework?
7
- This project provides a base template for IX-API to make it simpler and faster to implement IX-API .
7
+ The project provides a base template for IX-API to make it simpler and faster to implement.
8
8
9
- The project is written in PHP using the Symfony [ API Platform] ( https://api-platform.com/ ) framework.
9
+ The implementation framework is written in PHP using [ Symfony] ( https://symfony.com/ ) , [ API Platform] ( https://api-platform.com/ ) framework.
10
+ API Platform has extensive documentation which it is recommended to be familiar with to understand the inner workings.
10
11
11
12
## How does this framework work?
12
13
API Platform maps class based entities to RESTful API endpoints, this suits the IX-API schema.
@@ -21,16 +22,34 @@ business logic to and from these classes to have a functioning implementation.
21
22
- Swagger UI auto generated via API Platform
22
23
- Docker image for quick development setup
23
24
25
+ ## Installation
26
+ 1 . Setup JWT keys with a password, ** keep a note of this for the next step**
27
+ ``` bash
28
+ openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096`
29
+ openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout
30
+ ` ` `
31
+ 2. Run ` cp .env .env.local`
32
+ 3. Setup your local environment variables
33
+ * Change ` DATABASE_URL` if required, defaults to local Docker
34
+ * Update ` JWT_PASSPHRASE=` according to the step ** 1** .
35
+ 4. Run ` docker-compose up`
36
+ 5. Browse to ` https://localhost`
37
+
24
38
# # Swagger UI
25
39
! [alt text](public/images/example1.png)
26
40
27
41
# # How to enable certain entities only?
28
- It is possible to toggle enabled entities via the ` config/packages/api_platform.yaml ` config file:
42
+ It is possible to toggle enabled entities via ` config/packages/api_platform.yaml` config file:
29
43
` ` ` yaml
30
44
api_platform:
31
45
mapping:
32
46
paths:
33
47
` ` `
34
48
49
+ # # Tests
50
+ Tests can be run via the script: ` run_tests.sh` .
51
+
52
+ Tests run on a separate ` api_test` database that is populated with fixtures found in ` /fixtures` .
53
+
35
54
# # Version Support
36
- This branch supports the V2 schema, future branches will support further versions.
55
+ This branch supports V2 schema, future branches will support further versions.
0 commit comments