improve openapi verification
This commit is contained in:
parent
2c467ea6cf
commit
19a0dc3a60
4 changed files with 500 additions and 64 deletions
|
|
@ -21,6 +21,7 @@ fn get_spec() -> eyre::Result<OpenApiV2> {
|
|||
.unwrap_or_else(|| OsString::from("./swagger.v1.json"));
|
||||
let file = std::fs::read(path)?;
|
||||
let spec = serde_json::from_slice::<OpenApiV2>(&file)?;
|
||||
spec.validate()?;
|
||||
Ok(spec)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue