mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-11-15 21:13:41 +00:00
Compare commits
12 Commits
9c584689f6
...
5e863fa930
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e863fa930 | |||
| 4417c860b9 | |||
| 64a3737da8 | |||
| 6c13090d8d | |||
| 0425f118a0 | |||
| 5693b84c21 | |||
| 18763d16cf | |||
| 3007e129c5 | |||
| b3730890a2 | |||
| 896384c081 | |||
| 252f7ba6d4 | |||
| 771a4333f2 |
@ -174,7 +174,9 @@ Again, the most checks can be performed by `make check` command, though some add
|
|||||||
|
|
||||||
from marshmallow import Schema, fields
|
from marshmallow import Schema, fields
|
||||||
|
|
||||||
from ahriman.web.schemas import AuthSchema, ErrorSchema, PackageNameSchema, PaginationSchema
|
from ahriman.web.schemas.auth_schema import AuthSchema
|
||||||
|
from ahriman.web.schemas.error_schema import ErrorSchema
|
||||||
|
from ahriman.web.schemas.package_name_schema import PackageNameSchema
|
||||||
from ahriman.web.views.base import BaseView
|
from ahriman.web.views.base import BaseView
|
||||||
|
|
||||||
|
|
||||||
@ -208,14 +210,10 @@ Again, the most checks can be performed by `make check` command, though some add
|
|||||||
)
|
)
|
||||||
@aiohttp_apispec.cookies_schema(AuthSchema) # should be always presented
|
@aiohttp_apispec.cookies_schema(AuthSchema) # should be always presented
|
||||||
@aiohttp_apispec.match_info_schema(PackageNameSchema)
|
@aiohttp_apispec.match_info_schema(PackageNameSchema)
|
||||||
@aiohttp_apispec.querystring_schema(PaginationSchema)
|
|
||||||
@aiohttp_apispec.json_schema(RequestSchema(many=True))
|
@aiohttp_apispec.json_schema(RequestSchema(many=True))
|
||||||
async def post(self) -> None: ...
|
async def post(self) -> None: ...
|
||||||
```
|
```
|
||||||
|
|
||||||
* It is allowed to change web API to add new fields or remove optional ones. However, in case of model changes, new API version must be introduced.
|
|
||||||
* On the other hand, it is allowed to change method signatures, however, it is recommended to add new parameters as optional if possible. Deprecated API can be dropped during major release.
|
|
||||||
|
|
||||||
### Other checks
|
### Other checks
|
||||||
|
|
||||||
The projects also uses typing checks (provided by `mypy`) and some linter checks provided by `pylint` and `bandit`. Those checks must be passed successfully for any open pull requests.
|
The projects also uses typing checks (provided by `mypy`) and some linter checks provided by `pylint` and `bandit`. Those checks must be passed successfully for any open pull requests.
|
||||||
|
|||||||
Reference in New Issue
Block a user