---
sidebar_label: Compatibility requirements
doc_id: 5277c16d-3a7f-47a4-b00d-1b4d8b6f17e1
description: >-
  Guidelines for ensuring service attribute schemas match action parameter
  schemas for form population.
keywords:
  - schema compatibility
  - service attributes
  - action parameters
  - form population
  - nullplatform
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Schema compatibility requirements

When you click **New service like this** or **Sync service with another**, nullplatform tries to open a form with many of
the original service’s values already filled in. This only works if two schemas are compatible:

1. **Service spec attributes schema**: defines the data structure stored in the service.
2. **Action spec parameters schema**: defines the data required to create or update the service.

:::important 
To populate the form correctly, the *parameter* schema for the `create` and `update` actions **must match or be
compatible with** the service’s *attribute* schema.
:::

Here’s what that looks like in practice:

- **If you're using default actions (`use_default_actions: true`)**:
   
   Compatibility is taken care of automatically. You don’t need to worry about the schemas matching because nullplatform ensures
   they align. See
   [Service actions](/docs/services/craft-a-service/service-actions#manually-defining-actions-vs-autogenerated-ones)
   for more on `use_default_actions`.

- **If you're not using default actions**:
  
   You must ensure that the parameter inputs expected by your `create` or `update` action match the structure of your service’s
   attributes. For example, if the service includes `endpoint_type`, `endpoints`, and `mtls_enabled`, then the create
   action must also include these parameter inputs with the same types and structure.

Service attribute schema (subset):

```json
"attributes": {
  "schema": {
    "type": "object",
    "required": ["endpoint_type"],
    "properties": {
      "endpoint_type": {
        "type": "string",
        "enum": ["PRIVATE", "PUBLIC"]
      },
      "endpoints": {
        "type": "array",
        "items": {
          "type": "object",
          "required": ["method", "path", "scope"],
          "properties": {
            "method": { "type": "string" },
            "path": { "type": "string" },
            "scope": { "type": "string" }
          }
        }
      },
      "mtls_enabled": {
        "type": "boolean"
      }
    }
  }
}
```

Create action parameter-input schema (subset):

```json
"parameters": {
  "schema": {
    "type": "object",
    "required": ["endpoint_type"],
    "properties": {
      "endpoint_type": {
        "type": "string",
        "enum": ["PRIVATE", "PUBLIC"]
      },
      "endpoints": {
        "type": "array",
        "items": {
          "type": "object",
          "required": ["method", "path", "scope"],
          "properties": {
            "method": { "type": "string" },
            "path": { "type": "string" },
            "scope": { "type": "string" }
          }
        }
      },
      "mtls_enabled": {
        "type": "boolean"
      }
    }
  }
}
```

If the schemas don’t align, the form may not render correctly or the service creation or update may fail.

If you're encountering unexpected behavior when creating a new service based on another, double-check that the schemas
are compatible, especially if you’re using custom definitions. 
