From 379bf0a6ae47b20763370f36347db03531ff7654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= Date: Mon, 2 Aug 2021 17:01:01 +0200 Subject: [PATCH 1/4] use extern crate everywhere --- rocket-okapi/src/gen.rs | 3 +++ rocket-okapi/src/handlers/openapi.rs | 1 + rocket-okapi/src/request/from_data_impls.rs | 1 + rocket-okapi/src/request/from_form_multi_param_impls.rs | 1 + rocket-okapi/src/request/from_form_param_impls.rs | 1 + rocket-okapi/src/request/mod.rs | 1 + rocket-okapi/src/response/mod.rs | 1 + rocket-okapi/src/response/responder_impls.rs | 1 + rocket-okapi/src/util.rs | 3 +++ 9 files changed, 13 insertions(+) diff --git a/rocket-okapi/src/gen.rs b/rocket-okapi/src/gen.rs index c665563c..00df55e6 100644 --- a/rocket-okapi/src/gen.rs +++ b/rocket-okapi/src/gen.rs @@ -1,5 +1,8 @@ use crate::settings::OpenApiSettings; use crate::OperationInfo; + +extern crate okapi; + use okapi::openapi3::{Components, OpenApi, Operation, PathItem, RefOr, SecurityScheme}; use rocket::http::Method; use schemars::gen::SchemaGenerator; diff --git a/rocket-okapi/src/handlers/openapi.rs b/rocket-okapi/src/handlers/openapi.rs index f56e2820..268d2433 100644 --- a/rocket-okapi/src/handlers/openapi.rs +++ b/rocket-okapi/src/handlers/openapi.rs @@ -1,3 +1,4 @@ +extern crate okapi; use okapi::openapi3::{OpenApi, Server}; use rocket::http::{ContentType, Method}; use rocket::response::content::Custom; diff --git a/rocket-okapi/src/request/from_data_impls.rs b/rocket-okapi/src/request/from_data_impls.rs index 88c32198..80c20851 100644 --- a/rocket-okapi/src/request/from_data_impls.rs +++ b/rocket-okapi/src/request/from_data_impls.rs @@ -1,5 +1,6 @@ use super::OpenApiFromData; use crate::gen::OpenApiGenerator; +extern crate okapi; use okapi::{ openapi3::{MediaType, RequestBody}, Map, diff --git a/rocket-okapi/src/request/from_form_multi_param_impls.rs b/rocket-okapi/src/request/from_form_multi_param_impls.rs index e80cb12d..53737329 100644 --- a/rocket-okapi/src/request/from_form_multi_param_impls.rs +++ b/rocket-okapi/src/request/from_form_multi_param_impls.rs @@ -1,4 +1,5 @@ use crate::gen::OpenApiGenerator; +extern crate okapi; use okapi::openapi3::{Parameter, ParameterValue}; use schemars::schema::{Schema, SchemaObject}; use schemars::JsonSchema; diff --git a/rocket-okapi/src/request/from_form_param_impls.rs b/rocket-okapi/src/request/from_form_param_impls.rs index 8d7f8552..b1508ca8 100644 --- a/rocket-okapi/src/request/from_form_param_impls.rs +++ b/rocket-okapi/src/request/from_form_param_impls.rs @@ -1,5 +1,6 @@ use super::{get_nested_form_parameters, OpenApiFromForm, OpenApiFromFormField}; use crate::gen::OpenApiGenerator; +extern crate okapi; use okapi::openapi3::{Parameter, ParameterValue}; use rocket::form::Result as FormResult; use schemars::JsonSchema; diff --git a/rocket-okapi/src/request/mod.rs b/rocket-okapi/src/request/mod.rs index 5eeb1906..18726a99 100644 --- a/rocket-okapi/src/request/mod.rs +++ b/rocket-okapi/src/request/mod.rs @@ -6,6 +6,7 @@ mod from_request_impls; use super::gen::OpenApiGenerator; use super::Result; +extern crate okapi; use okapi::openapi3::{Parameter, RequestBody, SecurityRequirement, SecurityScheme}; /// Expose this to the public to be use when manualy implementing a diff --git a/rocket-okapi/src/response/mod.rs b/rocket-okapi/src/response/mod.rs index fc8c911d..dfff6355 100644 --- a/rocket-okapi/src/response/mod.rs +++ b/rocket-okapi/src/response/mod.rs @@ -2,6 +2,7 @@ mod responder_impls; use super::gen::OpenApiGenerator; use super::Result; +extern crate okapi; use okapi::openapi3::Responses; /// See `OpenApiResponderInner`. This is a wrapper around diff --git a/rocket-okapi/src/response/responder_impls.rs b/rocket-okapi/src/response/responder_impls.rs index 376b48c2..5a26b99b 100644 --- a/rocket-okapi/src/response/responder_impls.rs +++ b/rocket-okapi/src/response/responder_impls.rs @@ -6,6 +6,7 @@ use crate::{ produce_any_responses, set_content_type, set_status_code, }, }; +extern crate okapi; use okapi::openapi3::Responses; use rocket::fs::NamedFile; use rocket::serde::json::{Json, Value}; diff --git a/rocket-okapi/src/util.rs b/rocket-okapi/src/util.rs index f9200b91..1e102700 100644 --- a/rocket-okapi/src/util.rs +++ b/rocket-okapi/src/util.rs @@ -1,4 +1,7 @@ use crate::{OpenApiError, Result}; + +extern crate okapi; + use okapi::openapi3::{MediaType, RefOr, Response, Responses, SchemaObject}; use okapi::Map; From d021d2a74ec4f59c3115866c826328f62d182404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= Date: Mon, 2 Aug 2021 17:01:41 +0200 Subject: [PATCH 2/4] bump --- rocket-okapi/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocket-okapi/Cargo.toml b/rocket-okapi/Cargo.toml index 7ce585c5..588b2913 100644 --- a/rocket-okapi/Cargo.toml +++ b/rocket-okapi/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rocket_okapi_fork" description = "OpenAPI (AKA Swagger) document generation for Rocket applications, forked version from rocket_okapi" -version = "0.7.2" +version = "0.7.3" repository = "https://github.com/TotalKrill/okapi" authors = ["Graham Esau , Kristoffer Ödmark "] edition = "2018" From 8a96de43d6f6498e4de051ffba1d93d9729bd5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= Date: Mon, 2 Aug 2021 18:08:23 +0200 Subject: [PATCH 3/4] extern crate --- rocket-okapi/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rocket-okapi/src/lib.rs b/rocket-okapi/src/lib.rs index c56062a2..00d75a28 100644 --- a/rocket-okapi/src/lib.rs +++ b/rocket-okapi/src/lib.rs @@ -79,6 +79,9 @@ pub mod swagger_ui; pub mod util; pub use error::*; + +extern crate rocket_okapi_codegen; + pub use rocket_okapi_codegen::*; pub use schemars::JsonSchema; From 9df8de9343a5c6b233c83158648200109ed973bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= Date: Mon, 2 Aug 2021 18:08:54 +0200 Subject: [PATCH 4/4] (cargo-release) version 0.7.4 --- rocket-okapi/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocket-okapi/Cargo.toml b/rocket-okapi/Cargo.toml index 588b2913..33c810f8 100644 --- a/rocket-okapi/Cargo.toml +++ b/rocket-okapi/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rocket_okapi_fork" description = "OpenAPI (AKA Swagger) document generation for Rocket applications, forked version from rocket_okapi" -version = "0.7.3" +version = "0.7.4" repository = "https://github.com/TotalKrill/okapi" authors = ["Graham Esau , Kristoffer Ödmark "] edition = "2018"