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

IBX-8176: OpenAPI compatible location moving endpoint #95

Merged
merged 32 commits into from
Jul 12, 2024

Conversation

barw4
Copy link
Contributor

@barw4 barw4 commented May 20, 2024

🎫 Issue IBX-8176

Related PRs:

#100

Description:

The new endpoint follows the given specification:

POST /api/v2/ibexa/content/locations/1/2/54/
Content-Type: application/vnd.ibexa.api.MoveLocationInput+json
Accept: application/json
{
    "MoveLocationInput": {
        "destination": "/1/2"
    }
}

It differs by request body which in specification is as shown below but I assume the above is the way to go because of the way parsers are working.

    {
        "destination": "/1/2"
    }

We decided to separate trashing location and moving subtree to simplify things and make documentation more clearer on this.

Kuba's comment on API platform docs: #95 (comment)

Documentation:

TBD

@barw4 barw4 self-assigned this May 20, 2024
@barw4 barw4 added the Feature New feature request label May 20, 2024
@barw4 barw4 changed the title IBX-8176: Created new OpenAPI compatible location moving endpoint IBX-8176: OpenAPI compatible location moving endpoint May 20, 2024
@tischsoic
Copy link
Contributor

tischsoic commented May 23, 2024

An example of how requests with different _content-type_s can be described with API Platform annotations is here:
https://issues.ibexa.co/browse/IBX-8302?focusedId=283948&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-283948

@barw4 barw4 marked this pull request as ready for review May 23, 2024 11:33
@barw4 barw4 requested a review from a team May 23, 2024 11:33
tests/lib/Server/Input/Parser/MoveLocationTest.php Outdated Show resolved Hide resolved
tests/lib/Server/Input/Parser/MoveLocationTest.php Outdated Show resolved Hide resolved
tests/bundle/Functional/LocationTest.php Outdated Show resolved Hide resolved
src/lib/Server/Input/Parser/MoveLocation.php Outdated Show resolved Hide resolved
src/bundle/Resources/config/routing.yml Outdated Show resolved Hide resolved
@barw4 barw4 requested review from Steveb-p and a team May 23, 2024 11:58
@barw4 barw4 force-pushed the ibx-8176-move-location-endpoint-OpenAPI branch from d7f610a to 090b7cf Compare May 27, 2024 10:00
@alongosz alongosz requested a review from a team May 29, 2024 13:05
@barw4 barw4 changed the base branch from main to ibx-8176-routing-content-type-header-expression June 6, 2024 12:18
@barw4 barw4 force-pushed the ibx-8176-move-location-endpoint-OpenAPI branch from 090b7cf to 22511b1 Compare June 6, 2024 12:19
@barw4 barw4 requested review from alongosz and ViniTou June 6, 2024 14:06
Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

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

Also, please take a look at PHPStan issues.

src/bundle/Resources/config/routing.yml Outdated Show resolved Hide resolved
src/lib/Server/Controller/Location.php Outdated Show resolved Hide resolved
src/lib/Server/Input/Parser/MoveLocation.php Outdated Show resolved Hide resolved
src/lib/Server/Input/Parser/MoveLocation.php Outdated Show resolved Hide resolved
tests/bundle/Functional/LocationTest.php Outdated Show resolved Hide resolved
@barw4 barw4 force-pushed the ibx-8176-routing-content-type-header-expression branch from 2a8c066 to 49034f7 Compare June 18, 2024 17:02
@barw4 barw4 force-pushed the ibx-8176-move-location-endpoint-OpenAPI branch from 74ebd11 to 0e870aa Compare June 20, 2024 17:32
@barw4 barw4 force-pushed the ibx-8176-move-location-endpoint-OpenAPI branch from 70096cf to 6c6685c Compare July 11, 2024 10:08
Copy link

sonarcloud bot commented Jul 11, 2024

@konradoboza konradoboza merged commit 3d53e1f into main Jul 12, 2024
9 checks passed
@konradoboza konradoboza deleted the ibx-8176-move-location-endpoint-OpenAPI branch July 12, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature request QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants