Adds a specs array to counterfact.yaml that mounts multiple OpenAPI documents at distinct URL base paths from a single server instance. When specs is present it takes precedence over spec.
specs:
- source: ./billing.yaml
base: billing
- source: https://example.com/identity.yaml
base: identity
This config will create subdirectories named billing and identity under the routes and tests directory.
The default_.context.ts directory will still live directly under routes.
Keep the number of classes that need to be aware of multiple APIs to a minimum.
For example, create multiple instances of Dispatcher rather than making Dispatcher aware of multiple APIs.
Adds a
specsarray tocounterfact.yamlthat mounts multiple OpenAPI documents at distinct URL base paths from a single server instance. Whenspecsis present it takes precedence overspec.This config will create subdirectories named billing and identity under the routes and tests directory.
The default_.context.ts directory will still live directly under routes.
Keep the number of classes that need to be aware of multiple APIs to a minimum.
For example, create multiple instances of Dispatcher rather than making Dispatcher aware of multiple APIs.