Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extern crate #2

Merged
merged 4 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rocket-okapi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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.4"
repository = "https://github.com/TotalKrill/okapi"
authors = ["Graham Esau <[email protected]>, Kristoffer Ödmark <[email protected]>"]
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions rocket-okapi/src/gen.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/handlers/openapi.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extern crate okapi;
use okapi::openapi3::{OpenApi, Server};
use rocket::http::{ContentType, Method};
use rocket::response::content::Custom;
Expand Down
3 changes: 3 additions & 0 deletions rocket-okapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/request/from_data_impls.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::OpenApiFromData;
use crate::gen::OpenApiGenerator;
extern crate okapi;
use okapi::{
openapi3::{MediaType, RequestBody},
Map,
Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/request/from_form_multi_param_impls.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::gen::OpenApiGenerator;
extern crate okapi;
use okapi::openapi3::{Parameter, ParameterValue};
use schemars::schema::{Schema, SchemaObject};
use schemars::JsonSchema;
Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/request/from_form_param_impls.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/request/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions rocket-okapi/src/response/responder_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 3 additions & 0 deletions rocket-okapi/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::{OpenApiError, Result};

extern crate okapi;

use okapi::openapi3::{MediaType, RefOr, Response, Responses, SchemaObject};
use okapi::Map;

Expand Down