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
Improve documentation clarity and fix outdated information (#1129)
* Initial plan
* Improve documentation clarity, fix typos, and update outdated information
Co-authored-by: jbtronics <[email protected]>
* Replace LCSC with Mouser in cloud providers list per d-buchmann's review
Co-authored-by: jbtronics <[email protected]>
* Remove outdated Mouser API issue notice
Removed outdated information about the Mouser API's current issues with datasheets and part specifications.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jbtronics <[email protected]>
Co-authored-by: Jan Böhmer <[email protected]>
*`public`: Everything in this directory will be publicly accessible via web. Use this folder to serve static images.
24
-
*`assets`: The frontend assets are saved here. You can find the javascript and CSS code here.
25
-
*`src`: Part-DB's PHP code is saved here. Note that the sub directories are structured by the classes purposes (so use `Controller` Controllers, `Entities` for Database models, etc.)
26
-
*`translations`: The translations used in Part-DB are saved here
24
+
*`assets`: The frontend assets are saved here. You can find the JavaScript and CSS code here.
25
+
*`src`: Part-DB's PHP code is saved here. Note that the subdirectories are structured by the classes' purposes (so use `Controller`for Controllers, `Entity` for Database models, etc.)
26
+
*`translations`: The translations used in Part-DB are saved here.
27
27
*`templates`: The templates (HTML) that are used by Twig to render the different pages. Email templates are also saved here.
28
-
*`tests/`: Tests that can be run by PHPunit.
28
+
*`tests/`: Tests that can be run by PHPUnit.
29
29
30
30
## Development environment
31
-
For setting up an development you will need to install PHP, composer, a database server (MySQL or MariaDB) and yarn (which needs an nodejs environment).
32
-
* Copy `.env` to `.env.local` and change `APP_ENV` to `APP_ENV=dev`. That way you will get development tools (symfony profiler) and other features that
31
+
For setting up a development environment, you will need to install PHP, Composer, a database server (MySQL or MariaDB) and yarn (which needs a Node.js environment).
32
+
* Copy `.env` to `.env.local` and change `APP_ENV` to `APP_ENV=dev`. That way you will get development tools (Symfony profiler) and other features that
33
33
will simplify development.
34
-
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies
35
-
* Run `yarn watch`. The program will run in the background and compile the frontend files whenever you change something in the CSS or TypeScript files
36
-
* For running Part-DB it is recommended to use [Symfony CLI](https://symfony.com/download).
37
-
That way you can run a correct configured webserver with `symfony serve`
34
+
* Run `composer install` (without -o) to install PHP dependencies and `yarn install` to install frontend dependencies.
35
+
* Run `yarn watch`. The program will run in the background and compile the frontend files whenever you change something in the CSS or TypeScript files.
36
+
* For running Part-DB, it is recommended to use [Symfony CLI](https://symfony.com/download).
37
+
That way you can run a correctly configured webserver with `symfony serve`.
38
38
39
39
## Coding style
40
-
Code should follow the [PSR12-Standard](https://www.php-fig.org/psr/psr-12/) and symfony's [coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
40
+
Code should follow the [PSR-12 Standard](https://www.php-fig.org/psr/psr-12/) and Symfony's [coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
41
41
42
42
Part-DB uses [Easy Coding Standard](https://github.com/symplify/easy-coding-standard) to check and fix coding style violations:
43
-
* To check your code for valid code style run `vendor/bin/ecs check src/`
44
-
* To fix violations run `vendor/bin/ecs check src/` (please checks afterwards if the code is valid afterwards)
43
+
* To check your code for valid code style, run `vendor/bin/ecs check src/`
44
+
* To fix violations, run `vendor/bin/ecs check src/ --fix` (please check afterwards if the code is still valid)
45
45
46
46
## GitHub actions
47
-
Part-DB uses GitHub actions to run various tests and checks on the code:
47
+
Part-DB uses GitHub Actions to run various tests and checks on the code:
48
48
* Yarn dependencies can compile
49
-
*PHPunit tests run successful
50
-
* Config files, translations and templates has valid syntax
51
-
* Doctrine schema valid
49
+
*PHPUnit tests run successfully
50
+
* Config files, translations, and templates have valid syntax
51
+
* Doctrine schema is valid
52
52
* No known vulnerable dependencies are used
53
-
* Static analysis successful (phpstan with `--level=2`)
53
+
* Static analysis is successful (phpstan with `--level=2`)
54
54
55
-
Further the code coverage of the PHPunit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).
55
+
Further, the code coverage of the PHPUnit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).
Copy file name to clipboardExpand all lines: docs/api/intro.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ See [Authentication chapter]({% link api/authentication.md %}) for more details.
46
46
47
47
The API is split into different endpoints, which are reachable under the `/api/` path of your Part-DB instance (
48
48
e.g. `https://your-part-db.local/api/`).
49
-
There are various endpoints for each entity type (like `part`, `manufacturer`, etc.), which allow you to read and write data, and some special endpoints like `search` or `statistics`.
49
+
There are various endpoints for each entity type (like `parts`, `manufacturers`, etc.), which allow you to read and write data, and some special endpoints like `search` or `statistics`.
50
50
51
51
For example, all API endpoints for managing categories are available under `/api/categories/`. Depending on the exact
52
52
path and the HTTP method used, you can read, create, update or delete categories.
@@ -56,7 +56,7 @@ For most entities, there are endpoints like this:
56
56
***POST**: `/api/categories/` - Create a new category
57
57
***GET**: `/api/categories/{id}` - Get a specific category by its ID
58
58
***DELETE**: `/api/categories/{id}` - Delete a specific category by its ID
59
-
***UPDATE**: `/api/categories/{id}` - Update a specific category by its ID. Only the fields which are sent in the
59
+
***PATCH**: `/api/categories/{id}` - Update a specific category by its ID. Only the fields which are sent in the
60
60
request are updated, all other fields are left unchanged.
61
61
Be aware that you have to set the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) content type
62
62
header (`Content-Type: application/merge-patch+json`) for this to work.
0 commit comments