sdk: readable clients (no Empty wrapper, no unused error module), documented examples with tests
This commit is contained in:
@@ -49,6 +49,14 @@ impl Plugin {
|
||||
#[test]
|
||||
fn discovery_and_dispatch() {
|
||||
let doc = Plugin.discover();
|
||||
assert!(doc["components"]["schemas"].get("Empty").is_none());
|
||||
let choice = doc["methods"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.find(|m| m["name"] == "choice")
|
||||
.unwrap();
|
||||
assert!(choice.get("x-sausage-params").is_none());
|
||||
assert!(
|
||||
doc["x-sausage-endpoints"]["control"]["methods"]
|
||||
.as_array()
|
||||
|
||||
Reference in New Issue
Block a user