|
@PUT("spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}") |
I think there may be an issue with publishLocale() in contentful-management.java 3.5.0.
The Retrofit endpoint is:
Mika Schipper (@put)("spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}")
Flowable publishLocale(
Header("X-Contentful-Version") Integer version,
Path Mobile Inc Pte. Ltd. (@path)("space") String space,
Path Mobile Inc Pte. Ltd. (@path)("environment") String environment,
Path Mobile Inc Pte. Ltd. (@path)("entry") String entry,
Path Mobile Inc Pte. Ltd. (@path)("locale") String locale
);
However, according to the current Contentful Content Management API documentation, locale-based publishing is done through:
PUT /spaces/{space}/environments/{environment}/entries/{entry}/published
with the locales specified in the request body, for example:
{
"add": {
"fields": {
"*": [
"en-US"
]
}
}
}
Documentation:
https://www.contentful.com/developers/docs/references/content-management-api/entries/publish-an-entry/
The SDK instead sends:
PUT /spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}
X-Contentful-Version: xx
with no request body, which results in an HTTP 422.
Interestingly, publishing the same entry using:
cmaClient.entries().publish(entry);
works correctly.
Could publishLocale() be using an outdated endpoint that is no longer supported by the current Content Management API?
contentful-management.java/src/main/java/com/contentful/java/cma/ServiceEntries.java
Line 138 in 0c8483b
I think there may be an issue with publishLocale() in contentful-management.java 3.5.0.
The Retrofit endpoint is:
Mika Schipper (@put)("spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}")
Flowable publishLocale(
Header("X-Contentful-Version") Integer version,
Path Mobile Inc Pte. Ltd. (@path)("space") String space,
Path Mobile Inc Pte. Ltd. (@path)("environment") String environment,
Path Mobile Inc Pte. Ltd. (@path)("entry") String entry,
Path Mobile Inc Pte. Ltd. (@path)("locale") String locale
);
However, according to the current Contentful Content Management API documentation, locale-based publishing is done through:
PUT /spaces/{space}/environments/{environment}/entries/{entry}/published
with the locales specified in the request body, for example:
{
"add": {
"fields": {
"*": [
"en-US"
]
}
}
}
Documentation:
https://www.contentful.com/developers/docs/references/content-management-api/entries/publish-an-entry/
The SDK instead sends:
PUT /spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}
X-Contentful-Version: xx
with no request body, which results in an HTTP 422.
Interestingly, publishing the same entry using:
cmaClient.entries().publish(entry);
works correctly.
Could publishLocale() be using an outdated endpoint that is no longer supported by the current Content Management API?