api-schemas-0.1.4
توضیحات
Create an intermediate representation of an api schema, that can be used to generate code.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | api-schemas-0.1.4 |
| نام | api-schemas |
| نسخه کتابخانه | 0.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | JulianSobott |
| ایمیل نویسنده | julian.sobott@gmail.com |
| آدرس صفحه اصلی | https://github.com/JulianSobott/api_schemas |
| آدرس اینترنتی | https://pypi.org/project/api-schemas/ |
| مجوز | MIT |
# API schemas
Create an intermediate representation of an api schema, that can be used to generate code.
**In other words**: Same what OpenAPI has already but with fewer options.
**But why?**: Because it is fun 😎
## Example API schema
```
typedef Example
a: str
b: int
c: float
d: any
e: D {A, B, C}
f: E
Z = v v
?g[]: bool
i: str
type = Date
format = yyyy-mm-dd HH:MM:ss.SSS
j: $Week
typedef Date str
type = Datetime
format = yyyy-mm-dd HH:MM:ss.SSS
typedef Week {Monday, Tuesday, Wednesday}
typedef Q
a: $Example
b: $Date
typedef QQ $Q
server = http://localhost:5000/api/v1
people
uri: /people/<name>
GET
->
<-
200
data: $Example
404
err_msg: str
500
err_msg: str
WS
->
a
i: str
b: Name
x: str
i: int
join_team
num: str
<-
update
i[]: int
```
## Changelog
### 0.1.3
- Add compilers to build dataclasses for python and dart
- Add Websocket support
- Allow Communications that are an array instead of an object
### 0.1.4
Date: 01.05.2020
- Attribute body can be ReferenceType (#c9d8a896cd3653b36315cb31058e616d1296f988)
- ReferenceType resolution after transform (#4f59f43861a0bccf65f20689d87b85962e0ad81e)
- Basic error messages
- Compiler: Add get_native_type method (#6ea36a7353847b064633908cb42cf6e449050e5a)
نیازمندی
| مقدار | نام |
|---|---|
| >=0.11.2,<0.12.0 | lark-parser |
| >=1.1.4,<2.0.0 | Mako |
| >=1.5.6,<2.0.0 | autopep8 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl api-schemas-0.1.4:
pip install api-schemas-0.1.4.whl
نصب پکیج tar.gz api-schemas-0.1.4:
pip install api-schemas-0.1.4.tar.gz