atproto_sdl/printer/types
Renders object fields, array shapes/items, and query/procedure
params: everything at “field position” in atproto_lexicon/ast.
printer.gleam reuses print_field/print_fields for record and
object bodies; printer/methods.gleam reuses print_field for
inline objects in body position and print_params_property for
query/procedure/subscription parameters.
Values
pub fn print_field(
name: String,
prop: ast.PropertyType,
req: Bool,
nullable: Bool,
) -> String
pub fn print_fields(
properties: List(#(String, ast.PropertyType)),
required: List(String),
nullable: List(String),
) -> String
pub fn print_inline_object(o: ast.ObjectSchema) -> String
An inline object in body position: { a: String! } on one line when
there is at most one field and it carries no doc comment, otherwise an
indented block (one field per line, like a standalone type) so a
doc comment never lands mid-line.
pub fn print_item_type(
item: ast.ArrayItemType,
) -> #(String, List(String))
pub fn print_params_property(
prop: ast.ParamsPropertyType,
) -> #(String, List(String), option.Option(String))