Skip to content

@W-23307229 Sync api-designer-experience OAS spec with vcs-xapi RAML changes - #162

Open
iamerico wants to merge 7 commits into
masterfrom
W-23307229/sync-experience-api-oas-with-1207
Open

@W-23307229 Sync api-designer-experience OAS spec with vcs-xapi RAML changes#162
iamerico wants to merge 7 commits into
masterfrom
W-23307229/sync-experience-api-oas-with-1207

Conversation

@iamerico

Copy link
Copy Markdown

Summary

Updates the published apis/api-designer-experience/api.yaml spec to reflect the internal RAML changes made to the api-designer-vcs-xapi service in api-designer-vcs-xapi#1207 (currently under teammate review).

  • Adds new endpoints: readiness/config/feature-flag checks (/ready, /configuration, /config, /features), project sub-resources (files, rename, clone, settings, changes + variants), branch sub-resources (events, import, archive, exchange/dependencies/job), the full Github OAuth flow (/github, /github/callback, /github/oauth, /github/oauth/callback, /github/session), global Exchange asset search (/exchange/assets), and organization identities lookup (/organizations, /organizations/{orgId}/identities).
  • Marks POST .../publish/platform and GET .../api/{name} as (Deprecated) in their descriptions, matching the file's existing text-only deprecation convention.
  • Adds EventPayload schema for the new /events endpoint.
  • Bumps exchange.json version from 1.1.5 to 1.2.0 (minor — new backward-compatible functionality).

Note: api-designer-vcs-xapi PR #1207 is still under review. If reviewers request RAML changes there, this PR will get a follow-up joint revision to stay in sync.

Test plan

  • YAML/JSON syntax validated (python3 -c "import yaml/json")
  • No duplicate operationIds across 60 total operations
  • python3 scripts/build/validate_xorigin.py — no violations
  • python3 scripts/build/validate_descriptions.py — no violations
  • Pre-commit hooks passed (validate-descriptions, validate-mcp-server, validate-xorigin, validate-jtbd, validate-skills)
  • Pre-push hooks passed (test-portal pytest; jest/anypoint-cli-v4 governance check skipped — not installed locally, non-blocking)
  • CI validation in this repo (AC2)
  • Confirm live endpoints are deployed/accessible once #1207 merges

