use the jsonschema::RootSchema instead of accidentally inventing our own (#4047)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* empty
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 64cee26626
.
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -115,8 +115,7 @@ impl crate::docs::StdLibFn for MyFunc {
|
||||
vec![crate::docs::StdLibFnArg {
|
||||
name: "args".to_string(),
|
||||
type_: "kittycad::types::InputFormat".to_string(),
|
||||
schema: <Option<kittycad::types::InputFormat>>::json_schema(&mut generator),
|
||||
schema_definitions: generator.definitions().clone(),
|
||||
schema: generator.root_schema_for::<Option<kittycad::types::InputFormat>>(),
|
||||
required: false,
|
||||
}]
|
||||
}
|
||||
@ -125,12 +124,11 @@ impl crate::docs::StdLibFn for MyFunc {
|
||||
let mut settings = schemars::gen::SchemaSettings::openapi3();
|
||||
settings.inline_subschemas = inline_subschemas;
|
||||
let mut generator = schemars::gen::SchemaGenerator::new(settings);
|
||||
let schema = <Vec<Sketch>>::json_schema(&mut generator);
|
||||
let schema = generator.root_schema_for::<Vec<Sketch>>();
|
||||
Some(crate::docs::StdLibFnArg {
|
||||
name: "".to_string(),
|
||||
type_: "[Sketch]".to_string(),
|
||||
schema,
|
||||
schema_definitions: generator.definitions().clone(),
|
||||
required: true,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user