Skip to content

Commit

Permalink
Merge pull request #2 from TotalKrill/extern_crate
Browse files Browse the repository at this point in the history
Extern crate
  • Loading branch information
TotalKrill authored Aug 2, 2021
2 parents 248b0fc + 9df8de9 commit 0ac1612
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 1 deletion.
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

0 comments on commit 0ac1612

Please sign in to comment.