Microcks Metadata Groovyscript.instructions
---
applyTo: '**/*.apimetadata.yaml'
---
# Microcks Metadata Construction – SCRIPT Dispatcher
## Purpose
Guide for building Microcks APIMetadata files using the SCRIPT dispatcher for advanced dispatching logic.
## Workflow
1. Identify the target operation (method + path) from the OpenAPI contract.
2. For each operation, define the dispatcher as `SCRIPT`.
3. Write a Groovy script in `dispatcherRules` to select the response based on request content.
## Examplewhen to use it
Community prompt sourced from the open-source GitHub repo SebastienDegodez/copilot-instructions (Apache-2.0). A "Microcks Metadata Groovyscript.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
SebastienDegodez/copilot-instructions · Apache-2.0
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions