Skip to main content

Creating Schemas

A schema defines the structure of the data an application sends or receives. Add one to an application when a workflow or activity needs to validate, map, or generate data in a known shape.

Before you begin

Have the schema ready in one of these forms: a file on your system, schema content you can paste, an existing schema in the Schema Registry, or an OpenAPI specification to generate one from.

Open the import options

  1. Select the Schemas folder in the application.
  2. Select Upload a Schema. The Import Schema modal appears with four ways to add a schema.
OptionUse it to
UploadBrowse for a schema file on your system, or drag files onto the modal.
Paste in editorPaste schema content directly into a new schema.
Search RegistryReuse a schema already published to the Schema Registry.
Import from OpenApiGenerate a schema from an OpenAPI specification.

Search Registry and Import from OpenApi appear only where those sources are available.

Upload a schema file

  1. Select Upload and choose the file, or drag the file onto the modal.
  2. Select Import.

The modal states which file types it accepts and whether it takes more than one file at a time.

Paste schema content

  1. Select Paste in editor.
  2. Select the schema name in the top-left corner of the Schema Editor and enter a new name, then press Enter.
  3. Paste your schema into the code view, or build it using the controls in the editor view. See Editing Schemas.
  4. Select Save.
  5. Select Import.

Reuse a schema from the registry

  1. Select Search Registry.
  2. Search for the schema and select it.
  3. Select Import.

How you know it worked

The schema appears under the Schemas folder in the application, and Studio opens it in the Schema Editor so you can review and save changes.

When it does not work

SymptomCauseWhat to do
Failed to upload schemaThe file could not be read or is not a supported type.Check the file type listed in the modal and confirm the content is valid.
Name is requiredThe schema has no name.Enter a name before saving.

Next steps

Add reusable sub-schemas by selecting the Definitions icon. See Creating and Managing Definitions.