Introduction

This documentation section outlines the implementation and operational guidelines for a new API endpoint that facilitates partial updates to the system's schema.

Problem Statement

As development teams regularly roll out new API endpoints, features each addition often necessitates corresponding updates to the schema. The current procedure, which requires comprehensive schema re-uploads for any modification, has proven to be inefficient and not conducive to rapid development cycles. There is an essential need for a more refined update mechanism that supports iterative and incremental schema modifications, allowing teams to make precise changes with minimal disruption.

🦾 Requirements & Specifications


Describe what the product or system should do, and how well it should perform.

Endpoint Definition

/v1/{tenant_id}/schemas/partial-write

This endpoint allows authorized users to make partial updates to the schema by adding or modifying actions within individual entities.

Request Payload Structure

PATCH /v1/{tenant_id}/schemas/partial-write
Content-Type: application/json

{
  "metadata": {
    "schema_version": ""
  },
  "entities": {
		"<entity-name>": {
			"write": [],
			"delete": [],
			"update": []
		}
  }
}

Behavior Description

When the schema_version in the request metadata is left empty, the system will default to using the latest(head) schema version as the base for updates.