Skip to main content

openjd_model/
lib.rs

1// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2// Copyright by contributors to this project.
3// SPDX-License-Identifier: (Apache-2.0 OR MIT)
4
5//! Open Job Description model library for Rust.
6//!
7//! Provides parsing, validation, and job creation for OpenJD templates
8//! conforming to the 2023-09 specification.
9
10pub mod error;
11pub mod job;
12pub mod template;
13pub use job::create_job;
14pub use job::step_dependency_graph;
15pub use job::step_param_space;
16pub mod capabilities;
17pub mod types;
18
19// Re-export FormatString and SymbolTable from openjd-expr.
20pub use openjd_expr::format_string;
21pub use openjd_expr::format_string::FormatString;
22pub use openjd_expr::symbol_table;
23pub use openjd_expr::symbol_table::SymbolTable;
24
25#[cfg(test)]
26mod test_lazy_param_space;
27
28pub use error::ModelError;
29pub use error::{DiagnosticSpan, ErrorDetail};
30pub use error::{PathElement, ValidationError, ValidationErrors};
31pub use job::create_job::{
32    build_symbol_table, convert_environment, create_job, evaluate_let_bindings,
33    merge_job_parameter_definitions, preprocess_job_parameters, MergedParameterDefinition,
34    PathParameterOptions,
35};
36pub use step_dependency_graph::StepDependencyGraph;
37pub use step_param_space::StepParameterSpaceIterator;
38pub use template::parse::{
39    decode_environment_template, decode_job_template, decode_template, DecodedTemplate,
40    DocumentType,
41};
42pub use types::{
43    CallerLimits, DataFlow, EndOfLine, Extensions, FileType, JobParameterInputValues,
44    JobParameterType, JobParameterValue, JobParameterValues, ModelExtension, ModelProfile,
45    ObjectType, SpecificationRevision, TaskParameterSet, TaskParameterType, TaskParameterValue,
46    TemplateSpecificationVersion, ValidationContext,
47};
48
49#[cfg(test)]
50mod test_expr_param_constraints;
51#[cfg(test)]
52mod test_instantiate_and_display;