Skip to content

Commit

Permalink
convert to PathBuf
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Dec 12, 2024
1 parent 1a52957 commit 434dbae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ fn serialize_to_json_schema(

match root {
Some(root) => {
let schema = model.json_schema(Some(root));
let schema = model.json_schema(Some(root))?;
save_to_file(out, &schema)?;
print_render_msg(out, &Templates::JsonSchema);
Ok(())
Expand Down Expand Up @@ -376,15 +376,15 @@ fn serialize_all_json_schemes(
match merge_state {
MergeState::Merge => {
let model = build_models(specs)?;
model.json_schema_all(out.to_str().unwrap().to_string());
model.json_schema_all(out.to_path_buf())?;
print_render_msg(out, &Templates::JsonSchemaAll);
Ok(())
}
MergeState::NoMerge => {
for spec in specs {
let model = DataModel::from_markdown(spec)?;
let path = out.join(get_file_name(spec));
model.json_schema_all(path.to_str().unwrap().to_string());
model.json_schema_all(path.to_path_buf())?;
print_render_msg(&path, &Templates::JsonSchemaAll);
}
Ok(())
Expand Down

0 comments on commit 434dbae

Please sign in to comment.