§ Articles← All Articles
//ACB//OAS//API Design

It's Time to Move to OAS: What ACB's New Fragment Scaffolding Changes

Anypoint Code Builder now scaffolds OAS 3.0 specs that reference Exchange fragments. I build a Financial Account fragment, reference it from a Process API, scaffold the implementation, and validate it with Bruno — and explain why this closes the RAML-to-OAS reuse gap.

PBPatryk Bandurski·29 Jul 2026·6 min read·5.0

For a while now, I've been telling teams the same thing: move from RAML to OAS. It's the direction MuleSoft is pushing, and it's the industry standard. But every time someone asked me "what about Data Type Fragments?", I had a weak answer. RAML made schema reuse easy. OAS, until now, made it harder — especially inside Anypoint Code Builder.

That gap just closed.

The update#

Anypoint Code Builder now scaffolds OAS 3.0 API specifications that use $ref to reference Anypoint Exchange fragments.

i
// Note

I still hit friction with this pattern inside Anypoint Studio. ACB is where it now works cleanly.

The scenario I tested#

I wanted to see the full flow, not just read about it.

App, API spec, and API fragment relationship
App calls the API spec, which references the API fragment published in Exchange via $ref.

Step 1 — Build the fragment

I created an API Fragment in ACB, type OAS, called Financial Account. Inside it, I defined one schema with the properties I'd expect on a shared CDM entity:

yamlfinancial-account.yaml
openapi: 3.0.0
info:
  version: 1.0.0
  title: Financial Account
paths: {}
components:
  schemas:
    FinancialAccount:
      type: object
      description: Represents a financial account held at a financial institution.
      properties:
        accountId:
          type: string
        accountNumber:
          type: string
        accountType:
          type: string
        currency:
          type: string
        balance:
          type: number
          format: double
        ownerId:
          type: string
        institutionName:
          type: string
        openedDate:
          type: string
          format: date
        status:
          type: string
        interestRate:
          type: number
          format: double

I published it to Anypoint Exchange.

Step 2 — Reuse it in a Process API

Next, I created a Financial Account Process API, also OAS, and imported the fragment directly from Exchange by searching for "Financial Account." In my POST /accounts and GET /accounts/{accountNumber} operations, I referenced the shared schema like this:

yamlfinancial-account-process-api.yaml
schema:
  $ref: 'exchange_modules/b9e77a07-589b-4461-aa60-5f8ca0b647fb/financial-account/1.0.0/financial-account.yaml#/components/schemas/FinancialAccount'

This is the same pattern I used to build with RAML Data Type Fragments: one CDM model, referenced everywhere it's needed, instead of the same schema copy-pasted and drifting apart across specs.

CapabilityRAML Data Type FragmentsOAS Exchange Fragments
Schema reuse across specsYesYes
Native ACB scaffoldingYesYes (new)
Tooling ecosystemMule-centricIndustry-wide
AI model familiarityLowerHigher

Step 3 — Scaffold the implementation

After I published the Process API, ACB asked if I wanted to move to implementation. I said yes. ACB scaffolded a new project directly from the OAS spec — with the fragment reference intact.

Scaffolded operation from the OAS spec
Fig 2. One of the operations scaffolded from the OAS spec, with the FinancialAccount schema referenced from the Exchange fragment.

Step 4 — Validate it

I ran the generated stub and called it from Bruno. The requests validated correctly against the referenced schema. No manual patching, no surprises.

The verdict#

This is the moment to move to OAS. It's not the newest version of the spec on the market, but it's the industry standard, it's more widely adopted than RAML, and it now has a clear path for fragment reuse inside ACB.

One more observation from testing this: I ran the whole scenario with the help of MuleSoft Vibes, and it handled both the fragment and the API spec without issues. OAS is already well understood by the model — an advantage over RAML when you pair AI assistance with spec design.

Key Takeaways

  • RAML fragment reuse now has an OAS equivalent: ACB scaffolds specs that reference Exchange fragments via $ref.
  • The workflow mirrors RAML Data Type Fragments: one schema, referenced from every spec that needs it.
  • Anypoint Studio still lags behind: this works cleanly in ACB today.
  • AI tooling favors OAS: models parse and generate OAS more reliably than RAML.
// Share this

Discussion

§ Discussion

Join the conversation

Sign in to leave a comment and engage with the community.

§ Keep learning

More articles like this

Deep dives into MuleSoft, DevOps, and integration engineering — written for developers who want to understand the why, not just the how.

Browse All Articles →