…changes (PR #1207)

Add ~19 new endpoints and mark 2 operations as deprecated in the
api-designer-experience OpenAPI spec to match the internal RAML spec
changes made in api-designer-vcs-xapi PR #1207: readiness/config/feature
flag endpoints, new project and branch sub-resources (files, rename,
clone, settings, changes, events, import, archive, dependency job
status), the full Github OAuth flow, global Exchange asset search, and
organization identities lookup. Bump exchange.json version to 1.2.0.
@iamerico
iamerico requested review from a team as code owners July 17, 2026 13:40

@lbauret lbauret left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sync of api-designer-experience OAS against the vcs-xapi RAML from #1207 — all #1207-scoped additions are propagated faithfully, no published endpoint removed, and the SemVer minor bump matches the additive-only shape of the change. Two small fidelity drifts against the RAML source worth catching before this ships, plus three pre-existing patterns worth calling out.

AI-assisted review

Should fix

1. EventPayload schema drops RAML-required flags on id and payloadapis/api-designer-experience/api.yaml:2878 (consumer at L1002)
Source RAML types/eventPayload.raml declares id: type: string / payload: type: object with no ? suffix — under RAML 1.0 both are required. OAS omits required: [id, payload], so contract-driven clients infer both as optional. Direct fidelity break on a brand-new endpoint for a published MDH spec.

EventPayload:
  type: object
  required:
    - id
    - payload
  properties:
    id:
      type: string
    payload:
      type: object

2. GET /github token and origin query params marked optional; RAML treats them as requiredapis/api-designer-experience/api.yaml:2195-2204
RAML token: type: string / origin: type: string lack required: false; RAML 1.0 defaults query params to required. Both carry descriptions ("Token used to authenticate against github" / "Origin of the request being made in order to build the redirect URL") that only make sense as required. OAS advertises them as optional. Fix: add required: true to each - name: token / - name: origin entry.

Consider

3. Pre-existing verb drift on POST /projects/{projectId}/branches/{branch}/open not correctedapis/api-designer-experience/api.yaml:1010-1062
Post-#1207 RAML defines this as GET /open (api.raml:361); OAS keeps post from the pre-PR baseline. Not introduced by this PR, but the PR title says "sync with vcs-xapi RAML changes," so a fresh reader will assume OAS matches — it doesn't. Either fix here or file a follow-up.

4. Several RAML endpoints outside #1207's scope remain unpublished — RAML at HEAD still contains PUT /projects/{projectId}/branches/{branch} (rename branch), …/conformance, /conformance/plan, …/commits, …/merge, …/keepAlive, …/exchange GET + POST, /projects/credentials, /projects/access/permissions, /external/*, /exchange/assets/{groupId}/{assetId}/{version}, and org-level settings/access/permissions/exchange/facets. All pre-existing gaps (not regressions). If the intent is complete parity, follow-up PR; if not, worth calling out in the PR description.

5. /organizations/{orgId}/identities orgId path param lacks UUID pattern that peers carryapis/api-designer-experience/api.yaml:181-186
Not required by RAML, but every other x-owner-id/x-organization-id in this file uses the UUID regex ^[0-9a-fA-F]{8}\-…\-[0-9a-fA-F]{12}$. For a published MDH spec, consistent UUID validation matches downstream expectations.

Summary

2 Should fix, 3 Consider — verdict COMMENT. Top ask: land the two Should-fix fidelity nits (EventPayload required flags + /github query-param required flags) before this merges so the derived contracts don't ship advertising the wrong shape.

type: string
result:
type: string
EventPayload:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should fix — Source RAML types/eventPayload.raml declares id: type: string / payload: type: object with no ? suffix, so both are required under RAML 1.0. This OAS block omits required: [id, payload], and contract-driven clients will infer both as optional. Suggest:

EventPayload:
  type: object
  required:
    - id
    - payload
  properties:
    id:
      type: string
    payload:
      type: object

type: string
- name: origin
description: Origin of the request being made in order to build the redirect URL
in: query

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should fix — RAML source has token: type: string and origin: type: string with no required: false — RAML 1.0 defaults query params to required. Both descriptions ("Token used to authenticate against github" / "Origin of the request being made in order to build the redirect URL") only make sense as required. Please add required: true to each - name: token / - name: origin entry.

Comment thread apis/api-designer-experience/api.yaml Outdated
'200':
description: Successful operation.
operationId: createProjectsByProjectidBranchesByBranchEvents
/projects/{projectId}/branches/{branch}/open:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider — Post-#1207 RAML defines this as GET /open (api.raml:361); the OAS still describes it as post from the pre-PR baseline. Not introduced by this PR, but since the title says "sync with vcs-xapi RAML changes," a fresh reader will assume the two are aligned — they aren't. Fix here or file a follow-up.

iamerico added 2 commits July 17, 2026 17:15
…params, required schema fields

- Fix .../branches/{branch}/open method (post -> get) to match current RAML
- Add required: true to GET /github's token and origin query parameters
- Add required: [id, payload] to the EventPayload schema
Propagates the 6 RAML/routes.js parity fixes from api-designer-vcs-xapi
PR #1207 into this OAS translation, keeping both specs consistent:
- Add PATCH and GET .../exchange/dependencies
- Fix .../branches/{branch}/status method (get -> post)
- Add GET .../access/permissions/share (new SharedWithIdentities schema)
- Add /health as a documented alias of /ping and /status

@lbauret lbauret left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Follow-up on the delta since my COMMENT at ff4e05c — the three round-1 fixes are in and untouched; this delta is a net expansion (5 new endpoints, 1 verb flip, 1 query param, 1 new component schema) translating the RAML additions from mulesoft-emu/api-designer-vcs-xapi#1207. One naming drift on the /status GET→POST switch worth catching before the next publish.

Should fix

  • /projects/{projectId}/branches/{branch}/status operationId is stale after the verb switch (apis/api-designer-experience/api.yaml:1108-1143). Verb flipped to post, but operationId: getProjectsByProjectidBranchesByBranchStatus still says get. Every neighboring POST on this collection uses the create* prefix (createProjectsByProjectidBranchesByBranchClean, createProjectsByProjectidBranchesByBranchSave) — the mismatch will leak into generated SDK method names. Recommend createProjectsByProjectidBranchesByBranchStatus.

Summary

1 Should fix — verdict COMMENT. Top ask is the stale operationId after the /status GET→POST switch.

Comment thread apis/api-designer-experience/api.yaml Outdated
description: Successful operation.
'401':
description: Authorization failed
operationId: getProjectsByProjectidBranchesByBranchStatus

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should fix — the verb flipped get → post here, but operationId still carries the get* prefix. Every neighboring POST in this file uses the create* prefix (createProjectsByProjectidBranchesByBranchClean, createProjectsByProjectidBranchesByBranchSave). Since generated SDK method names key off operationId, this will surface as a naming inconsistency in every downstream client. Suggest:

operationId: createProjectsByProjectidBranchesByBranchStatus

iamerico added 2 commits July 18, 2026 13:06
…ts from OAS

Removes GET /configuration (PKCE migration flags) and the deprecated
endpoints (.../publish/platform, GET .../api/{name}, POST
.../api/{name}/{version}, POST /github/session), matching the same
removal just applied to the source RAML in api-designer-vcs-xapi#1207.
Closes the remaining gap between this OAS translation and the internal
RAML spec (api-designer-vcs-xapi#1207), verified field-by-field against
the RAML types and the real route/service code, then independently
re-verified by an adversarial review pass.

New endpoints (17):
- GET/POST /organizations/{orgId}/settings (+ x-all-settings header)
- GET /organizations/{orgId}/access/permissions
- GET /organizations/{orgId}/exchange/facets
- GET /projects/access/permissions
- GET/DELETE /projects/credentials
- PUT /projects/{projectId}/branches/{branch} (rename)
- GET .../branches/{branch}/commits
- POST .../branches/{branch}/merge
- GET .../branches/{branch}/conformance and /conformance/plan
- POST .../branches/{branch}/keepAlive
- GET .../branches/{branch}/exchange
- POST .../branches/{branch}/exchange/assets
- GET /external/check_access, /external/repositories(/{repositoryId}), /external/organizations

Schema fixes:
- Project: vcsType -> vcsStorageType, add lastUpdatedDate/defaultBranch/deleted/initialWorkingDirectory
- ProjectCreate/ProjectImport: classifier enum (6 values) replacing narrow type enum
- ProjectSync: was a copy-paste of ProjectImport; now the real domain/domainType/repositoryName shape
- ProjectPermissions: add canPublish/canShare/canOwn
- SharedWith/SharedWithResult: revoke -> revoked, drop nonexistent previousSharedWith, add type/role/result enums
- PublishExchange/PublishResponse invented fields replaced with the real ProjectPublish schema on
  POST .../exchange/assets; /publish/exchange itself correctly left with no typed body
- createBranch: add baseBranch; misc missing query params/headers on branches, save/v2, files/v2

Bump exchange.json version to 1.3.0 (additive, backward-compatible).

@lbauret lbauret left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

in: query
schema:
type: boolean
- name: searchTerm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Query parameter 'searchTerm' must have a description

Parameter 'searchTerm' on GET /exchange/assets has no description field. This is a governance-rule violation (input-types-described) — make validate-all-governed fails for this API. All endpoint input parameters (query, path, header) must be documented with a description.

in: query
schema:
type: string
- name: businessId

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Query parameter 'businessId' must have a description

Same input-types-described violation as 'searchTerm' above — this new query parameter on GET /exchange/assets has no description.

in: query
schema:
type: string
- name: pageOffset

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Query parameter 'pageOffset' must have a description

Same input-types-described violation — this new query parameter on GET /exchange/assets has no description.

in: query
schema:
type: number
- name: status

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Query parameter 'status' must have a description

Same input-types-described violation — this new query parameter on GET /exchange/assets has no description.

get:
description: Redirects the response received from Github (code and state query params) back to the Design Center UI
parameters:
- name: code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Query parameter 'code' must have a description

On GET /github/oauth/callback, the 'code' query parameter has no description. input-types-described governance rule violation.

in: query
schema:
type: string
- name: state

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Query parameter 'state' must have a description

On GET /github/oauth/callback, the 'state' query parameter has no description. input-types-described governance rule violation.

'302':
description: Redirection response
headers:
Location:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] 'Location' response header must have a description

The 302 response header on GET /github/oauth/callback has no description. input-types-described governance rule violation — applies to headers too.

'302':
description: Redirection response
headers:
Location:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] 'Location' response header must have a description

