rocket-okapi v0.8.0-rc.1
GREsau
released this
10 Oct 20:06
·
65 commits
to master
since this release
Added
- Added feature flag
rapidoc
to enable RapiDoc documentation
viewer. (Based on #33) - Added RapiDoc v9.0.0
- Forbid unsafe code in this crate. (#36)
- Retrieve OpenApi object after generating. (#28)
- Create
mount_endpoints_and_merged_docs
marco in order to streamline code structure for
bigger projects. (#30) - Added new example for structuring bigger projects.
- Allowed changing path where OpenApi file is hosted.
- Added
openapi_routes
andopenapi_spec
macros to allow lower level access to the generation
of the routes and specification respectively. - Added
openapi_get_routes
,openapi_get_routes_spec
andopenapi_get_spec
to get a combination
ofVec<rocket::Route>
and/orokapi::openapi3::OpenApi
. - Optionally allows the setting of
OpenApiSettings
when generating the OpenApi objects and Routes. - Add support for UUIDs, and added example. (#38, #46, #54)
- Added
log v0.4
as a dependency. - Added
either v1
as a dependency. (Rocket dependency) - Added feature flag for
msgpack
(Re-exposing Rocket feature flag) - Added support for new
Responder
types (implementedOpenApiResponderInner
):std::fs::File
rocket::tokio::fs::File
std::borrow::Cow<'o, T>
either::Either<L, R>
std::io::Error
(rocket::http::ContentType, R)
(rocket::http::Status, R)
rocket::http::Status
(#20)rocket::response::status::NoContent
rocket::response::Redirect
rocket::response::content::Custom<T>
rocket::response::status::Conflict<T>
rocket::response::status::Custom<T>
rocket::response::Flash<R>
rocket::data::Capped<R>
rocket::response::Debug<E>
rocket::response::stream::ByteStream<S>
rocket::response::stream::ReaderStream<S>
rocket::response::stream::TextStream<S>
rocket::serde::msgpack::MsgPack<T>
(only when featuremsgpack
is enabled)
- Fully implement
FromSegments
for<param..>
in path. (#41) - Implement
OpenApiFromSegments
for all that implementFromSegments
andJsonSchema
. (#41) - Implement
OpenApiFromParam
for all that implementFromParam
andJsonSchema
. - Implement
OpenApiFromFormField
for all that implementFromFormField
andJsonSchema
. - Added support for new
FromData
types (implementedOpenApiFromData
):String
&'r str
Cow<'r, str>
Vec<u8>
&'r [u8]
rocket::fs::TempFile<'r>
rocket::data::Capped<rocket::fs::TempFile<'r>>
rocket::data::Capped<Cow<'r, str>>
rocket::data::Capped<&'r str>
rocket::data::Capped<&'r rocket::http::RawStr>
rocket::data::Capped<&'r [u8]>
rocket::data::Capped<String>
rocket::data::Capped<Vec<u8>>
&'r rocket::http::RawStr
rocket::form::Form<T>
rocket::serde::msgpack::MsgPack<T>
(only when featuremsgpack
is enabled)
- Added feature flag for
secrets
(Re-exposing Rocket feature flag) - Added support for Request Guards
and Security Scheme
(aka Authentication and Authorization) (#47, #9, #8, #56) - Added support for new
FromRequest
types (implementedOpenApiFromRequest
):std::net::IpAddr
std::net::SocketAddr
Result<T, T::Error>
Option<T>
&'r rocket::config::Config
&'r rocket::config::SecretKey
(only when featuresecrets
is enabled)&'r rocket::data::Limits
&'r rocket::http::Accept
&'r rocket::http::ContentType
&'r rocket::http::CookieJar<'r>
&'r rocket::http::uri::Origin<'r>
&'r rocket::route::Route
rocket::http::Method
rocket::Shutdown
&'r rocket::State<T>
- Added
OpenApiFromRequest
derive macro. - Added feature flag for
preserve_order
to keep the order of struct fields inSchema
all parts of theOpenAPI
documentation. Okapi
create is now re-exported and can be found asrocket_okapi::okapi
.
Changed
- Swagger UI is now only available under the feature
swagger
. - Updated Swagger UI to v3.52.0
- The
preserve_order
feature flag is now enabled by default. UrlObject
has been moved fromswagger_ui::UrlObject
tosettings::UrlObject
.- Replaced manual implementations of
OpenApiFromParam
with generic version.
SoOpenApiFromParam
is implemented for more types. - Replaced manual implementations of
OpenApiFromFormField
with generic version.
SoOpenApiFromFormField
is implemented for more types. - Fixed setting of parameter location from "form" to "query".
Removed
- Removed unused and unneeded files from Swagger UI to decrease file size.
routes_with_openapi
has be removed and replaced withopenapi_routes
.