Salesforce Certified MuleSoft Integration Foundations free question 6 / 10 · Domain 4: Explain the common technical complexities and patterns in integration development
A team will design a new inventory API specification before implementing it. Which sequence matches the process described in the Anypoint Code Builder page 'Designing API Specs and Fragments'?
- Create or import the spec and test it, optionally add fragments, and publish to Exchange
- Publish the fragments to Exchange, import them, and then start writing the specification
- Write the spec, implement it as a Mule application, and publish the application that works
- Publish the spec to Exchange first, then import the published version to test it and add fragments
Show the answer and explanation
Answer: A
Why this is correct
The page says you use Anypoint Code Builder to create, design, test, and publish new API specifications to Exchange. The process has three steps. First you create or import and test your API specification. Second you can optionally create and add fragments to your specification. Third you publish your API specification to Exchange. The correct choice follows that order. The wrong choices move publication to the start or reverse the roles of fragments and specifications.
Why the other options are wrong
"Publish the fragments to Exchange, import them, and then start writing the specification" … The process does not begin with fragments. Fragments are an optional second step that you create and add to the specification you already have.
"Publish the spec to Exchange first, then import the published version to test it and add fragments" … Publishing to Exchange is the last step. Creating or importing and testing the spec comes first, and fragments are optional additions before publication.
"Write the spec, implement it as a Mule application, and publish the application that works" … The page is about designing API specifications. It ends with publishing the specification to Exchange, not with implementing and publishing an application.
What a fragment is
A fragment is a reusable piece, such as a RAML trait or data type, an OAS component, a JSON Schema, or an Avro schema, that you can include or reference within a specification.