Skip to content

Conversation

@aqibmohammadkhan
Copy link
Contributor

@aqibmohammadkhan aqibmohammadkhan commented Nov 21, 2025

Issue

https://gravitee.atlassian.net/browse/APIM-11947

Description

  • created endpoint and its use case that updates attributes of a navigation item
  • It can update title for a PAGE, LINK and FOLDER
  • it can update url or title or both for LINK

{{baseURL}}/portal-navigation-items/{{navigationId}}

sample payload for update page with required fields

{
    "title": "Update title",
    "type": "PAGE",
    "order": 4
}
Screen.Recording.2025-11-21.at.11.57.12.mov
image image

Response

{
    "type": "LINK",
    "url": "yahoo.com",
    "id": "70dcfdcd-0b83-43fb-aa9f-7d948295742c",
    "organizationId": "DEFAULT",
    "environmentId": "DEFAULT",
    "title": "this is updated title",
    "area": "TOP_NAVBAR",
    "order": 4
}

Additional context

@aqibmohammadkhan aqibmohammadkhan requested a review from a team as a code owner November 21, 2025 06:31
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Contributor

@jourdiw jourdiw left a comment

Choose a reason for hiding this comment

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

Personally I try to avoid mocking the use cases for the resource tests. One of the great advantages with the Onion architecture is that we can have better confidence for the end to end functionality.

WDYT about not mocking the use cases for the resources?

@aqibmohammadkhan aqibmohammadkhan force-pushed the APIM-11947-Create-backend-endpoint-for-updating-a-section branch 2 times, most recently from ddfc638 to 6c9a022 Compare November 24, 2025 10:23
@aqibmohammadkhan
Copy link
Contributor Author

Personally I try to avoid mocking the use cases for the resource tests. One of the great advantages with the Onion architecture is that we can have better confidence for the end to end functionality.

WDYT about not mocking the use cases for the resources?

I agree. This was already done, so i just added my changes below that. I have removed all the new created use cases now and mocking the in-memory crud and other services.

@aqibmohammadkhan aqibmohammadkhan force-pushed the APIM-11947-Create-backend-endpoint-for-updating-a-section branch 2 times, most recently from 389f4f0 to db584b1 Compare November 25, 2025 08:08
@aqibmohammadkhan aqibmohammadkhan force-pushed the APIM-11947-Create-backend-endpoint-for-updating-a-section branch 3 times, most recently from 91b779e to c4ee44b Compare November 26, 2025 12:09
@aqibmohammadkhan aqibmohammadkhan force-pushed the APIM-11947-Create-backend-endpoint-for-updating-a-section branch 4 times, most recently from 20b059c to 9fca7c6 Compare November 27, 2025 12:51
@kovaren kovaren self-requested a review November 27, 2025 14:43
@aqibmohammadkhan aqibmohammadkhan force-pushed the APIM-11947-Create-backend-endpoint-for-updating-a-section branch from c686067 to 62b8c64 Compare November 27, 2025 14:46
Copy link
Contributor

@jourdiw jourdiw left a comment

Choose a reason for hiding this comment

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

Nice job!

A couple things if you are feeling 🚀 :

  • Use core-based exceptions in the services rather than the InvalidDataException
  • Removing page content id from the Update model in the core package to match what is expected from the Resource 👍

@aqibmohammadkhan aqibmohammadkhan force-pushed the APIM-11947-Create-backend-endpoint-for-updating-a-section branch from 10d1d1d to 1faa3d6 Compare November 27, 2025 15:23
@aqibmohammadkhan aqibmohammadkhan merged commit e63f58f into master Nov 27, 2025
12 checks passed
@aqibmohammadkhan aqibmohammadkhan deleted the APIM-11947-Create-backend-endpoint-for-updating-a-section branch November 27, 2025 15:51
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.

4 participants