Read Fanfictions | readfictional.com

Scaffold Modular APIs Natively Via APIKit

Reading time: 4 minutes

Modular design is a necessity for enterprise API teams. By leveraging reusable components like schemas, parameters, and security definitions as external fragments, developers can ensure consistency and efficiency across their API ecosystems. However, one common friction point has been the scaffolding process: developers often had to manually bundle OpenAPI specifications before generating their Mule applications.

We’re excited to announce native support for OpenAPI Specification (OAS) fragments within APIKit, streamlining the “design-to-implementation” workflow.

The Problem: Scaffolding required a fully resolved spec

In the past, APIKit required a fully resolved OpenAPI specification to scaffold a project. If your API relied on external fragments – referenced via $ref to local files or Exchange assets – the scaffolding engine would fail, forcing developers to manually bundle their specifications using external tools. This added unnecessary complexity to the API-first workflow and discouraged the use of modern, modular design patterns.

The Solution: Native fragment resolution using APIKit

Now, we’ve updated APIKit to natively recognize and resolve external OAS fragments. When you initiate a scaffold from an OpenAPI specification, APIKit now automatically:

  • Resolve dependencies: It handles $ref references pointing to local files, relative paths, and Exchange assets
  • Maintains modularity: It supports fragments for schemas, parameters, responses, request bodies, headers, and security schemes, ensuring that your modular API design is respected throughout the implementation phase
  • Automatic bundling: It bundles the resolved specification seamlessly before scaffolding, removing the need for manual pre-processing
Native fragment resolution via APIKit

3 reasons this matters for your workflow

This update is an investment in developer productivity and API governance. You can expect the following:

  1. Faster development cycles: By eliminating manual bundling, you can jump straight from a modular API design to a scaffolded project in seconds
  2. Improved governance: Because APIKit now supports fragment resolution, it encourages the use of reusable enterprise API components, leading to cleaner, more maintainable codebases
  3. Consistent experience: Your implementation will now match your design, with payload shapes, headers, and error definitions correctly propagated from your fragments into your Mule flows

Get started

This capability is included as part of the core APIKit experience within Anypoint Code Builder developer experience, with no additional licensing required. Download the latest Anypoint Extension Pack via Visual Studio Marketplace and scaffold directly from your modular OpenAPI specifications.

Source link

Exit mobile version