start of close tag (#1639)
* start of close tag Signed-off-by: Jess Frazelle <github@jessfraz.com> * docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * close Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * use local Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "derive-docs"
|
||||
description = "A tool for generating documentation from Rust derive macros"
|
||||
version = "0.1.8"
|
||||
version = "0.1.9"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -197,6 +197,7 @@ fn do_stdlib_inner(
|
||||
let (ty_string, ty_ident) = clean_ty_string(ty.to_string().as_str());
|
||||
|
||||
let ty_string = rust_type_to_openapi_type(&ty_string);
|
||||
let required = !ty_ident.to_string().starts_with("Option <");
|
||||
|
||||
if ty_string != "Args" {
|
||||
let schema = if ty_ident.to_string().starts_with("Vec < ")
|
||||
@ -216,7 +217,7 @@ fn do_stdlib_inner(
|
||||
name: #arg_name.to_string(),
|
||||
type_: #ty_string.to_string(),
|
||||
schema: #schema,
|
||||
required: true,
|
||||
required: #required,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ impl crate::docs::StdLibFn for Show {
|
||||
name: "args".to_string(),
|
||||
type_: "number".to_string(),
|
||||
schema: <Option<f64>>::json_schema(&mut generator),
|
||||
required: true,
|
||||
required: false,
|
||||
}]
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ impl crate::docs::StdLibFn for Import {
|
||||
name: "args".to_string(),
|
||||
type_: "kittycad::types::InputFormat".to_string(),
|
||||
schema: <Option<kittycad::types::InputFormat>>::json_schema(&mut generator),
|
||||
required: true,
|
||||
required: false,
|
||||
}]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user