* feat: support to okapi * fix: fmt checks * chore: rocket-okapi-example: add required schemas * chore: rocket-okapi-example: add dto * chore: rocket-okapi-example: add custom error * chore: rocket-okapi-example: add api controllers * chore: rocket-okapi-example: add notes in Readme * chore: make rocket_okapi optional * refactor: delete rocket example from rocket_example * chore: rocket-okapi-example: add base files for okapi example * chore: rocket-okapi-example: add controllers and dto * chore: rocket-okapi-example: add docs
13 lines
354 B
Rust
13 lines
354 B
Rust
use entity::*;
|
|
use rocket::serde::{Deserialize, Serialize};
|
|
use rocket_okapi::okapi::schemars::{self, JsonSchema};
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)]
|
|
#[serde(crate = "rocket::serde")]
|
|
pub struct PostsDto {
|
|
pub page: u64,
|
|
pub posts_per_page: u64,
|
|
pub num_pages: u64,
|
|
pub posts: Vec<post::Model>,
|
|
}
|