Skip to content

API Reference parrot_formdesigner.extractors.jsonschema

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.extractors.jsonschema

View source

JSON Schema extractor for FormSchema generation.

Converts standard JSON Schema dicts into FormSchema instances. Supports type mapping, constraint extraction, $ref resolution, format keywords, enum conversion, and oneOf/anyOf union types.

Alias DependencyRule

Re-exported from parrot_formdesigner.core.constraints.DependencyRule.

Alias EntityRef

Re-exported from parrot_formdesigner.core.relations.EntityRef.

Alias FieldConstraints

Re-exported from parrot_formdesigner.core.constraints.FieldConstraints.

Alias FieldOption

Re-exported from parrot_formdesigner.core.options.FieldOption.

Alias FieldType

Re-exported from parrot_formdesigner.core.types.FieldType.

Alias FormField

Re-exported from parrot_formdesigner.core.schema.FormField.

Alias FormSchema

Re-exported from parrot_formdesigner.core.schema.FormSchema.

Alias FormSection

Re-exported from parrot_formdesigner.core.schema.FormSection.

Alias FormSubsection

Re-exported from parrot_formdesigner.core.schema.FormSubsection.

Attribute JSONSchemaExtractor

Class JsonSchemaExtractor

Converts JSON Schema dicts into FormSchema instances.

Supports:

  • JSON Schema type mapping (string/number/integer/boolean/array/object)
  • JSON Schema format mapping (email/uri/date/date-time/time)
  • Constraint extraction (minLength, maxLength, minimum, maximum, pattern)
  • $ref and $defs/$definitions resolution
  • enum values as SELECT options
  • required array for field requiredness
  • oneOf/anyOf union types (first non-null type wins)
  • Nested object properties as GROUP fields

Method JsonSchemaExtractor.extract

Convert a JSON Schema dict into a FormSchema.

extract(schema: dict[str, Any], *, form_id: str | None = None, title: str | None = None) -> FormSchema

Parameter Type Default Description
schema dict[str, Any] JSON Schema dict (OpenAPI-compatible, Pydantic output, etc.).
form_id str | None None Optional form ID. Defaults to "form".
title str | None None Optional form title. Defaults to schema title or "Form".

Returns: FormSchema — FormSchema representing the JSON Schema structure.

Alias OptionsSource

Re-exported from parrot_formdesigner.core.options.OptionsSource.

Alias PostDependency

Re-exported from parrot_formdesigner.core.constraints.PostDependency.

Alias RelationSpec

Re-exported from parrot_formdesigner.core.relations.RelationSpec.

Attribute logger

Alias resolve_rule_references

Re-exported from parrot_formdesigner.core.resolution.resolve_rule_references.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally