Skip to content

Commit

Permalink
Fix docs link that broke after renaming branch main to master
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto committed Aug 25, 2023
1 parent 7f5ea0b commit f5ec2f5
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions docs/source/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,20 @@ myst:
This upgrade guide lists all breaking changes in `plone.restapi`.
It explains the steps that are needed to upgrade to the latest version.


## Upgrading to `plone.restapi` 8.x

`plone.restapi` 8.x dropped support for Python 2 and Plone 5.1 and 4.3.
Upgrading to `plone.restapi` 8.x does not require any changes to your code base if you use Python 3 and Plone 5.2 or newer.

If you use Python 2 and a Plone version older than 5.2, stick with `plone.restapi` 7.x.


## Upgrading to `plone.restapi` 7.x

The navigation endpoint has been refactored.
Now its behavior is consistent regarding the `items` attribute.
Now the `items` attribute is present, even if the element of the tree does not have child elements, in which case it will be an empty array.
This might affect some logins via JavaScript, specifically if the condition is checking for the existence of the `items` attribute and expects it to be `undefined`.


## Upgrading to `plone.restapi` 6.x

`plone.restapi` 6.0.0 removes the `IAPIRequest` marker interface (<https://github.com/plone/plone.restapi/pull/819>).
Expand All @@ -52,7 +49,6 @@ If you need to fix object IDs, you can do one of the following:
We expect that most content actually will not be affected.
See <https://github.com/plone/plone.restapi/issues/827> for more details.


## Upgrading to `plone.restapi` 5.x

`plone.restapi` 5.0.0 introduces the following breaking change:
Expand Down Expand Up @@ -96,7 +92,6 @@ to:
This change affects the `GET`, `PATCH`, and `POST` formats.
It should only affect you if you use Volto.


## Upgrading to `plone.restapi` 4.x

`plone.restapi` 4.0.0 introduces the following breaking changes:
Expand All @@ -106,7 +101,6 @@ It should only affect you if you use Volto.
3. Serialize widget parameters into a `widgetOptions` object instead of adding them to the top level of the schema property.
4. The vocabularies endpoint does no longer returns an `@id` for terms, the results are batched, and terms are now listed as `items` instead of `terms` to match other batched responses.


### Serialization and Deserialization of fields with vocabularies

The serialization of fields with vocabularies, such as `Choice`, now return the `token` and the `title` of the vocabulary term instead of the stored value.
Expand Down Expand Up @@ -148,7 +142,6 @@ Deserialization accepts objects that contain a token, but also just the token or

However, it is highly recommended to always use the token, as vocabulary terms may contain values that are not JSON serializable.


### Choice and List fields return link to vocabulary instead of the values

Choice and List fields using named vocabularies are now serialized with a `vocabulary` property, giving the URL of the `@vocabularies` endpoint for the vocabulary instead of including `choices`,
Expand Down Expand Up @@ -185,7 +178,6 @@ New response:
},
```


### Serialize widget parameters into a `widgetOptions` object

Serialize widget parameters into a `widgetOptions` object instead of adding them to the top level of the schema property.
Expand All @@ -207,7 +199,6 @@ New response:
}
```


### Example: Vocabularies Subjects Field

The `subjects` field is now serialized as an `array` of `string` items using the `plone.app.vocabularies.Keywords` vocabulary.
Expand Down Expand Up @@ -241,7 +232,6 @@ New response:
}
```


### Example: Available Time Zones Field (vocabulary in `items`)

Old response:
Expand Down Expand Up @@ -297,7 +287,6 @@ New response:
},
```


### Example: Weekday Field (vocabulary in main property)

Old response:
Expand Down Expand Up @@ -371,7 +360,6 @@ New response:
},
```


### Vocabularies Endpoint

The vocabularies endpoint no longer returns an `@id` for terms.
Expand Down Expand Up @@ -412,10 +400,8 @@ New response:
}
```


## Upgrading to `plone.restapi` 3.x


### Image scales

Image download URLs and image scale URLs are created using the UID-based URL formats.
Expand Down Expand Up @@ -457,7 +443,6 @@ New Response:
}
```


### `@sharing` endpoint

The `available_roles` property in the response to a `GET` request to the `@sharing` endpoint has changed.
Expand Down Expand Up @@ -515,22 +500,19 @@ Content-Type: application/json
}
```


### Custom Content Deserializers

If you have implemented custom content deserializers, you have to handle the new `create` keyword in the `__call__` method, which determines if deserialization is performed during object creation or while updating an object.

Deserializers should only fire an `IObjectModifiedEvent` event if an object has been updated. They should not fire it when a new object has been created.

See [Dexterity content deserializer](https://github.com/plone/plone.restapi/blob/master/src/plone/restapi/deserializer/dxcontent.py) for an example.

See [Dexterity content deserializer](https://github.com/plone/plone.restapi/blob/main/src/plone/restapi/deserializer/dxcontent.py) for an example.

## Upgrading to `plone.restapi` 2.x

`plone.restapi` 2.0.0 converts all datetime, DateTime and time objects to UTC before serializing.
The translations endpoint becomes "expandable", which introduces the following breaking changes.


### Translations

Previously when using the `@translations` endpoint in `plone.restapi` 1.x, the endpoint returned a `language` key with the content object's language and a `translations` key with all its translations.
Expand Down Expand Up @@ -575,7 +557,6 @@ Content-Type: application/json
}
```


## Upgrading to `plone.restapi` 1.0b1

In `plone.restapi` 1.0b1 the `url` attribute on the {ref}`navigation` and {ref}`breadcrumbs` endpoint was renamed to `@id` to be consistent with other links/URLs used in `plone.restapi`.
Expand Down Expand Up @@ -728,7 +709,6 @@ Pull Request:

- <https://github.com/plone/plone.restapi/pull/459>


## Upgrading to `plone.restapi` 1.0a25

`plone.restapi` 1.0a25 introduced three breaking changes:
Expand All @@ -739,7 +719,6 @@ Pull Request:
- Convert `richtext` using `.output_relative_to`.
Direct conversion from `RichText` is no longer supported as we _always_ need a context for the `ITransformer`. [jaroel]


### Remove @components endpoint

`plone.restapi` 1.0a25 removed the `@components` endpoint which used to provide a {ref}`navigation` and a {ref}`breadcrumbs` endpoint.
Expand Down Expand Up @@ -777,7 +756,6 @@ Pull Request:
- <https://github.com/plone/plone.restapi/pull/425>
### Remove `sharing` attribute
The `sharing` attribute was removed from all content `GET` responses:
Expand All @@ -799,7 +777,6 @@ Pull Request:

- <https://github.com/plone/plone.restapi/commit/1b5e9e3a74df22e53b674849e27fa4b39b792b8c>


### Convert `richtext` using `.output_relative_to`

Use `.output_relative_to` to convert `richtext`.
Expand All @@ -813,7 +790,6 @@ Pull Request:

- <https://github.com/plone/plone.restapi/pull/428>


## Upgrading to `plone.restapi` 1.0a17

`plone.restapi` 1.0a17 changed the serialization of the `richtext` "text" field for content objects from using `raw` (a Unicode string with the original input markup):
Expand Down

0 comments on commit f5ec2f5

Please sign in to comment.