Fix resource modelling inconsistencies across apps/instances/deployments (#49) - #58
Open
DLondonoD wants to merge 2 commits into
Open
Fix resource modelling inconsistencies across apps/instances/deployments (#49)#58DLondonoD wants to merge 2 commits into
DLondonoD wants to merge 2 commits into
Conversation
…nts (camaraproject#49) Renames /appinstances to /app-instances to match the hyphenated kebab-case naming used by every other multi-word path (/deployments, /clusters, /edge-cloud-zones). Adds single-resource GET-by-id for both application instances (GET /app-instances/{appInstanceId}, operationId getAppInstance) and deployments (GET /deployments/{appDeploymentId}, operationId getAppDeployment), for consistency with /apps' getApp. The former list operations are renamed to getAppInstances/getAppDeployments to free up the singular operationId for the new by-id GETs. Fixes createAppInstance's 202 Location header, which described the URI as pointing at "the newly created application" (copy-paste from /apps) and had no working GET target. It now correctly describes the application instance and references the new getAppInstance endpoint. Adds an equivalent Location header to createAppDeployment's 202 response, aligning it with createAppInstance's pattern and pointing at the new getAppDeployment endpoint. Splits AppManifest into a request-only shape (no appId, used by submitApp) and a new AppManifestInfo response shape (AppManifest allOf + required appId), used by both getApps' list items and getApp. getApp's response is also unwrapped to return AppManifestInfo bare, matching getApps' item shape instead of the previous { appManifest: AppManifest } wrapper - this also matches what the existing getApp/getApps test feature files already expected. Fixes camaraproject#49
) Now that getAppInstance (GET /app-instances/{appInstanceId}) and getAppDeployment (GET /deployments/{appDeploymentId}) exist as single-resource GET-by-id operations, filtering the list operations (getAppInstances, getAppDeployments) by that same id via query parameter is redundant with just calling the by-id endpoint directly. Removes appInstanceId from getAppInstances' query parameters and appDeploymentId from getAppDeployments', aligning both with getApps (which has no analogous id-in-query filter either). Updates the corresponding test feature files, removing the now-invalid filtered-by-id scenarios.
DLondonoD
requested review from
FabrizioMoggio,
JoseMConde,
Kevsy,
gainsley,
maheshc01 and
seralogar
as code owners
July 23, 2026 16:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
correction
What this PR does / why we need it:
Fixes five resource-modelling inconsistencies across apps/instances/deployments:
/appinstancesto/app-instances, matching thehyphenated kebab-case naming used by every other multi-word path
(
/deployments,/clusters,/edge-cloud-zones).GET /app-instances/{appInstanceId}(
getAppInstance) andGET /deployments/{appDeploymentId}(
getAppDeployment), for consistency with/apps'getApp. The formerlist operations are renamed to
getAppInstances/getAppDeploymentstofree up the singular operationId for the new by-id GETs.
Locationheader consistency: fixescreateAppInstance's202Locationheader, which described the URI as pointing at "the newlycreated application" (copy-paste from
/apps) and had no working GETtarget — it now correctly describes the application instance and
references the new
getAppInstanceendpoint. Adds an equivalentLocationheader tocreateAppDeployment's202response, aligning itwith
createAppInstance's pattern and pointing at the newgetAppDeploymentendpoint.AppManifestinto arequest-only shape (no
appId, used bysubmitApp) and a newAppManifestInforesponse shape (AppManifestallOf+ requiredappId), used by bothgetApps' list items andgetApp.getApp/getAppsshape alignment:getApp's response is unwrappedto return
AppManifestInfobare, matchinggetApps' item shape insteadof the previous
{ appManifest: AppManifest }wrapper.Additionally, now that
getAppInstance/getAppDeploymentexist assingle-resource GET-by-id operations, removes the now-redundant
appInstanceId/appDeploymentIdquery filters fromgetAppInstances/getAppDeploymentsrespectively — filtering a list bythe exact id it's supposed to enumerate is redundant with calling the
by-id endpoint directly, and this also aligns both list operations with
getApps, which has no analogous id-in-query filter.Test feature files were added/updated accordingly (
getAppInstance.feature,getAppDeployment.featurenew;getAppInstances.feature,getAppDeployments.feature,getApp.feature,getApps.feature,createAppInstance.feature,deleteAppInstance.featureupdated).Which issue(s) this PR fixes:
Fixes #49
Special notes for reviewers:
This is a breaking change to path/operationId naming
(
/appinstances→/app-instances,getAppInstance→getAppInstances,getAppDeployments' query params), acceptable per the issue given the APIis still pre-1.0/rc. Reviewers should double check the
AppManifest/AppManifestInfosplit doesn't affect any other operation still relyingon the original combined schema.
Changelog input
release-note Rename /appinstances to /app-instances;
Additional documentation
This section can be blank.