mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 13:02:28 +00:00
fix panic
This commit is contained in:
parent
29af28ad8d
commit
4ceb1ef302
1 changed files with 4 additions and 4 deletions
|
@ -156,19 +156,19 @@ macro_rules! implOpenapiRouter {
|
||||||
let path = &self.1;
|
let path = &self.1;
|
||||||
let mut item = (self.0).1.remove_path(path);
|
let mut item = (self.0).1.remove_path(path);
|
||||||
let mut content : IndexMap<String, MediaType> = IndexMap::new();
|
let mut content : IndexMap<String, MediaType> = IndexMap::new();
|
||||||
content[&APPLICATION_JSON.to_string()] = MediaType {
|
content.insert(APPLICATION_JSON.to_string(), MediaType {
|
||||||
schema: None, // TODO
|
schema: None, // TODO
|
||||||
example: None,
|
example: None,
|
||||||
examples: IndexMap::new(),
|
examples: IndexMap::new(),
|
||||||
encoding: IndexMap::new()
|
encoding: IndexMap::new()
|
||||||
};
|
});
|
||||||
let mut responses : IndexMap<StatusCode, ReferenceOr<Response>> = IndexMap::new();
|
let mut responses : IndexMap<StatusCode, ReferenceOr<Response>> = IndexMap::new();
|
||||||
responses[&StatusCode::Code(200)] = Item(Response {
|
responses.insert(StatusCode::Code(200), Item(Response {
|
||||||
description: "OK".to_string(),
|
description: "OK".to_string(),
|
||||||
headers: IndexMap::new(),
|
headers: IndexMap::new(),
|
||||||
content,
|
content,
|
||||||
links: IndexMap::new()
|
links: IndexMap::new()
|
||||||
});
|
}));
|
||||||
item.get = Some(Operation {
|
item.get = Some(Operation {
|
||||||
tags: Vec::new(),
|
tags: Vec::new(),
|
||||||
summary: None,
|
summary: None,
|
||||||
|
|
Loading…
Add table
Reference in a new issue