mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 04:52: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 mut item = (self.0).1.remove_path(path);
|
||||
let mut content : IndexMap<String, MediaType> = IndexMap::new();
|
||||
content[&APPLICATION_JSON.to_string()] = MediaType {
|
||||
content.insert(APPLICATION_JSON.to_string(), MediaType {
|
||||
schema: None, // TODO
|
||||
example: None,
|
||||
examples: IndexMap::new(),
|
||||
encoding: 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(),
|
||||
headers: IndexMap::new(),
|
||||
content,
|
||||
links: IndexMap::new()
|
||||
});
|
||||
}));
|
||||
item.get = Some(Operation {
|
||||
tags: Vec::new(),
|
||||
summary: None,
|
||||
|
|
Loading…
Add table
Reference in a new issue