zio.blocks.smithy.SmithyModel
See theSmithyModel companion object
Represents a top-level Smithy model.
A SmithyModel contains all the shapes, metadata, and configuration for a Smithy API definition. It includes the model version, target namespace, use statements, metadata key-value pairs, a list of shape definitions, and apply statements that attach traits to shapes.
Value parameters
applyStatements
list of apply statements that attach traits to shapes
metadata
map of metadata key-value pairs for the model
namespace
the namespace for all shapes in this model (e.g., "com.example.api")
shapes
list of shape definitions in the model
useStatements
list of ShapeIds imported via use statements
version
the Smithy specification version (e.g., "2.0")
Attributes
Companion
object
Source
SmithyModel.scala
Graph
Reset zoom Hide graph Show graph
Supertypes
trait Product
trait Equals
trait Matchable
class Any
Show all
Members list
Returns the list of all ShapeIds in this model.
Returns the list of all ShapeIds in this model.
Each ShapeId is constructed from the model's namespace and the shape's name. The order matches the order of shapes in the shapes list.
Attributes
Returns
list of ShapeIds for all shapes in this model
Source
SmithyModel.scala
Finds a shape by name within this model.
Finds a shape by name within this model.
Returns the first ShapeDefinition with the given name, or None if not found.
Value parameters
name
the shape name to search for
Attributes
Returns
Some(ShapeDefinition) if found, None otherwise
Source
SmithyModel.scala
Serializes this model as Smithy IDL text with default 4-space indentation.
Serializes this model as Smithy IDL text with default 4-space indentation.
Attributes
Returns
a String containing valid Smithy IDL text
Source
SmithyModel.scala
Serializes this model as Smithy IDL text with configurable indentation.
Serializes this model as Smithy IDL text with configurable indentation.
Value parameters
indent
the number of spaces to use for indentation within shapes
Attributes
Returns
a String containing valid Smithy IDL text
Source
SmithyModel.scala
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
Inherited from:
Product
Source
Product.scala
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
Returns
in the default implementation, an Iterator[Any]
Inherited from:
Product
Source
Product.scala