MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / describe_responses

Method describe_responses

flow-plugins/src/utils/bare_json.rs:31–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30impl ResponseEntity for BareJson {
31 fn describe_responses() -> Responses {
32 let mut resps = IndexMap::new();
33
34 let mut content = IndexMap::new();
35 content.insert(
36 Cow::Borrowed("application/json"),
37 MediaType {
38 schema: Some(ObjectOrReference::Object(Self::describe())),
39 examples: None,
40 encoding: Default::default(),
41 },
42 );
43
44 resps.insert(
45 Cow::Borrowed("200"),
46 Response {
47 content,
48 ..Default::default()
49 },
50 );
51 resps
52 }
53}
54
55impl Reply for BareJson {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected