Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add portal_type title #1355

Merged
merged 29 commits into from
May 18, 2023
Merged

Add portal_type title #1355

merged 29 commits into from
May 18, 2023

Conversation

razvanMiu
Copy link
Contributor

This adds a new field type to content response which contains the title of portal_type.

Example of why this is needed:
Let's say I have a content-type named Topic page with the id topic_page. Fetching a page of this content-type will respond with:

{
   '@type': 'topic_page',
   ...
}

There is no way to get the human readable title of the content-type so this pr will add a new field and the response will look like:

{
   '@type': 'topic_page',
   'type': 'Topic page',
   ...
}

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@razvanMiu razvanMiu requested a review from avoinea April 5, 2022 13:25
@mister-roboto
Copy link

@razvanMiu thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@avoinea avoinea requested a review from tisto April 5, 2022 13:32
@erral
Copy link
Member

erral commented Apr 5, 2022

Fixes partially #1322

@razvanMiu razvanMiu force-pushed the content_type_title branch from 63bb52d to b0cbce6 Compare April 5, 2022 19:59
@netlify
Copy link

netlify bot commented May 25, 2022

Deploy Preview for plone-restapi canceled.

Name Link
🔨 Latest commit 9f84b0d
🔍 Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/6465495a32eeef0008d3ffce

@avoinea
Copy link
Member

avoinea commented Jun 21, 2022

@jenkins-plone-org please run jobs

@nileshgulia1
Copy link
Member

@jenkins-plone-org please run jobs

@ksuess
Copy link
Member

ksuess commented Mar 31, 2023

Assuming this is for Volto: A mapping from fti id to fti title can be received from state.types. No need to extend the serializers.

@avoinea
Copy link
Member

avoinea commented Mar 31, 2023

@ksuess Can you detail a little. Is it available for anonymous users?

@ksuess
Copy link
Member

ksuess commented Mar 31, 2023

@ksuess Can you detail a little. Is it available for anonymous users?

So issue description has to be read as "There is no way to get the human readable title of the content-type as long the user is Anonymous"

@nileshgulia1
Copy link
Member

@jenkins-plone-org please run jobs

Co-authored-by: David Glick <[email protected]>
@nileshgulia1
Copy link
Member

One thing I don't get is where to put the documentation about this extra field? Isn't it self-explanatory with being just added in http-examples?

@jensens
Copy link
Member

jensens commented May 16, 2023

One thing I don't get is where to put the documentation about this extra field? Isn't it self-explanatory with being just added in http-examples?

@stevepiercy may I head this one over to you?

@stevepiercy
Copy link
Contributor

@jensens, I agree with @nileshgulia1. What do you think is needed in the way of documentation?

I found no place where the REST API authors have documented the keys in a response. Do they want to start?

@nileshgulia1
Copy link
Member

@jenkins-plone-org please run jobs

@nileshgulia1
Copy link
Member

@jenkins-plone-org please run jobs

@nileshgulia1
Copy link
Member

@jenkins-plone-org please run jobs

@davisagli
Copy link
Member

@jensens okay now from your point of view?

@davisagli davisagli requested a review from jensens May 17, 2023 11:53
@avoinea
Copy link
Member

avoinea commented May 17, 2023

@jenkins-plone-org please run jobs

@avoinea
Copy link
Member

avoinea commented May 17, 2023

@jenkins-plone-org please run jobs

@davisagli davisagli merged commit 04e6982 into master May 18, 2023
@davisagli davisagli deleted the content_type_title branch May 18, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants