Skip to content

feat: handle single-type entity type #35

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

Merged
merged 2 commits into from
Aug 21, 2020
Merged

Conversation

benjamincanac
Copy link
Member

Handle Single Type endpoints: https://strapi.io/documentation/v3.x/content-api/api-endpoints.html#endpoints

  • update and delete methods now works without the id
  • Entities can now be defined like:
entities: [
  'products',
  { name: 'articles', type: 'collection' },
  { name: 'homepage', type: 'single' }
]

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@benjamincanac benjamincanac requested a review from atinux August 20, 2020 11:01
@benjamincanac benjamincanac marked this pull request as draft August 20, 2020 11:01
@benjamincanac benjamincanac removed the request for review from atinux August 20, 2020 11:02
@codecov
Copy link

codecov bot commented Aug 20, 2020

Codecov Report

Merging #35 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #35   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           13        13           
  Branches         3         3           
=========================================
  Hits            13        13           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5436a58...fa860d6. Read the comment docs.

Copy link
Contributor

@atinux atinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the docs? 😀

@atinux
Copy link
Contributor

atinux commented Aug 21, 2020

What about supporting single:homepage since the entities cannot have : in their names?

@benjamincanac benjamincanac force-pushed the feat/handle-single-types branch from 52b2747 to ebbbe7a Compare August 21, 2020 15:06
@benjamincanac benjamincanac marked this pull request as ready for review August 21, 2020 15:14
@benjamincanac benjamincanac requested a review from atinux August 21, 2020 15:15
@benjamincanac benjamincanac merged commit 04b440b into master Aug 21, 2020
@benjamincanac benjamincanac deleted the feat/handle-single-types branch August 21, 2020 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants