Prepr schema spec
From this guide, you’ll learn how to use the Prepr schema spec to generate and validate schema JSON files you can import into your Prepr schema.
Introduction
The Prepr schema specification is a standardized format (in JSON) that defines the structure, relationships, and rules of Prepr schema elements: Models, Components, Enumerations, and Remote Sources.
You can use this spec to validate manually created schema JSON files by running the Prepr schema validation.
You can also potentially use the Prepr schema spec to give additional context to an AI agent or a development tool if you wish to generate a Prepr schema automatically based on your UX design and instructions. We’re excited to see how AI can accelerate the way you design your Prepr schema.
Disclaimer
Before you dive in, please keep the following points in mind:
- AI-generated schema JSON files may not always align with our recommended best practices.
- Always treat AI output as a “first draft” and make sure to review the output before syncing the schema to your Prepr environment.
- The spec file doesn’t guarantee the AI agent or development tool will generate valid JSON files so it’s important to trigger the Prepr schema validation before performing a schema import.
Generate a Prepr schema (Experimental)
To automatically generate a Prepr schema using your preferred AI agent or development tool, perform the steps below.
- Download the spec from our Validation GitHub repo .
- Upload the spec to your LLM and provide your project requirements.
- Continue prompting to tweak fields and relationships.
- Once the schema JSON files are generated, follow the steps in the validation guide to upload them into a GitHub repo and validate them before importing them into your Prepr environment.
Please contact us to let us know about your results:
- Did the AI get the relationships right?
- Where did the spec feel confusing?