Skip to content

Commit b2971dd

Browse files
author
naman-contentstack
committed
updated the migration doc
1 parent 9e98508 commit b2971dd

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

MIGRATION.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
## Migrating from v3 to v4
22

3-
This document outlines the necessary change made to the `ISystemFields` interface.
4-
The `publish_details` field is no longer an array of objects — it is now a single object.
3+
This changelog documents a breaking change to the `ISystemFields` interface, specifically related to the `publish_details` field.
54

6-
This update aligns the generated types with the actual Contentstack API response.
5+
## What Changed
76

7+
The `publish_details` field is no longer an array of objects. It is now represented as a single `IPublishDetails` object.
88

9+
This update aligns the generated types with the actual [Contentstack API](https://www.contentstack.com/docs/developers/apis/content-delivery-api) response.
910

10-
## Before
11+
## Before
1112

1213
```typescript
1314
export interface ISystemFields {
@@ -27,8 +28,8 @@ export interface ISystemFields {
2728
}
2829
```
2930

31+
## After
3032

31-
## After
3233
```typescript
3334
export interface ISystemFields {
3435
uid?: string;
@@ -46,12 +47,15 @@ export interface ISystemFields {
4647
title?: string;
4748
}
4849
```
50+
4951
---
5052

5153
## Migrating from v2 to v3
54+
5255
This document outlines the necessary changes to separate nested modular blocks into distinct interfaces. This update will affect how modular blocks are structured and used throughout the codebase.
5356

54-
## Before
57+
## Before
58+
5559
```typescript
5660
export interface Test {
5761
/** Version */
@@ -77,8 +81,8 @@ export interface Test {
7781
}
7882
```
7983

80-
8184
## After
85+
8286
```typescript
8387
export interface Test {
8488
/** Version */
@@ -89,7 +93,6 @@ export interface Test {
8993
modular_blocks?: ModularBlocks[];
9094
}
9195

92-
9396
export interface ModularBlocks {
9497
/** Multi Line Textbox */
9598
multi_line?: string;
@@ -103,4 +106,4 @@ export interface ModularBlocks1 {
103106
/** Multi Line Textbox */
104107
multi_line?: string;
105108
}
106-
```
109+
```

0 commit comments

Comments
 (0)