Create schema for the API (#28)

* feat(schema): add basic structs for schema

* feat(schema): implement base62 id parsing

* docs(schema): add documentation for schema structs
fix(schema): prevent integer overflow in base62 decoding

* refactor(schema): move ids into submodules, reexport from ids mod

* feat(schema): add random generation of base62 ids
style: run rustfmt
This commit is contained in:
Aeledfyr
2020-07-01 15:24:42 -05:00
committed by GitHub
parent f22e4f1cc7
commit 6d16b68f11
6 changed files with 327 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
use serde::{Deserialize, Serialize};
/// An error returned by the API
#[derive(Serialize, Deserialize)]
pub struct ApiError<'a> {
pub error: &'a str,