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-8173: Implemented routing language expression parsing media type from Content-Type header #100

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

barw4
Copy link
Contributor

@barw4 barw4 commented Jun 5, 2024

🎫 Issue IBX-8173

Description:

As agreed internally to avoid methods' duplication a new routing expression language function was implemented that allows parsing media type value from the Content-Type header.

Usage:

condition: 'ibexa_get_media_type(request) === "CopyContentTypeInput"'

Additionally, it was used to make copy content type endpoint OpenAPI compatible.

POST /api/v2/ibexa/content/types/1
Content-Type: application/vnd.ibexa.api.CopyContentTypeInput+json
Accept: application/json
{
    "CopyContentTypeInput": {}
}

@barw4 barw4 added the Feature New feature request label Jun 5, 2024
@barw4 barw4 self-assigned this Jun 5, 2024
@barw4 barw4 marked this pull request as ready for review June 5, 2024 13:05
@barw4 barw4 requested a review from a team June 5, 2024 13:05
@konradoboza konradoboza requested a review from a team June 5, 2024 13:07
@barw4 barw4 requested a review from konradoboza June 5, 2024 13:08
@konradoboza konradoboza requested a review from a team June 5, 2024 13:14
@barw4 barw4 requested a review from konradoboza June 5, 2024 13:18
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.

Nice work @barw4! 👏

@konradoboza konradoboza requested a review from a team June 5, 2024 13:20
@barw4 barw4 requested a review from webhdx June 5, 2024 14:01
@barw4 barw4 changed the title IBX-8176: Implemented routing language expression extension handling Content-Type header IBX-8173: Implemented routing language expression extension handling Content-Type header Jun 6, 2024
@barw4 barw4 changed the title IBX-8173: Implemented routing language expression extension handling Content-Type header IBX-8173: Implemented routing language expression extension handling Content-Type header with copy content type endpoint Jun 6, 2024
@barw4 barw4 requested a review from a team June 6, 2024 12:19
@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 changed the title IBX-8173: Implemented routing language expression extension handling Content-Type header with copy content type endpoint IBX-8173: Implemented routing language expression parsing media type from Content-Type header Jun 18, 2024
Copy link
Contributor

@Steveb-p Steveb-p left a comment

Choose a reason for hiding this comment

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

This is how you can make you service "callable" during routing 👇

src/bundle/Resources/config/services.yml Outdated Show resolved Hide resolved
@barw4 barw4 requested review from alongosz and Steveb-p June 19, 2024 10:54
@barw4 barw4 force-pushed the ibx-8176-routing-content-type-header-expression branch from 76fab36 to 12905f3 Compare June 21, 2024 08:41
src/bundle/Routing/OptionsLoader/Mapper.php Outdated Show resolved Hide resolved
@barw4 barw4 force-pushed the ibx-8176-routing-content-type-header-expression branch 2 times, most recently from cf6a637 to 4da63c8 Compare July 1, 2024 09:05
@barw4 barw4 force-pushed the ibx-8176-routing-content-type-header-expression branch from 4da63c8 to 8692557 Compare July 2, 2024 22:07
Copy link

sonarcloud bot commented Jul 2, 2024

@Steveb-p Steveb-p merged commit 47ae01a into main Jul 11, 2024
11 checks passed
@Steveb-p Steveb-p deleted the ibx-8176-routing-content-type-header-expression branch July 11, 2024 09:57
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.

9 participants