The 302 response header on GET /github has no description. Same input-types-described violation as the /github/oauth/callback Location header.

Comment thread apis/api-designer-experience/api.yaml Outdated
get:
description: Retrieves identities (users/teams) belonging to the given organization, optionally filtered by search term
parameters:
- name: orgId

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Path parameter must be named 'organizationId', not 'orgId'

GET /organizations/{orgId}/identities uses 'orgId' as the path parameter name. Repo convention (path-organization-identifier governance rule) requires 'organizationId' for the organization context. Rename the path template and parameter.

Comment thread apis/api-designer-experience/api.yaml Outdated
content:
application/zip:
schema: {}
operationId: getProjectsByProjectidBranchesByBranchArchive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[BLOCKER] Operation must have at least one response example

GET /projects/{projectId}/branches/{branch}/archive (200 response, application/zip) has no example. operation-examples governance rule violation — every endpoint must provide at least one example so consumers understand the response shape.

iamerico added 2 commits July 27, 2026 20:08
Inline the requestBody schema for acquireLock/releaseLock/keepAlive/publish-exchange
instead of pairing a $ref with a sibling description (invalid in OAS 3.0), and drop
the now-unreferenced Generated requestBody component. Replace patternProperties in
FilesForm with additionalProperties, since patternProperties is not part of OAS 3.0.

@lbauret lbauret left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Author

Hi team. Could you please review this PR (API Designer Experience API / api-designer-xapi)? Already approved by someone on the team, and the requested changes have been incorporated. I also validated the specification and the portal locally with:
• make validate-api API=apis/api-designer-xapi
• make generate-portal  
Thank you!

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.

3 participants