okapi
okapi copied to clipboard
OpenAPI (AKA Swagger) document generation for Rust projects
Is there a way to annotate a rocket handler method with the HTTP status codes it (possibly) returns a response? I tried to find the functionality, but it seems not...
```rust error[E0308]: mismatched types --> /home/cappy/.cargo/registry/src/github.com-1ecc6299db9ec823/kube-core-0.74.0/src/schema.rs:68:29 | 67 | match common_obj.properties.entry(property_name) { | ------------------------------------------ this expression has type `indexmap::map::core::Entry` found enum `std::collections::btree_map::Entry` ... 72 | Entry::Vacant(entry) => { | ^^^^^^^^^^^^^^^^^^^^...
The 'extensions' fields of various structs within okapi/src/openapi3.rs was not deserialized correctly. ```rust #[serde(flatten)] ``` was empty. The 'extensions' fields used a custom type 'Object'. 'Object' is an alias for...
Currently, there does not appear to be any way to mark an operation as deprecated without fixing up the OpenApi document afterwards. When using the `#[openapi]` attribute to generate documentation...
I'm trying to generate schemas from structs to use inside `rocket_okapi`. Following the documentation I'm doing : ``` rust use rocket_okapi::JsonSchema; use crate::schema::counters; #[derive( Debug, JsonSchema)] pub struct Counter {...
Currently the [`format`](https://rocket.rs/v0.5-rc/guide/requests/#format) tag is ignored in routes. ```rust #[openapi] #[post("/create", data = "", format = "text/plain")] fn something(...) -> ...{ } ```  This should not...
In development a `Cookie` header was added when `CookieJar` was present as a `FromRequest` parameter. But this gave issue for some people. The changes has since been reverted. More info...
Basically what the title says. 😄 If I change to `#[openapi(skip)]`, it works just fine, so I think there is some problem occurring with how the attribute generates code. The...
Is it possible to create a tag description with the current API?
I have a working example with one route and custom schema: ```rust use rocket::get; use rocket::{Build, Rocket}; use rocket_okapi::okapi::openapi3::OpenApi; use rocket_okapi::openapi; use rocket_okapi::openapi_get_routes_spec; use rocket_okapi::settings::OpenApiSettings; use rocket_okapi::{mount_endpoints_and_merged_docs, openapi_get_routes, swagger_ui::*}; #[openapi]...