Skip to content

Commit

Permalink
Use schemars::Map for security schemes
Browse files Browse the repository at this point in the history
Take into account the `preserve_order` feature of shemars.

Provided by Petr Tsymbarovich <[email protected]>
TotalKrill#1
(cherry picked from commit 49c8956)
  • Loading branch information
mentaljam authored and ralpha committed Sep 12, 2021
1 parent 0c64d4c commit 10d6daa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rocket-okapi-codegen/src/openapi_attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ fn create_route_operation_fn(
let request_inputs: Vec<RequestHeaderInput> = vec![#(#params),*];

let mut parameters: Vec<::okapi::openapi3::RefOr<Parameter>> = Vec::new();
use std::collections::BTreeMap as Map;
let mut security_schemes = Map::new();
let mut security_schemes = ::okapi::Map::new();
for inp in request_inputs {
match inp {
RequestHeaderInput::Parameter(p) => {
Expand Down

0 comments on commit 10d6daa

Please sign in to comment.