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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
api_schemas-0.1.4.tar.gz
(9.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file api_schemas-0.1.4.tar.gz.
File metadata
- Download URL: api_schemas-0.1.4.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.6 CPython/3.9.4 Linux/5.4.0-1046-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf791725e3a51c81f7f825103d32c5cda74e2c6914a3ac6650f0be7246f3b8d2
|
|
| MD5 |
541660bb28709d84d6d3bee765401171
|
|
| BLAKE2b-256 |
7d5eb7d1204960b27b475385f53c78097370e2fed861bf804c05ce9a3bd59298
|
File details
Details for the file api_schemas-0.1.4-py3-none-any.whl.
File metadata
- Download URL: api_schemas-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.6 CPython/3.9.4 Linux/5.4.0-1046-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a89b6b29425fc7ce4e575e83e0e4abc46998dd5b4bd0d081b4f677cf7de33fb1
|
|
| MD5 |
491c084fadf737e01a4a1162097da55e
|
|
| BLAKE2b-256 |
e5d3cae1fce072fe9a71afc68e8a97059dfa1f304f1734b91f7ef7e36ee2cbc3
|