From a650addb025d63d1878447fb0fb14955f4448693 Mon Sep 17 00:00:00 2001 From: vedubhat Date: Thu, 11 Dec 2025 21:28:24 -0800 Subject: [PATCH 01/13] chore: deprecate formatter --- src/schemas/json/specmatic.json | 4 +++- src/test/specmatic/specmatic.json | 16 ---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index 26ad799096c..027d5e23874 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -305,7 +305,8 @@ "formatters": { "type": ["array", "null"], "description": "List of report formatters", - "items": { "$ref": "#/definitions/ReportFormatterDetails" } + "items": { "$ref": "#/definitions/ReportFormatterDetails" }, + "deprecated": true }, "types": { "$ref": "#/definitions/ReportTypes" } } @@ -313,6 +314,7 @@ "ReportFormatterDetails": { "type": "object", "additionalProperties": false, + "deprecated": true, "description": "Configuration for a specific report formatter", "properties": { "type": { diff --git a/src/test/specmatic/specmatic.json b/src/test/specmatic/specmatic.json index b2d9b3948c1..c6861cb783c 100644 --- a/src/test/specmatic/specmatic.json +++ b/src/test/specmatic/specmatic.json @@ -87,22 +87,6 @@ "provider": "azure" }, "report": { - "formatters": [ - { - "heading": "Contract Test Results", - "layout": "table", - "lite": false, - "logo": "./logo.png", - "logoAltText": "Company Logo", - "outputDirectory": "./reports", - "title": "API Test Report", - "type": "html" - }, - { - "outputDirectory": "./reports", - "type": "ctrf" - } - ], "types": { "APICoverage": { "OpenAPI": { From b34297241ba753c04f4981d77a3b48254fbaa0b7 Mon Sep 17 00:00:00 2001 From: Sufiyan Date: Mon, 9 Feb 2026 14:10:09 +0530 Subject: [PATCH 02/13] Add Config Specmatic V3 schema --- src/schemas/json/specmatic-2.json | 575 +++++++++ src/schemas/json/specmatic-3.json | 1823 +++++++++++++++++++++++++++++ src/schemas/json/specmatic.json | 593 +--------- 3 files changed, 2421 insertions(+), 570 deletions(-) create mode 100644 src/schemas/json/specmatic-2.json create mode 100644 src/schemas/json/specmatic-3.json diff --git a/src/schemas/json/specmatic-2.json b/src/schemas/json/specmatic-2.json new file mode 100644 index 00000000000..027d5e23874 --- /dev/null +++ b/src/schemas/json/specmatic-2.json @@ -0,0 +1,575 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/specmatic.json", + "title": "Specmatic Configuration", + "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", + "type": "object", + "required": ["version", "contracts"], + "additionalProperties": false, + "properties": { + "version": { + "type": "integer", + "enum": [2], + "description": "Configuration version for Specmatic" + }, + "contracts": { + "type": "array", + "description": "Array of contract configurations", + "items": { + "$ref": "#/definitions/ContractConfig" + } + }, + "auth": { + "$ref": "#/definitions/Auth", + "description": "Authentication configuration" + }, + "pipeline": { + "$ref": "#/definitions/Pipeline", + "description": "Pipeline configuration for Azure DevOps" + }, + "environments": { + "type": "object", + "description": "Environment-specific configurations", + "additionalProperties": { + "$ref": "#/definitions/Environment" + } + }, + "hooks": { + "type": "object", + "description": "Custom hooks configuration", + "additionalProperties": { "type": "string" } + }, + "repository": { + "$ref": "#/definitions/RepositoryInfo", + "description": "Repository information" + }, + "report": { + "$ref": "#/definitions/ReportConfigurationDetails", + "description": "Report generation configuration" + }, + "security": { + "$ref": "#/definitions/SecurityConfiguration", + "description": "Security configuration for API testing" + }, + "test": { + "$ref": "#/definitions/TestConfiguration", + "description": "Test execution configuration" + }, + "stub": { + "$ref": "#/definitions/StubConfiguration", + "description": "Stub/mock server configuration" + }, + "virtualService": { + "$ref": "#/definitions/VirtualServiceConfiguration", + "description": "Virtual service configuration" + }, + "examples": { + "type": "array", + "description": "List of example file paths", + "items": { "type": "string" } + }, + "workflow": { + "$ref": "#/definitions/WorkflowConfiguration", + "description": "Workflow configuration for ID management" + }, + "ignoreInlineExamples": { + "type": ["boolean", "null"], + "description": "Whether to ignore inline examples in specifications" + }, + "additionalExampleParamsFilePath": { + "type": ["string", "null"], + "description": "Path to additional example parameters file" + }, + "attributeSelectionPattern": { + "$ref": "#/definitions/AttributeSelectionPattern", + "description": "Pattern for selecting attributes in responses" + }, + "allPatternsMandatory": { + "type": ["boolean", "null"], + "description": "Whether all patterns are mandatory" + }, + "defaultPatternValues": { + "type": "object", + "description": "Default values for patterns", + "additionalProperties": true + } + }, + "definitions": { + "ContractConfig": { + "type": "object", + "title": "ContractConfig", + "description": "Defines a contract source and its provides/consumes configuration.", + "additionalProperties": false, + "properties": { + "git": { + "type": "object", + "description": "Git contract source details.", + "additionalProperties": false, + "properties": { + "url": { + "type": ["string", "null"], + "description": "URL of the git repository." + }, + "branch": { + "type": ["string", "null"], + "description": "Branch name in the git repository." + }, + "matchBranch": { + "type": "boolean" + } + }, + "required": [] + }, + "filesystem": { + "type": "object", + "description": "Filesystem contract source details.", + "additionalProperties": false, + "properties": { + "directory": { + "type": "string", + "description": "Directory path for contract files." + } + }, + "required": [] + }, + "provides": { + "type": "array", + "description": "List of specs provided for testing. Each entry can be a string or an object.", + "items": { + "oneOf": [ + { + "type": "string", + "description": "Path to a spec file." + }, + { + "type": "object", + "description": "Object describing provided specs and test configuration.", + "additionalProperties": false, + "properties": { + "specs": { + "type": "array", + "items": { "type": "string" }, + "description": "List of spec file paths." + }, + "baseUrl": { + "type": "string", + "description": "Test base URL." + }, + "host": { + "type": "string", + "description": "Host for the test base URL." + }, + "port": { + "type": "integer", + "description": "Port for the test base URL." + }, + "resiliencyTests": { + "type": "object", + "additionalProperties": false, + "description": "Resiliency test configuration.", + "properties": { + "enable": { + "type": "string", + "enum": ["all", "positiveOnly", "none"], + "description": "Resiliency test suite to enable." + } + }, + "required": [] + } + }, + "required": ["specs"] + } + ] + } + }, + "consumes": { + "type": "array", + "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", + "items": { + "oneOf": [ + { + "type": "string", + "description": "Path to a spec file." + }, + { + "type": "object", + "additionalProperties": false, + "description": "Object describing consumed specs and stub configuration.", + "properties": { + "specs": { + "type": "array", + "items": { "type": "string" }, + "description": "List of spec file paths." + }, + "baseUrl": { + "type": "string", + "description": "Full base URL for the stub." + }, + "host": { + "type": "string", + "description": "Host for the stub base URL." + }, + "port": { + "type": "integer", + "description": "Port for the stub base URL." + }, + "basePath": { + "type": "string", + "description": "Base path for the stub base URL." + } + }, + "required": ["specs"] + } + ] + } + } + }, + "required": [] + }, + "Auth": { + "type": "object", + "additionalProperties": false, + "description": "Authentication configuration", + "properties": { + "bearer-file": { + "type": "string", + "description": "Path to file containing bearer token" + }, + "bearer-environment-variable": { + "type": ["string", "null"], + "description": "Environment variable name containing bearer token" + } + } + }, + "Pipeline": { + "type": "object", + "additionalProperties": false, + "description": "Azure DevOps pipeline configuration", + "properties": { + "provider": { + "type": "string", + "enum": ["azure"], + "description": "Pipeline provider type" + }, + "organization": { + "type": "string", + "description": "Azure DevOps organization name" + }, + "project": { + "type": "string", + "description": "Azure DevOps project name" + }, + "definitionId": { + "type": "integer", + "description": "Pipeline definition ID" + } + } + }, + "Environment": { + "type": "object", + "additionalProperties": false, + "description": "Environment-specific configuration", + "properties": { + "baseurls": { + "type": ["object", "null"], + "description": "Base URLs for different services", + "additionalProperties": { "type": "string" } + }, + "variables": { + "type": ["object", "null"], + "description": "Environment variables", + "additionalProperties": { "type": "string" } + } + } + }, + "RepositoryInfo": { + "type": "object", + "additionalProperties": false, + "description": "Repository information", + "properties": { + "provider": { + "type": "string", + "description": "Repository provider type" + }, + "collectionName": { + "type": "string", + "description": "Name of the collection" + } + } + }, + "ReportConfigurationDetails": { + "type": "object", + "additionalProperties": false, + "description": "Report generation configuration", + "properties": { + "formatters": { + "type": ["array", "null"], + "description": "List of report formatters", + "items": { "$ref": "#/definitions/ReportFormatterDetails" }, + "deprecated": true + }, + "types": { "$ref": "#/definitions/ReportTypes" } + } + }, + "ReportFormatterDetails": { + "type": "object", + "additionalProperties": false, + "deprecated": true, + "description": "Configuration for a specific report formatter", + "properties": { + "type": { + "type": ["string", "null"], + "enum": ["text", "html", "ctrf"], + "description": "Type of report formatter" + }, + "layout": { + "type": ["string", "null"], + "enum": ["table"], + "description": "Layout style for the report" + }, + "lite": { + "type": ["boolean", "null"], + "description": "Whether to generate a lite version of the report" + }, + "title": { + "type": ["string", "null"], + "description": "Title for the report" + }, + "logo": { + "type": ["string", "null"], + "description": "Path to logo image for the report" + }, + "logoAltText": { + "type": ["string", "null"], + "description": "Alt text for the logo" + }, + "heading": { + "type": ["string", "null"], + "description": "Heading for the report" + }, + "outputDirectory": { + "type": ["string", "null"], + "description": "Directory to output the report" + } + } + }, + "ReportTypes": { + "type": "object", + "additionalProperties": false, + "description": "Configuration for different report types", + "properties": { + "APICoverage": { "$ref": "#/definitions/APICoverage" } + } + }, + "APICoverage": { + "type": "object", + "additionalProperties": false, + "description": "API coverage report configuration", + "properties": { + "OpenAPI": { "$ref": "#/definitions/APICoverageConfiguration" } + } + }, + "APICoverageConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "OpenAPI coverage configuration", + "properties": { + "successCriteria": { "$ref": "#/definitions/SuccessCriteria" }, + "excludedEndpoints": { + "type": ["array", "null"], + "description": "List of endpoints to exclude from coverage", + "items": { "type": "string" } + } + } + }, + "SuccessCriteria": { + "type": "object", + "additionalProperties": false, + "description": "Success criteria for API coverage", + "properties": { + "minThresholdPercentage": { + "type": ["integer", "null"], + "description": "Minimum coverage percentage threshold" + }, + "maxMissedEndpointsInSpec": { + "type": ["integer", "null"], + "description": "Maximum number of missed endpoints allowed" + }, + "enforce": { + "type": ["boolean", "null"], + "description": "Whether to enforce the success criteria" + } + } + }, + "SecurityConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "Security configuration", + "properties": { + "OpenAPI": { "$ref": "#/definitions/OpenAPISecurityConfiguration" } + } + }, + "OpenAPISecurityConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "OpenAPI security configuration", + "properties": { + "securitySchemes": { + "type": "object", + "description": "Security scheme configurations", + "additionalProperties": { + "$ref": "#/definitions/SecuritySchemeConfiguration" + } + } + } + }, + "SecuritySchemeConfiguration": { + "type": "object", + "description": "Configuration for a security scheme", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["oauth2", "basicAuth", "bearer", "apiKey"], + "description": "Type of security scheme" + }, + "token": { + "type": ["string", "null"], + "description": "Authentication token" + }, + "value": { + "type": ["string", "null"], + "description": "Authentication value" + } + } + }, + "TestConfiguration": { + "type": "object", + "description": "Test execution configuration", + "additionalProperties": false, + "properties": { + "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" }, + "validateResponseValues": { + "type": ["boolean", "null"], + "description": "Whether to validate response values" + }, + "allowExtensibleSchema": { + "type": ["boolean", "null"], + "description": "Whether to allow extensible schema validation" + }, + "timeoutInMilliseconds": { + "type": ["integer", "null"], + "description": "Test timeout in milliseconds" + }, + "strictMode": { + "type": ["boolean", "null"], + "description": "Whether to enable strict mode for contract testing" + } + } + }, + "ResiliencyTestsConfig": { + "type": "object", + "description": "Configuration for resiliency tests", + "additionalProperties": false, + "properties": { + "enable": { + "type": ["string", "null"], + "enum": ["all", "positiveOnly", "none"], + "description": "Level of resiliency tests to enable" + } + } + }, + "StubConfiguration": { + "type": "object", + "description": "Stub/mock server configuration", + "additionalProperties": false, + "properties": { + "generative": { + "type": ["boolean", "null"], + "description": "Whether to enable generative stubbing" + }, + "delayInMilliseconds": { + "type": ["integer", "null"], + "description": "Delay to add to stub responses in milliseconds" + }, + "dictionary": { + "type": ["string", "null"], + "description": "Path to dictionary file for generative stubbing" + }, + "includeMandatoryAndRequestedKeysInResponse": { + "type": ["boolean", "null"], + "description": "Whether to include mandatory and requested keys in response" + }, + "startTimeoutInMilliseconds": { + "type": ["integer", "null"], + "description": "Timeout for stub server startup in milliseconds" + }, + "hotReload": { + "type": ["string", "null"], + "description": "Hot reload configuration" + }, + "strictMode": { + "type": ["boolean", "null"], + "description": "Whether to enable strict mode for stubbing" + } + } + }, + "VirtualServiceConfiguration": { + "type": "object", + "description": "Virtual service configuration", + "additionalProperties": false, + "properties": { + "nonPatchableKeys": { + "type": "array", + "description": "List of keys that cannot be patched", + "items": { "type": "string" } + } + } + }, + "WorkflowConfiguration": { + "type": "object", + "description": "Workflow configuration for ID management", + "additionalProperties": false, + "properties": { + "ids": { + "type": "object", + "description": "ID operation configurations", + "additionalProperties": { + "$ref": "#/definitions/WorkflowIDOperation" + } + } + } + }, + "WorkflowIDOperation": { + "type": "object", + "description": "Configuration for ID operations in workflow", + "additionalProperties": false, + "properties": { + "extract": { + "type": ["string", "null"], + "description": "JSONPath expression to extract ID" + }, + "use": { + "type": ["string", "null"], + "description": "JSONPath expression to use extracted ID" + } + } + }, + "AttributeSelectionPattern": { + "type": "object", + "additionalProperties": false, + "description": "Pattern for selecting attributes in API responses", + "properties": { + "default_fields": { + "type": ["array", "null"], + "description": "Default fields to include", + "items": { "type": "string" } + }, + "query_param_key": { + "type": ["string", "null"], + "description": "Query parameter key for field selection" + } + } + } + } +} diff --git a/src/schemas/json/specmatic-3.json b/src/schemas/json/specmatic-3.json new file mode 100644 index 00000000000..66da9d39db1 --- /dev/null +++ b/src/schemas/json/specmatic-3.json @@ -0,0 +1,1823 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/specmatic.json", + "title": "Specmatic Configuration", + "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", + "type": "object", + "required": [ + "version" + ], + "additionalProperties": false, + "properties": { + "version": { + "type": "integer", + "enum": [ + 3 + ] + }, + "systemUnderTest": { + "$ref": "#/$defs/TestRuntimeServiceDefinition" + }, + "dependencies": { + "$ref": "#/$defs/DependenciesDefinition" + }, + "proxies": { + "$ref": "#/$defs/ProxyDefinitionsArray" + }, + "mcp": { + "$ref": "#/$defs/McpDefinition" + }, + "specmatic": { + "$ref": "#/$defs/SpecmaticDefinition" + }, + "components": { + "type": "object", + "additionalProperties": false, + "properties": { + "sources": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/SourceSchema" + } + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/StaticServiceDefinition" + } + }, + "runOptions": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/RunOptions" + } + }, + "examples": { + "$ref": "#/$defs/ExamplesConfiguration" + }, + "dictionaries": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/DictionaryConfiguration" + } + }, + "adapters": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/AdapterConfiguration" + } + }, + "certificates": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/CertConfiguration" + } + }, + "settings": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/ConcreteSettings" + }, + { + "$ref": "#/$defs/ModeSpecificSettings" + } + ] + } + } + } + } + }, + "$defs": { + "SubstitutionExpression": { + "type": "string", + "pattern": "^\\$\\{[^}]+\\}$" + }, + "GuardedSubstitutionString": { + "type": "string", + "allOf": [ + { + "if": { + "pattern": "^\\$\\{" + }, + "then": { + "$ref": "#/$defs/SubstitutionExpression" + } + } + ] + }, + "SubstitutableString": { + "$ref": "#/$defs/GuardedSubstitutionString" + }, + "SubstitutableStringArray": { + "type": "array", + "items": { + "$ref": "#/$defs/SubstitutableString" + } + }, + "SubstitutableInteger": { + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/GuardedSubstitutionString" + } + ] + }, + "SubstitutableFloat": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/$defs/GuardedSubstitutionString" + } + ] + }, + "SubstitutableBoolean": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/$defs/GuardedSubstitutionString" + } + ] + }, + "SubstitutableStringOrArray": { + "oneOf": [ + { + "$ref": "#/$defs/SubstitutableString" + }, + { + "$ref": "#/$defs/SubstitutableStringArray" + } + ] + }, + "Reference": { + "type": "object", + "additionalProperties": true, + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + } + } + }, + "DependenciesDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "services": { + "$ref": "#/$defs/RuntimeServiceDefinitionOrRefArray" + }, + "data": { + "$ref": "#/$defs/DataDefinition" + }, + "settings": { + "$ref": "#/$defs/MockSettingsOrRef" + } + } + }, + "RuntimeServiceDefinitionOrRefArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "service" + ], + "properties": { + "service": { + "$ref": "#/$defs/MockRuntimeServiceDefinitionOrRef" + } + } + } + }, + "MockRuntimeServiceDefinitionOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/MockRuntimeServiceDefinition" + } + }, + "MockRuntimeServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "service": { + "type": "object", + "additionalProperties": false, + "required": [ + "definitions" + ], + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/$defs/SpecificationStaticDefinitionArray" + }, + "runOptions": { + "$ref": "#/$defs/MockRunOptionsOrRef" + }, + "data": { + "$ref": "#/$defs/DataDefinition" + }, + "settings": { + "$ref": "#/$defs/MockSettingsOrRef" + } + } + } + } + }, + "TestRuntimeServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "service": { + "$ref": "#/$defs/TestServiceDefinitionOrRef" + } + } + }, + "TestServiceDefinitionOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/TestRuntimeServiceDefinition" + } + }, + "TestServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/$defs/SpecificationStaticDefinitionArray" + }, + "runOptions": { + "$ref": "#/$defs/TestRunOptionsOrRef" + }, + "data": { + "$ref": "#/$defs/DataDefinition" + }, + "settings": { + "$ref": "#/$defs/TestSettingsOrRef" + } + } + }, + "DataDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "examples": { + "$ref": "#/$defs/ArrayExampleConfigurationOrRef" + }, + "dictionary": { + "$ref": "#/$defs/DictionaryConfigurationOrRef" + }, + "adapters": { + "$ref": "#/$defs/AdapterConfigurationOrRef" + } + } + }, + "ProxyDefinitionsArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "proxy" + ], + "properties": { + "proxy": { + "$ref": "#/$defs/ProxyDefinition" + } + } + } + }, + "ProxyDefinition": { + "type": "object", + "additionalProperties": false, + "required": [ + "target" + ], + "properties": { + "target": { + "$ref": "#/$defs/SubstitutableString" + }, + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "timeoutInMilliseconds": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "adapters": { + "$ref": "#/$defs/AdapterConfigurationOrRef" + }, + "mock": { + "$ref": "#/$defs/SubstitutableStringOrArray" + }, + "cert": { + "$ref": "#/$defs/CertConfigurationOrRef" + }, + "recordingsDirectory": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "McpDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/$defs/McpTestRunOptions" + } + } + }, + "McpTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "transportKind": { + "anyOf": [ + { + "type": "string", + "enum": [ + "STREAMABLE_HTTP" + ] + }, + { + "$ref": "#/$defs/SubstitutableString" + } + ] + }, + "enableResiliencyTests": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "dictionaryFile": { + "$ref": "#/$defs/SubstitutableString" + }, + "bearerToken": { + "$ref": "#/$defs/SubstitutableString" + }, + "filterTools": { + "$ref": "#/$defs/SubstitutableStringArray" + }, + "skipTools": { + "$ref": "#/$defs/SubstitutableStringArray" + } + } + }, + "SpecmaticDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "license": { + "$ref": "#/$defs/LicenseDefinition" + }, + "governance": { + "type": "object", + "additionalProperties": false, + "properties": { + "report": { + "$ref": "#/$defs/ReportsDefinition" + }, + "successCriteria": { + "$ref": "#/$defs/SuccessCriteriaDefinition" + } + } + }, + "settings": { + "$ref": "#/$defs/ConcreteSettingsOrRef" + } + } + }, + "LicenseDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "ReportsDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "formats": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "html", + "ctrf" + ] + } + }, + { + "$ref": "#/$defs/SubstitutableString" + } + ] + }, + "outputDirectory": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "SuccessCriteriaDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "minCoveragePercentage": { + "$ref": "#/$defs/SubstitutableFloat" + }, + "maxMissedOperationsInSpec": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "enforce": { + "$ref": "#/$defs/SubstitutableBoolean" + } + } + }, + "StaticServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/$defs/SpecificationStaticDefinitionArray" + } + } + }, + "SpecificationStaticDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "definition" + ], + "properties": { + "definition": { + "$ref": "#/$defs/SpecificationStaticDefinition" + } + } + } + }, + "SpecificationStaticDefinition": { + "type": "object", + "additionalProperties": false, + "required": [ + "source", + "specs" + ], + "properties": { + "source": { + "$ref": "#/$defs/SourceSchemaOrRef" + }, + "specs": { + "type": "array", + "items": { + "$ref": "#/$defs/SpecificationSchema" + } + } + } + }, + "SpecificationSchema": { + "oneOf": [ + { + "$ref": "#/$defs/SpecificationPath" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "spec": { + "$ref": "#/$defs/SpecificationObject" + } + } + } + ] + }, + "SpecificationPath": { + "type": "string" + }, + "SpecificationObject": { + "type": "object", + "additionalProperties": false, + "required": [ + "path" + ], + "properties": { + "id": { + "type": "string" + }, + "path": { + "type": "string" + }, + "urlPathPrefix": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "SourceSchemaOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/SourceSchema" + } + }, + "SourceSchema": { + "oneOf": [ + { + "$ref": "#/$defs/GitSourceSchema" + }, + { + "$ref": "#/$defs/FileSystemSourceSchema" + } + ] + }, + "GitSourceSchema": { + "type": "object", + "additionalProperties": false, + "required": [ + "git" + ], + "properties": { + "git": { + "$ref": "#/$defs/GitSourceOptions" + } + } + }, + "GitSourceOptions": { + "type": "object", + "additionalProperties": false, + "required": [ + "url" + ], + "properties": { + "url": { + "$ref": "#/$defs/SubstitutableString" + }, + "branch": { + "$ref": "#/$defs/SubstitutableString" + }, + "matchBranch": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "auth": { + "$ref": "#/$defs/GitSourceAuthentication" + } + } + }, + "GitSourceAuthentication": { + "oneOf": [ + { + "$ref": "#/$defs/GitSourceBearerFileAuthentication" + }, + { + "$ref": "#/$defs/GitSourceBearerEnvAuthentication" + }, + { + "$ref": "#/$defs/GitSourcePersonalAccessTokenAuthentication" + } + ] + }, + "GitSourceBearerFileAuthentication": { + "type": "object", + "additionalProperties": false, + "required": [ + "bearerFile" + ], + "properties": { + "bearerFile": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "GitSourceBearerEnvAuthentication": { + "type": "object", + "additionalProperties": false, + "required": [ + "bearerEnvironmentVariable" + ], + "properties": { + "bearerEnvironmentVariable": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "GitSourcePersonalAccessTokenAuthentication": { + "type": "object", + "additionalProperties": false, + "required": [ + "personalAccessToken" + ], + "properties": { + "personalAccessToken": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "FileSystemSourceSchema": { + "type": "object", + "additionalProperties": false, + "required": [ + "filesystem" + ], + "properties": { + "filesystem": { + "$ref": "#/$defs/FileSystemSourceOptions" + } + } + }, + "FileSystemSourceOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "directory": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "RunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/$defs/OpenApiRunOptions" + }, + "wsdl": { + "$ref": "#/$defs/WsdlRunOptions" + }, + "asyncapi": { + "$ref": "#/$defs/AsyncApiRunOptions" + }, + "graphqlsdl": { + "$ref": "#/$defs/GraphQLSdlRunOptions" + }, + "protobuf": { + "$ref": "#/$defs/ProtobufRunOptions" + } + } + }, + "TestRunOptionsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/TestRunOptions" + } + }, + "TestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/$defs/OpenApiTestRunOptions" + }, + "wsdl": { + "$ref": "#/$defs/WsdlTestRunOptions" + }, + "asyncapi": { + "$ref": "#/$defs/AsyncApiTestRunOptions" + }, + "graphqlsdl": { + "$ref": "#/$defs/GraphqlSdlTestRunOptions" + }, + "protobuf": { + "$ref": "#/$defs/ProtobufTestRunOptions" + } + } + }, + "MockRunOptionsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/MockRunOptions" + } + }, + "MockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/$defs/OpenApiMockRunOptions" + }, + "wsdl": { + "$ref": "#/$defs/WsdlMockRunOptions" + }, + "asyncapi": { + "$ref": "#/$defs/AsyncApiMockRunOptions" + }, + "graphqlsdl": { + "$ref": "#/$defs/GraphqlSdlMockRunOptions" + }, + "protobuf": { + "$ref": "#/$defs/ProtobufMockRunOptions" + } + } + }, + "OpenApiRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/$defs/OpenApiTestRunOptions" + }, + "else": { + "$ref": "#/$defs/OpenApiMockRunOptions" + } + }, + "AsyncApiRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/$defs/AsyncApiTestRunOptions" + }, + "else": { + "$ref": "#/$defs/AsyncApiMockRunOptions" + } + }, + "GraphQLSdlRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/$defs/GraphqlSdlTestRunOptions" + }, + "else": { + "$ref": "#/$defs/GraphqlSdlMockRunOptions" + } + }, + "ProtobufRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/$defs/ProtobufTestRunOptions" + }, + "else": { + "$ref": "#/$defs/ProtobufMockRunOptions" + } + }, + "WsdlRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/$defs/WsdlTestRunOptions" + }, + "else": { + "$ref": "#/$defs/WsdlMockRunOptions" + } + }, + "WsdlTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "WsdlMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "cert": { + "$ref": "#/$defs/CertConfigurationOrRef" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "AsyncApiTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "replyTimeout": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "subscriberReadinessWaitTimeout": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/AsyncApiServerDefinition" + } + }, + "schemaRegistry": { + "$ref": "#/$defs/AsyncApiSchemaRegistry" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "AsyncApiServerDefinition": { + "type": "object", + "additionalProperties": false, + "required": [ + "host", + "protocol" + ], + "properties": { + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "protocol": { + "$ref": "#/$defs/SubstitutableString" + }, + "adminCredentials": { + "$ref": "#/$defs/FreeFormObject" + }, + "client": { + "type": "object", + "additionalProperties": false, + "properties": { + "consumer": { + "$ref": "#/$defs/CertConfigurationOrRef" + }, + "producer": { + "$ref": "#/$defs/CertConfigurationOrRef" + } + } + } + } + }, + "AsyncApiMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/AsyncApiServerDefinition" + } + }, + "schemaRegistry": { + "$ref": "#/$defs/AsyncApiSchemaRegistry" + }, + "inMemoryBroker": { + "type": "object", + "additionalProperties": false, + "properties": { + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "logDir": { + "$ref": "#/$defs/SubstitutableString" + } + } + } + } + }, + "AsyncApiSchemaRegistry": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind" + ], + "properties": { + "kind": { + "anyOf": [ + { + "type": "string", + "enum": [ + "CONFLUENT", + "DEFAULT" + ] + }, + { + "$ref": "#/$defs/SubstitutableString" + } + ] + }, + "url": { + "$ref": "#/$defs/SubstitutableString" + }, + "username": { + "$ref": "#/$defs/SubstitutableString" + }, + "password": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "GraphqlSdlTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "GraphqlSdlMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "ProtobufTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "importPaths": { + "$ref": "#/$defs/SubstitutableStringArray" + }, + "protocVersion": { + "$ref": "#/$defs/SubstitutableString" + }, + "requestTimeout": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "ProtobufMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "importPaths": { + "$ref": "#/$defs/SubstitutableStringArray" + }, + "protocVersion": { + "$ref": "#/$defs/SubstitutableString" + }, + "specs": { + "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "filter": { + "$ref": "#/$defs/SubstitutableString" + }, + "workflow": { + "$ref": "#/$defs/WorkflowConfiguration" + }, + "swaggerUiBaseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "swaggerUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "actuatorUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "specs": { + "$ref": "#/$defs/OpenApiSpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ + "mock", + "stateful-mock" + ] + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "filter": { + "$ref": "#/$defs/SubstitutableString" + }, + "logMode": { + "anyOf": [ + { + "type": "string", + "enum": [ + "ALL", + "REQUEST_RESPONSE" + ] + }, + { + "$ref": "#/$defs/SubstitutableString" + } + ] + }, + "logsDirPath": { + "$ref": "#/$defs/SubstitutableString" + }, + "cert": { + "$ref": "#/$defs/CertConfigurationOrRef" + }, + "specs": { + "$ref": "#/$defs/OpenApiSpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiSpecificationRuntimeDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "spec" + ], + "properties": { + "spec": { + "$ref": "#/$defs/OpenApiSpecificationRuntimeDefinition" + } + } + } + }, + "SpecificationRuntimeDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "spec" + ], + "properties": { + "spec": { + "$ref": "#/$defs/SpecificationRuntimeDefinition" + } + } + } + }, + "FreeFormObject": { + "type": "object", + "additionalProperties": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + }, + "SpecificationRuntimeDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "overlayFilePath": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "OpenApiSpecificationRuntimeDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "host": { + "$ref": "#/$defs/SubstitutableString" + }, + "port": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/$defs/SubstitutableString" + }, + "overlayFilePath": { + "$ref": "#/$defs/SubstitutableString" + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/SecuritySchemeConfiguration" + } + } + } + }, + "SecuritySchemeConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "token" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2", + "basicAuth", + "bearer", + "apiKey" + ] + }, + "token": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "WorkflowConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "extract": { + "$ref": "#/$defs/SubstitutableString" + }, + "use": { + "$ref": "#/$defs/SubstitutableString" + } + } + } + } + } + }, + "ExamplesConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "testExamples": { + "type": "array", + "items": { + "$ref": "#/$defs/BaseExampleConfigurationOrRef" + } + }, + "mockExamples": { + "type": "array", + "items": { + "$ref": "#/$defs/BaseExampleConfigurationOrRef" + } + }, + "commonExamples": { + "$ref": "#/$defs/BaseExampleConfiguration" + } + } + }, + "ArrayExampleConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/ArrayExampleConfiguration" + } + }, + "ArrayExampleConfiguration": { + "type": "array", + "items": { + "$ref": "#/$defs/BaseExampleConfigurationOrRef" + } + }, + "BaseExampleConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/BaseExampleConfiguration" + } + }, + "BaseExampleConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "directories" + ], + "properties": { + "directories": { + "$ref": "#/$defs/SubstitutableStringArray" + } + } + }, + "DictionaryConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/DictionaryConfiguration" + } + }, + "DictionaryConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "path" + ], + "properties": { + "path": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "AdapterConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/AdapterConfiguration" + } + }, + "AdapterConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "pre_specmatic_request_processor": { + "$ref": "#/$defs/SubstitutableString" + }, + "post_specmatic_response_processor": { + "$ref": "#/$defs/SubstitutableString" + }, + "pre_specmatic_response_processor": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "CertConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/CertConfiguration" + } + }, + "CertConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "keyStore" + ], + "properties": { + "keyStore": { + "$ref": "#/$defs/KeyStoreConfiguration" + }, + "keyStorePassword": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "ConcreteSettingsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/ConcreteSettings" + } + }, + "ModeSpecificSettings": { + "type": "object", + "not": { + "anyOf": [ + { + "required": [ + "general" + ] + }, + { + "required": [ + "test" + ] + }, + { + "required": [ + "mock" + ] + }, + { + "required": [ + "proxy" + ] + }, + { + "required": [ + "backwardCompatibility" + ] + } + ] + }, + "anyOf": [ + { + "$ref": "#/$defs/TestSettings" + }, + { + "$ref": "#/$defs/MockSettings" + } + ] + }, + "ConcreteSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "general": { + "$ref": "#/$defs/GeneralSettings" + }, + "test": { + "$ref": "#/$defs/TestSettings" + }, + "mock": { + "$ref": "#/$defs/MockSettings" + }, + "proxy": { + "$ref": "#/$defs/ProxySettings" + }, + "backwardCompatibility": { + "$ref": "#/$defs/BackwardCompatibilitySettings" + } + } + }, + "KeyStoreConfiguration": { + "oneOf": [ + { + "$ref": "#/$defs/KeyStoreFileConfiguration" + }, + { + "$ref": "#/$defs/KeyStoreDirectoryConfiguration" + } + ] + }, + "KeyStoreFileConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "file" + ], + "properties": { + "file": { + "$ref": "#/$defs/SubstitutableString" + }, + "password": { + "$ref": "#/$defs/SubstitutableString" + }, + "alias": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "KeyStoreDirectoryConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "directory" + ], + "properties": { + "directory": { + "$ref": "#/$defs/SubstitutableString" + }, + "password": { + "$ref": "#/$defs/SubstitutableString" + }, + "alias": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "BackwardCompatibilitySettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "baseBranch": { + "$ref": "#/$defs/SubstitutableString" + }, + "targetPath": { + "$ref": "#/$defs/SubstitutableString" + }, + "repoDirectory": { + "$ref": "#/$defs/SubstitutableString" + }, + "strictMode": { + "$ref": "#/$defs/SubstitutableBoolean" + } + } + }, + "ProxySettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "recordRequests": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "ignoreHeaders": { + "$ref": "#/$defs/SubstitutableStringArray" + } + } + }, + "MockSettingsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/MockSettings" + } + }, + "MockSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "generative": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "delayInMilliseconds": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "startTimeoutInMilliseconds": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "hotReload": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "strictMode": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "lenientMode": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "gracefulRestartTimeoutInMilliseconds": { + "$ref": "#/$defs/SubstitutableInteger" + } + } + }, + "TestSettingsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/Reference" + }, + "else": { + "$ref": "#/$defs/TestSettings" + } + }, + "TestSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "schemaResiliencyTests": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "none", + "positiveOnly" + ] + }, + { + "$ref": "#/$defs/SubstitutableString" + } + ] + }, + "timeoutInMilliseconds": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "strictMode": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "lenientMode": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "parallelism": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "maxTestRequestCombinations": { + "$ref": "#/$defs/SubstitutableInteger" + }, + "junitReportDir": { + "$ref": "#/$defs/SubstitutableString" + }, + "validateResponseValues": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "maxTestCount": { + "$ref": "#/$defs/SubstitutableInteger" + } + } + }, + "GeneralSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "disableTelemetry": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "ignoreInlineExamples": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "ignoreInlineExampleWarnings": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "prettyPrint": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "logging": { + "$ref": "#/$defs/LoggingSettings" + }, + "featureFlags": { + "$ref": "#/$defs/FeatureFlags" + }, + "specExamplesDirectoryTemplate": { + "$ref": "#/$defs/SubstitutableString" + }, + "sharedExamplesDirectoryTemplate": { + "$ref": "#/$defs/SubstitutableStringArray" + } + } + }, + "LoggingSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "level": { + "anyOf": [ + { + "type": "string", + "enum": [ + "DEBUG", + "INFO" + ] + }, + { + "$ref": "#/$defs/SubstitutableString" + } + ] + }, + "text": { + "$ref": "#/$defs/LogOutputSettings" + }, + "json": { + "$ref": "#/$defs/LogOutputSettings" + } + } + }, + "LogOutputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "directory": { + "$ref": "#/$defs/SubstitutableString" + }, + "console": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "logFilePrefix": { + "$ref": "#/$defs/SubstitutableString" + } + } + }, + "FeatureFlags": { + "type": "object", + "additionalProperties": false, + "properties": { + "fuzzyMatcherForPayloads": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "schemaExampleDefault": { + "$ref": "#/$defs/SubstitutableBoolean" + }, + "escapeSoapAction": { + "$ref": "#/$defs/SubstitutableBoolean" + } + } + } + } +} \ No newline at end of file diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index 027d5e23874..ad95091e364 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -1,575 +1,28 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://json.schemastore.org/specmatic.json", - "title": "Specmatic Configuration", - "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", - "type": "object", - "required": ["version", "contracts"], - "additionalProperties": false, - "properties": { - "version": { - "type": "integer", - "enum": [2], - "description": "Configuration version for Specmatic" - }, - "contracts": { - "type": "array", - "description": "Array of contract configurations", - "items": { - "$ref": "#/definitions/ContractConfig" - } - }, - "auth": { - "$ref": "#/definitions/Auth", - "description": "Authentication configuration" - }, - "pipeline": { - "$ref": "#/definitions/Pipeline", - "description": "Pipeline configuration for Azure DevOps" - }, - "environments": { - "type": "object", - "description": "Environment-specific configurations", - "additionalProperties": { - "$ref": "#/definitions/Environment" - } - }, - "hooks": { - "type": "object", - "description": "Custom hooks configuration", - "additionalProperties": { "type": "string" } - }, - "repository": { - "$ref": "#/definitions/RepositoryInfo", - "description": "Repository information" - }, - "report": { - "$ref": "#/definitions/ReportConfigurationDetails", - "description": "Report generation configuration" - }, - "security": { - "$ref": "#/definitions/SecurityConfiguration", - "description": "Security configuration for API testing" - }, - "test": { - "$ref": "#/definitions/TestConfiguration", - "description": "Test execution configuration" - }, - "stub": { - "$ref": "#/definitions/StubConfiguration", - "description": "Stub/mock server configuration" - }, - "virtualService": { - "$ref": "#/definitions/VirtualServiceConfiguration", - "description": "Virtual service configuration" - }, - "examples": { - "type": "array", - "description": "List of example file paths", - "items": { "type": "string" } - }, - "workflow": { - "$ref": "#/definitions/WorkflowConfiguration", - "description": "Workflow configuration for ID management" - }, - "ignoreInlineExamples": { - "type": ["boolean", "null"], - "description": "Whether to ignore inline examples in specifications" - }, - "additionalExampleParamsFilePath": { - "type": ["string", "null"], - "description": "Path to additional example parameters file" - }, - "attributeSelectionPattern": { - "$ref": "#/definitions/AttributeSelectionPattern", - "description": "Pattern for selecting attributes in responses" - }, - "allPatternsMandatory": { - "type": ["boolean", "null"], - "description": "Whether all patterns are mandatory" - }, - "defaultPatternValues": { - "type": "object", - "description": "Default values for patterns", - "additionalProperties": true - } - }, - "definitions": { - "ContractConfig": { - "type": "object", - "title": "ContractConfig", - "description": "Defines a contract source and its provides/consumes configuration.", - "additionalProperties": false, - "properties": { - "git": { - "type": "object", - "description": "Git contract source details.", - "additionalProperties": false, - "properties": { - "url": { - "type": ["string", "null"], - "description": "URL of the git repository." + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": ["version"], + "properties": { + "version": { + "type": "integer", + "default": 2 + } + }, + "allOf": [ + { + "if": { + "properties": { + "version": { + "const": 3 + } + } }, - "branch": { - "type": ["string", "null"], - "description": "Branch name in the git repository." + "then": { + "$ref": "specmatic-3.json" }, - "matchBranch": { - "type": "boolean" + "else": { + "$ref": "specmatic-2.json" } - }, - "required": [] - }, - "filesystem": { - "type": "object", - "description": "Filesystem contract source details.", - "additionalProperties": false, - "properties": { - "directory": { - "type": "string", - "description": "Directory path for contract files." - } - }, - "required": [] - }, - "provides": { - "type": "array", - "description": "List of specs provided for testing. Each entry can be a string or an object.", - "items": { - "oneOf": [ - { - "type": "string", - "description": "Path to a spec file." - }, - { - "type": "object", - "description": "Object describing provided specs and test configuration.", - "additionalProperties": false, - "properties": { - "specs": { - "type": "array", - "items": { "type": "string" }, - "description": "List of spec file paths." - }, - "baseUrl": { - "type": "string", - "description": "Test base URL." - }, - "host": { - "type": "string", - "description": "Host for the test base URL." - }, - "port": { - "type": "integer", - "description": "Port for the test base URL." - }, - "resiliencyTests": { - "type": "object", - "additionalProperties": false, - "description": "Resiliency test configuration.", - "properties": { - "enable": { - "type": "string", - "enum": ["all", "positiveOnly", "none"], - "description": "Resiliency test suite to enable." - } - }, - "required": [] - } - }, - "required": ["specs"] - } - ] - } - }, - "consumes": { - "type": "array", - "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", - "items": { - "oneOf": [ - { - "type": "string", - "description": "Path to a spec file." - }, - { - "type": "object", - "additionalProperties": false, - "description": "Object describing consumed specs and stub configuration.", - "properties": { - "specs": { - "type": "array", - "items": { "type": "string" }, - "description": "List of spec file paths." - }, - "baseUrl": { - "type": "string", - "description": "Full base URL for the stub." - }, - "host": { - "type": "string", - "description": "Host for the stub base URL." - }, - "port": { - "type": "integer", - "description": "Port for the stub base URL." - }, - "basePath": { - "type": "string", - "description": "Base path for the stub base URL." - } - }, - "required": ["specs"] - } - ] - } - } - }, - "required": [] - }, - "Auth": { - "type": "object", - "additionalProperties": false, - "description": "Authentication configuration", - "properties": { - "bearer-file": { - "type": "string", - "description": "Path to file containing bearer token" - }, - "bearer-environment-variable": { - "type": ["string", "null"], - "description": "Environment variable name containing bearer token" - } - } - }, - "Pipeline": { - "type": "object", - "additionalProperties": false, - "description": "Azure DevOps pipeline configuration", - "properties": { - "provider": { - "type": "string", - "enum": ["azure"], - "description": "Pipeline provider type" - }, - "organization": { - "type": "string", - "description": "Azure DevOps organization name" - }, - "project": { - "type": "string", - "description": "Azure DevOps project name" - }, - "definitionId": { - "type": "integer", - "description": "Pipeline definition ID" - } - } - }, - "Environment": { - "type": "object", - "additionalProperties": false, - "description": "Environment-specific configuration", - "properties": { - "baseurls": { - "type": ["object", "null"], - "description": "Base URLs for different services", - "additionalProperties": { "type": "string" } - }, - "variables": { - "type": ["object", "null"], - "description": "Environment variables", - "additionalProperties": { "type": "string" } - } - } - }, - "RepositoryInfo": { - "type": "object", - "additionalProperties": false, - "description": "Repository information", - "properties": { - "provider": { - "type": "string", - "description": "Repository provider type" - }, - "collectionName": { - "type": "string", - "description": "Name of the collection" - } - } - }, - "ReportConfigurationDetails": { - "type": "object", - "additionalProperties": false, - "description": "Report generation configuration", - "properties": { - "formatters": { - "type": ["array", "null"], - "description": "List of report formatters", - "items": { "$ref": "#/definitions/ReportFormatterDetails" }, - "deprecated": true - }, - "types": { "$ref": "#/definitions/ReportTypes" } - } - }, - "ReportFormatterDetails": { - "type": "object", - "additionalProperties": false, - "deprecated": true, - "description": "Configuration for a specific report formatter", - "properties": { - "type": { - "type": ["string", "null"], - "enum": ["text", "html", "ctrf"], - "description": "Type of report formatter" - }, - "layout": { - "type": ["string", "null"], - "enum": ["table"], - "description": "Layout style for the report" - }, - "lite": { - "type": ["boolean", "null"], - "description": "Whether to generate a lite version of the report" - }, - "title": { - "type": ["string", "null"], - "description": "Title for the report" - }, - "logo": { - "type": ["string", "null"], - "description": "Path to logo image for the report" - }, - "logoAltText": { - "type": ["string", "null"], - "description": "Alt text for the logo" - }, - "heading": { - "type": ["string", "null"], - "description": "Heading for the report" - }, - "outputDirectory": { - "type": ["string", "null"], - "description": "Directory to output the report" - } - } - }, - "ReportTypes": { - "type": "object", - "additionalProperties": false, - "description": "Configuration for different report types", - "properties": { - "APICoverage": { "$ref": "#/definitions/APICoverage" } - } - }, - "APICoverage": { - "type": "object", - "additionalProperties": false, - "description": "API coverage report configuration", - "properties": { - "OpenAPI": { "$ref": "#/definitions/APICoverageConfiguration" } - } - }, - "APICoverageConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "OpenAPI coverage configuration", - "properties": { - "successCriteria": { "$ref": "#/definitions/SuccessCriteria" }, - "excludedEndpoints": { - "type": ["array", "null"], - "description": "List of endpoints to exclude from coverage", - "items": { "type": "string" } - } - } - }, - "SuccessCriteria": { - "type": "object", - "additionalProperties": false, - "description": "Success criteria for API coverage", - "properties": { - "minThresholdPercentage": { - "type": ["integer", "null"], - "description": "Minimum coverage percentage threshold" - }, - "maxMissedEndpointsInSpec": { - "type": ["integer", "null"], - "description": "Maximum number of missed endpoints allowed" - }, - "enforce": { - "type": ["boolean", "null"], - "description": "Whether to enforce the success criteria" - } - } - }, - "SecurityConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "Security configuration", - "properties": { - "OpenAPI": { "$ref": "#/definitions/OpenAPISecurityConfiguration" } - } - }, - "OpenAPISecurityConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "OpenAPI security configuration", - "properties": { - "securitySchemes": { - "type": "object", - "description": "Security scheme configurations", - "additionalProperties": { - "$ref": "#/definitions/SecuritySchemeConfiguration" - } - } - } - }, - "SecuritySchemeConfiguration": { - "type": "object", - "description": "Configuration for a security scheme", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": ["oauth2", "basicAuth", "bearer", "apiKey"], - "description": "Type of security scheme" - }, - "token": { - "type": ["string", "null"], - "description": "Authentication token" - }, - "value": { - "type": ["string", "null"], - "description": "Authentication value" - } - } - }, - "TestConfiguration": { - "type": "object", - "description": "Test execution configuration", - "additionalProperties": false, - "properties": { - "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" }, - "validateResponseValues": { - "type": ["boolean", "null"], - "description": "Whether to validate response values" - }, - "allowExtensibleSchema": { - "type": ["boolean", "null"], - "description": "Whether to allow extensible schema validation" - }, - "timeoutInMilliseconds": { - "type": ["integer", "null"], - "description": "Test timeout in milliseconds" - }, - "strictMode": { - "type": ["boolean", "null"], - "description": "Whether to enable strict mode for contract testing" - } - } - }, - "ResiliencyTestsConfig": { - "type": "object", - "description": "Configuration for resiliency tests", - "additionalProperties": false, - "properties": { - "enable": { - "type": ["string", "null"], - "enum": ["all", "positiveOnly", "none"], - "description": "Level of resiliency tests to enable" - } - } - }, - "StubConfiguration": { - "type": "object", - "description": "Stub/mock server configuration", - "additionalProperties": false, - "properties": { - "generative": { - "type": ["boolean", "null"], - "description": "Whether to enable generative stubbing" - }, - "delayInMilliseconds": { - "type": ["integer", "null"], - "description": "Delay to add to stub responses in milliseconds" - }, - "dictionary": { - "type": ["string", "null"], - "description": "Path to dictionary file for generative stubbing" - }, - "includeMandatoryAndRequestedKeysInResponse": { - "type": ["boolean", "null"], - "description": "Whether to include mandatory and requested keys in response" - }, - "startTimeoutInMilliseconds": { - "type": ["integer", "null"], - "description": "Timeout for stub server startup in milliseconds" - }, - "hotReload": { - "type": ["string", "null"], - "description": "Hot reload configuration" - }, - "strictMode": { - "type": ["boolean", "null"], - "description": "Whether to enable strict mode for stubbing" - } - } - }, - "VirtualServiceConfiguration": { - "type": "object", - "description": "Virtual service configuration", - "additionalProperties": false, - "properties": { - "nonPatchableKeys": { - "type": "array", - "description": "List of keys that cannot be patched", - "items": { "type": "string" } - } - } - }, - "WorkflowConfiguration": { - "type": "object", - "description": "Workflow configuration for ID management", - "additionalProperties": false, - "properties": { - "ids": { - "type": "object", - "description": "ID operation configurations", - "additionalProperties": { - "$ref": "#/definitions/WorkflowIDOperation" - } - } - } - }, - "WorkflowIDOperation": { - "type": "object", - "description": "Configuration for ID operations in workflow", - "additionalProperties": false, - "properties": { - "extract": { - "type": ["string", "null"], - "description": "JSONPath expression to extract ID" - }, - "use": { - "type": ["string", "null"], - "description": "JSONPath expression to use extracted ID" - } - } - }, - "AttributeSelectionPattern": { - "type": "object", - "additionalProperties": false, - "description": "Pattern for selecting attributes in API responses", - "properties": { - "default_fields": { - "type": ["array", "null"], - "description": "Default fields to include", - "items": { "type": "string" } - }, - "query_param_key": { - "type": ["string", "null"], - "description": "Query parameter key for field selection" } - } - } - } -} + ] +} \ No newline at end of file From bd633181fc0dfb9100410f3fc698f40883ff4d1c Mon Sep 17 00:00:00 2001 From: Ketan Padegaonkar Date: Tue, 10 Feb 2026 17:37:34 +0530 Subject: [PATCH 03/13] chore: update provides/consumes for v3 --- src/schemas/json/specmatic-2.json | 183 +++++++++++++++++------------- 1 file changed, 106 insertions(+), 77 deletions(-) diff --git a/src/schemas/json/specmatic-2.json b/src/schemas/json/specmatic-2.json index 027d5e23874..9c7057eb2f3 100644 --- a/src/schemas/json/specmatic-2.json +++ b/src/schemas/json/specmatic-2.json @@ -133,93 +133,26 @@ "required": [] }, "provides": { - "type": "array", + "type": ["array", "null"], "description": "List of specs provided for testing. Each entry can be a string or an object.", "items": { "oneOf": [ - { - "type": "string", - "description": "Path to a spec file." - }, - { - "type": "object", - "description": "Object describing provided specs and test configuration.", - "additionalProperties": false, - "properties": { - "specs": { - "type": "array", - "items": { "type": "string" }, - "description": "List of spec file paths." - }, - "baseUrl": { - "type": "string", - "description": "Test base URL." - }, - "host": { - "type": "string", - "description": "Host for the test base URL." - }, - "port": { - "type": "integer", - "description": "Port for the test base URL." - }, - "resiliencyTests": { - "type": "object", - "additionalProperties": false, - "description": "Resiliency test configuration.", - "properties": { - "enable": { - "type": "string", - "enum": ["all", "positiveOnly", "none"], - "description": "Resiliency test suite to enable." - } - }, - "required": [] - } - }, - "required": ["specs"] - } + { "$ref": "#/definitions/StringValue" }, + { "$ref": "#/definitions/ObjectValueFullUrl" }, + { "$ref": "#/definitions/ObjectValuePartialUrl" }, + { "$ref": "#/definitions/ConfigValue" } ] } }, "consumes": { - "type": "array", + "type": ["array", "null"], "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", "items": { "oneOf": [ - { - "type": "string", - "description": "Path to a spec file." - }, - { - "type": "object", - "additionalProperties": false, - "description": "Object describing consumed specs and stub configuration.", - "properties": { - "specs": { - "type": "array", - "items": { "type": "string" }, - "description": "List of spec file paths." - }, - "baseUrl": { - "type": "string", - "description": "Full base URL for the stub." - }, - "host": { - "type": "string", - "description": "Host for the stub base URL." - }, - "port": { - "type": "integer", - "description": "Port for the stub base URL." - }, - "basePath": { - "type": "string", - "description": "Base path for the stub base URL." - } - }, - "required": ["specs"] - } + { "$ref": "#/definitions/StringValue" }, + { "$ref": "#/definitions/ObjectValueFullUrl" }, + { "$ref": "#/definitions/ObjectValuePartialUrl" }, + { "$ref": "#/definitions/ConfigValue" } ] } } @@ -479,6 +412,7 @@ } } }, + "StubConfiguration": { "type": "object", "description": "Stub/mock server configuration", @@ -570,6 +504,101 @@ "description": "Query parameter key for field selection" } } + }, + + "SpecsArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1 + }, + + "StringValue": { + "type": "string", + "description": "A single spec path." + }, + + "ObjectValueFullUrl": { + "type": "object", + "additionalProperties": false, + "required": ["baseUrl", "specs"], + "properties": { + "baseUrl": { "type": "string" }, + "specs": { "$ref": "#/definitions/SpecsArray" }, + "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" } + } + }, + + "ObjectValuePartialUrl": { + "type": "object", + "additionalProperties": false, + "required": ["specs"], + "properties": { + "host": { "type": "string" }, + "port": { "type": "integer" }, + "basePath": { "type": "string" }, + "specs": { "$ref": "#/definitions/SpecsArray" }, + "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" } + }, + "anyOf": [ + { "required": ["host"] }, + { "required": ["port"] }, + { "required": ["basePath"] } + ], + "not": { + "anyOf": [{ "required": ["baseUrl"] }] + } + }, + + "ConfigValue": { + "type": "object", + "additionalProperties": false, + "required": ["specs", "specType", "config"], + "properties": { + "specs": { "$ref": "#/definitions/SpecsArray" }, + "specType": { "type": "string" }, + "config": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { "type": "string" }, + { "type": "integer" }, + { "type": "number" }, + { "type": "boolean" }, + { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + } + ] + } + } + } + }, + + "ConfigValueScalarOrComposite": { + "oneOf": [ + { "type": "string" }, + { "type": "integer" }, + { "type": "number" }, + { "type": "boolean" }, + { + "type": "array", + "items": { "$ref": "#/definitions/ConfigValueScalarOrComposite" } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + } + ] } } } From f69eb2ad599877c15262cce155ecb73a4de42bb0 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 00:56:38 +0530 Subject: [PATCH 04/13] Updated specmatic.yaml jsonschema with version 3 --- src/schemas/json/specmatic-2.json | 604 ------- src/schemas/json/specmatic-3.json | 1823 ------------------- src/schemas/json/specmatic.json | 2699 ++++++++++++++++++++++++++++- src/test/specmatic/specmatic.json | 2 +- 4 files changed, 2695 insertions(+), 2433 deletions(-) delete mode 100644 src/schemas/json/specmatic-2.json delete mode 100644 src/schemas/json/specmatic-3.json diff --git a/src/schemas/json/specmatic-2.json b/src/schemas/json/specmatic-2.json deleted file mode 100644 index 9c7057eb2f3..00000000000 --- a/src/schemas/json/specmatic-2.json +++ /dev/null @@ -1,604 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://json.schemastore.org/specmatic.json", - "title": "Specmatic Configuration", - "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", - "type": "object", - "required": ["version", "contracts"], - "additionalProperties": false, - "properties": { - "version": { - "type": "integer", - "enum": [2], - "description": "Configuration version for Specmatic" - }, - "contracts": { - "type": "array", - "description": "Array of contract configurations", - "items": { - "$ref": "#/definitions/ContractConfig" - } - }, - "auth": { - "$ref": "#/definitions/Auth", - "description": "Authentication configuration" - }, - "pipeline": { - "$ref": "#/definitions/Pipeline", - "description": "Pipeline configuration for Azure DevOps" - }, - "environments": { - "type": "object", - "description": "Environment-specific configurations", - "additionalProperties": { - "$ref": "#/definitions/Environment" - } - }, - "hooks": { - "type": "object", - "description": "Custom hooks configuration", - "additionalProperties": { "type": "string" } - }, - "repository": { - "$ref": "#/definitions/RepositoryInfo", - "description": "Repository information" - }, - "report": { - "$ref": "#/definitions/ReportConfigurationDetails", - "description": "Report generation configuration" - }, - "security": { - "$ref": "#/definitions/SecurityConfiguration", - "description": "Security configuration for API testing" - }, - "test": { - "$ref": "#/definitions/TestConfiguration", - "description": "Test execution configuration" - }, - "stub": { - "$ref": "#/definitions/StubConfiguration", - "description": "Stub/mock server configuration" - }, - "virtualService": { - "$ref": "#/definitions/VirtualServiceConfiguration", - "description": "Virtual service configuration" - }, - "examples": { - "type": "array", - "description": "List of example file paths", - "items": { "type": "string" } - }, - "workflow": { - "$ref": "#/definitions/WorkflowConfiguration", - "description": "Workflow configuration for ID management" - }, - "ignoreInlineExamples": { - "type": ["boolean", "null"], - "description": "Whether to ignore inline examples in specifications" - }, - "additionalExampleParamsFilePath": { - "type": ["string", "null"], - "description": "Path to additional example parameters file" - }, - "attributeSelectionPattern": { - "$ref": "#/definitions/AttributeSelectionPattern", - "description": "Pattern for selecting attributes in responses" - }, - "allPatternsMandatory": { - "type": ["boolean", "null"], - "description": "Whether all patterns are mandatory" - }, - "defaultPatternValues": { - "type": "object", - "description": "Default values for patterns", - "additionalProperties": true - } - }, - "definitions": { - "ContractConfig": { - "type": "object", - "title": "ContractConfig", - "description": "Defines a contract source and its provides/consumes configuration.", - "additionalProperties": false, - "properties": { - "git": { - "type": "object", - "description": "Git contract source details.", - "additionalProperties": false, - "properties": { - "url": { - "type": ["string", "null"], - "description": "URL of the git repository." - }, - "branch": { - "type": ["string", "null"], - "description": "Branch name in the git repository." - }, - "matchBranch": { - "type": "boolean" - } - }, - "required": [] - }, - "filesystem": { - "type": "object", - "description": "Filesystem contract source details.", - "additionalProperties": false, - "properties": { - "directory": { - "type": "string", - "description": "Directory path for contract files." - } - }, - "required": [] - }, - "provides": { - "type": ["array", "null"], - "description": "List of specs provided for testing. Each entry can be a string or an object.", - "items": { - "oneOf": [ - { "$ref": "#/definitions/StringValue" }, - { "$ref": "#/definitions/ObjectValueFullUrl" }, - { "$ref": "#/definitions/ObjectValuePartialUrl" }, - { "$ref": "#/definitions/ConfigValue" } - ] - } - }, - "consumes": { - "type": ["array", "null"], - "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", - "items": { - "oneOf": [ - { "$ref": "#/definitions/StringValue" }, - { "$ref": "#/definitions/ObjectValueFullUrl" }, - { "$ref": "#/definitions/ObjectValuePartialUrl" }, - { "$ref": "#/definitions/ConfigValue" } - ] - } - } - }, - "required": [] - }, - "Auth": { - "type": "object", - "additionalProperties": false, - "description": "Authentication configuration", - "properties": { - "bearer-file": { - "type": "string", - "description": "Path to file containing bearer token" - }, - "bearer-environment-variable": { - "type": ["string", "null"], - "description": "Environment variable name containing bearer token" - } - } - }, - "Pipeline": { - "type": "object", - "additionalProperties": false, - "description": "Azure DevOps pipeline configuration", - "properties": { - "provider": { - "type": "string", - "enum": ["azure"], - "description": "Pipeline provider type" - }, - "organization": { - "type": "string", - "description": "Azure DevOps organization name" - }, - "project": { - "type": "string", - "description": "Azure DevOps project name" - }, - "definitionId": { - "type": "integer", - "description": "Pipeline definition ID" - } - } - }, - "Environment": { - "type": "object", - "additionalProperties": false, - "description": "Environment-specific configuration", - "properties": { - "baseurls": { - "type": ["object", "null"], - "description": "Base URLs for different services", - "additionalProperties": { "type": "string" } - }, - "variables": { - "type": ["object", "null"], - "description": "Environment variables", - "additionalProperties": { "type": "string" } - } - } - }, - "RepositoryInfo": { - "type": "object", - "additionalProperties": false, - "description": "Repository information", - "properties": { - "provider": { - "type": "string", - "description": "Repository provider type" - }, - "collectionName": { - "type": "string", - "description": "Name of the collection" - } - } - }, - "ReportConfigurationDetails": { - "type": "object", - "additionalProperties": false, - "description": "Report generation configuration", - "properties": { - "formatters": { - "type": ["array", "null"], - "description": "List of report formatters", - "items": { "$ref": "#/definitions/ReportFormatterDetails" }, - "deprecated": true - }, - "types": { "$ref": "#/definitions/ReportTypes" } - } - }, - "ReportFormatterDetails": { - "type": "object", - "additionalProperties": false, - "deprecated": true, - "description": "Configuration for a specific report formatter", - "properties": { - "type": { - "type": ["string", "null"], - "enum": ["text", "html", "ctrf"], - "description": "Type of report formatter" - }, - "layout": { - "type": ["string", "null"], - "enum": ["table"], - "description": "Layout style for the report" - }, - "lite": { - "type": ["boolean", "null"], - "description": "Whether to generate a lite version of the report" - }, - "title": { - "type": ["string", "null"], - "description": "Title for the report" - }, - "logo": { - "type": ["string", "null"], - "description": "Path to logo image for the report" - }, - "logoAltText": { - "type": ["string", "null"], - "description": "Alt text for the logo" - }, - "heading": { - "type": ["string", "null"], - "description": "Heading for the report" - }, - "outputDirectory": { - "type": ["string", "null"], - "description": "Directory to output the report" - } - } - }, - "ReportTypes": { - "type": "object", - "additionalProperties": false, - "description": "Configuration for different report types", - "properties": { - "APICoverage": { "$ref": "#/definitions/APICoverage" } - } - }, - "APICoverage": { - "type": "object", - "additionalProperties": false, - "description": "API coverage report configuration", - "properties": { - "OpenAPI": { "$ref": "#/definitions/APICoverageConfiguration" } - } - }, - "APICoverageConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "OpenAPI coverage configuration", - "properties": { - "successCriteria": { "$ref": "#/definitions/SuccessCriteria" }, - "excludedEndpoints": { - "type": ["array", "null"], - "description": "List of endpoints to exclude from coverage", - "items": { "type": "string" } - } - } - }, - "SuccessCriteria": { - "type": "object", - "additionalProperties": false, - "description": "Success criteria for API coverage", - "properties": { - "minThresholdPercentage": { - "type": ["integer", "null"], - "description": "Minimum coverage percentage threshold" - }, - "maxMissedEndpointsInSpec": { - "type": ["integer", "null"], - "description": "Maximum number of missed endpoints allowed" - }, - "enforce": { - "type": ["boolean", "null"], - "description": "Whether to enforce the success criteria" - } - } - }, - "SecurityConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "Security configuration", - "properties": { - "OpenAPI": { "$ref": "#/definitions/OpenAPISecurityConfiguration" } - } - }, - "OpenAPISecurityConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "OpenAPI security configuration", - "properties": { - "securitySchemes": { - "type": "object", - "description": "Security scheme configurations", - "additionalProperties": { - "$ref": "#/definitions/SecuritySchemeConfiguration" - } - } - } - }, - "SecuritySchemeConfiguration": { - "type": "object", - "description": "Configuration for a security scheme", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": ["oauth2", "basicAuth", "bearer", "apiKey"], - "description": "Type of security scheme" - }, - "token": { - "type": ["string", "null"], - "description": "Authentication token" - }, - "value": { - "type": ["string", "null"], - "description": "Authentication value" - } - } - }, - "TestConfiguration": { - "type": "object", - "description": "Test execution configuration", - "additionalProperties": false, - "properties": { - "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" }, - "validateResponseValues": { - "type": ["boolean", "null"], - "description": "Whether to validate response values" - }, - "allowExtensibleSchema": { - "type": ["boolean", "null"], - "description": "Whether to allow extensible schema validation" - }, - "timeoutInMilliseconds": { - "type": ["integer", "null"], - "description": "Test timeout in milliseconds" - }, - "strictMode": { - "type": ["boolean", "null"], - "description": "Whether to enable strict mode for contract testing" - } - } - }, - "ResiliencyTestsConfig": { - "type": "object", - "description": "Configuration for resiliency tests", - "additionalProperties": false, - "properties": { - "enable": { - "type": ["string", "null"], - "enum": ["all", "positiveOnly", "none"], - "description": "Level of resiliency tests to enable" - } - } - }, - - "StubConfiguration": { - "type": "object", - "description": "Stub/mock server configuration", - "additionalProperties": false, - "properties": { - "generative": { - "type": ["boolean", "null"], - "description": "Whether to enable generative stubbing" - }, - "delayInMilliseconds": { - "type": ["integer", "null"], - "description": "Delay to add to stub responses in milliseconds" - }, - "dictionary": { - "type": ["string", "null"], - "description": "Path to dictionary file for generative stubbing" - }, - "includeMandatoryAndRequestedKeysInResponse": { - "type": ["boolean", "null"], - "description": "Whether to include mandatory and requested keys in response" - }, - "startTimeoutInMilliseconds": { - "type": ["integer", "null"], - "description": "Timeout for stub server startup in milliseconds" - }, - "hotReload": { - "type": ["string", "null"], - "description": "Hot reload configuration" - }, - "strictMode": { - "type": ["boolean", "null"], - "description": "Whether to enable strict mode for stubbing" - } - } - }, - "VirtualServiceConfiguration": { - "type": "object", - "description": "Virtual service configuration", - "additionalProperties": false, - "properties": { - "nonPatchableKeys": { - "type": "array", - "description": "List of keys that cannot be patched", - "items": { "type": "string" } - } - } - }, - "WorkflowConfiguration": { - "type": "object", - "description": "Workflow configuration for ID management", - "additionalProperties": false, - "properties": { - "ids": { - "type": "object", - "description": "ID operation configurations", - "additionalProperties": { - "$ref": "#/definitions/WorkflowIDOperation" - } - } - } - }, - "WorkflowIDOperation": { - "type": "object", - "description": "Configuration for ID operations in workflow", - "additionalProperties": false, - "properties": { - "extract": { - "type": ["string", "null"], - "description": "JSONPath expression to extract ID" - }, - "use": { - "type": ["string", "null"], - "description": "JSONPath expression to use extracted ID" - } - } - }, - "AttributeSelectionPattern": { - "type": "object", - "additionalProperties": false, - "description": "Pattern for selecting attributes in API responses", - "properties": { - "default_fields": { - "type": ["array", "null"], - "description": "Default fields to include", - "items": { "type": "string" } - }, - "query_param_key": { - "type": ["string", "null"], - "description": "Query parameter key for field selection" - } - } - }, - - "SpecsArray": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1 - }, - - "StringValue": { - "type": "string", - "description": "A single spec path." - }, - - "ObjectValueFullUrl": { - "type": "object", - "additionalProperties": false, - "required": ["baseUrl", "specs"], - "properties": { - "baseUrl": { "type": "string" }, - "specs": { "$ref": "#/definitions/SpecsArray" }, - "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" } - } - }, - - "ObjectValuePartialUrl": { - "type": "object", - "additionalProperties": false, - "required": ["specs"], - "properties": { - "host": { "type": "string" }, - "port": { "type": "integer" }, - "basePath": { "type": "string" }, - "specs": { "$ref": "#/definitions/SpecsArray" }, - "resiliencyTests": { "$ref": "#/definitions/ResiliencyTestsConfig" } - }, - "anyOf": [ - { "required": ["host"] }, - { "required": ["port"] }, - { "required": ["basePath"] } - ], - "not": { - "anyOf": [{ "required": ["baseUrl"] }] - } - }, - - "ConfigValue": { - "type": "object", - "additionalProperties": false, - "required": ["specs", "specType", "config"], - "properties": { - "specs": { "$ref": "#/definitions/SpecsArray" }, - "specType": { "type": "string" }, - "config": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { "type": "string" }, - { "type": "integer" }, - { "type": "number" }, - { "type": "boolean" }, - { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - } - ] - } - } - } - }, - - "ConfigValueScalarOrComposite": { - "oneOf": [ - { "type": "string" }, - { "type": "integer" }, - { "type": "number" }, - { "type": "boolean" }, - { - "type": "array", - "items": { "$ref": "#/definitions/ConfigValueScalarOrComposite" } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - } - ] - } - } -} diff --git a/src/schemas/json/specmatic-3.json b/src/schemas/json/specmatic-3.json deleted file mode 100644 index 66da9d39db1..00000000000 --- a/src/schemas/json/specmatic-3.json +++ /dev/null @@ -1,1823 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://json.schemastore.org/specmatic.json", - "title": "Specmatic Configuration", - "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", - "type": "object", - "required": [ - "version" - ], - "additionalProperties": false, - "properties": { - "version": { - "type": "integer", - "enum": [ - 3 - ] - }, - "systemUnderTest": { - "$ref": "#/$defs/TestRuntimeServiceDefinition" - }, - "dependencies": { - "$ref": "#/$defs/DependenciesDefinition" - }, - "proxies": { - "$ref": "#/$defs/ProxyDefinitionsArray" - }, - "mcp": { - "$ref": "#/$defs/McpDefinition" - }, - "specmatic": { - "$ref": "#/$defs/SpecmaticDefinition" - }, - "components": { - "type": "object", - "additionalProperties": false, - "properties": { - "sources": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/SourceSchema" - } - }, - "services": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/StaticServiceDefinition" - } - }, - "runOptions": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/RunOptions" - } - }, - "examples": { - "$ref": "#/$defs/ExamplesConfiguration" - }, - "dictionaries": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/DictionaryConfiguration" - } - }, - "adapters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/AdapterConfiguration" - } - }, - "certificates": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/CertConfiguration" - } - }, - "settings": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/$defs/ConcreteSettings" - }, - { - "$ref": "#/$defs/ModeSpecificSettings" - } - ] - } - } - } - } - }, - "$defs": { - "SubstitutionExpression": { - "type": "string", - "pattern": "^\\$\\{[^}]+\\}$" - }, - "GuardedSubstitutionString": { - "type": "string", - "allOf": [ - { - "if": { - "pattern": "^\\$\\{" - }, - "then": { - "$ref": "#/$defs/SubstitutionExpression" - } - } - ] - }, - "SubstitutableString": { - "$ref": "#/$defs/GuardedSubstitutionString" - }, - "SubstitutableStringArray": { - "type": "array", - "items": { - "$ref": "#/$defs/SubstitutableString" - } - }, - "SubstitutableInteger": { - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/GuardedSubstitutionString" - } - ] - }, - "SubstitutableFloat": { - "oneOf": [ - { - "type": "number" - }, - { - "$ref": "#/$defs/GuardedSubstitutionString" - } - ] - }, - "SubstitutableBoolean": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/$defs/GuardedSubstitutionString" - } - ] - }, - "SubstitutableStringOrArray": { - "oneOf": [ - { - "$ref": "#/$defs/SubstitutableString" - }, - { - "$ref": "#/$defs/SubstitutableStringArray" - } - ] - }, - "Reference": { - "type": "object", - "additionalProperties": true, - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - } - } - }, - "DependenciesDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "services": { - "$ref": "#/$defs/RuntimeServiceDefinitionOrRefArray" - }, - "data": { - "$ref": "#/$defs/DataDefinition" - }, - "settings": { - "$ref": "#/$defs/MockSettingsOrRef" - } - } - }, - "RuntimeServiceDefinitionOrRefArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "service" - ], - "properties": { - "service": { - "$ref": "#/$defs/MockRuntimeServiceDefinitionOrRef" - } - } - } - }, - "MockRuntimeServiceDefinitionOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/MockRuntimeServiceDefinition" - } - }, - "MockRuntimeServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "service": { - "type": "object", - "additionalProperties": false, - "required": [ - "definitions" - ], - "properties": { - "description": { - "type": "string" - }, - "definitions": { - "$ref": "#/$defs/SpecificationStaticDefinitionArray" - }, - "runOptions": { - "$ref": "#/$defs/MockRunOptionsOrRef" - }, - "data": { - "$ref": "#/$defs/DataDefinition" - }, - "settings": { - "$ref": "#/$defs/MockSettingsOrRef" - } - } - } - } - }, - "TestRuntimeServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "service": { - "$ref": "#/$defs/TestServiceDefinitionOrRef" - } - } - }, - "TestServiceDefinitionOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/TestRuntimeServiceDefinition" - } - }, - "TestServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "description": { - "type": "string" - }, - "definitions": { - "$ref": "#/$defs/SpecificationStaticDefinitionArray" - }, - "runOptions": { - "$ref": "#/$defs/TestRunOptionsOrRef" - }, - "data": { - "$ref": "#/$defs/DataDefinition" - }, - "settings": { - "$ref": "#/$defs/TestSettingsOrRef" - } - } - }, - "DataDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "examples": { - "$ref": "#/$defs/ArrayExampleConfigurationOrRef" - }, - "dictionary": { - "$ref": "#/$defs/DictionaryConfigurationOrRef" - }, - "adapters": { - "$ref": "#/$defs/AdapterConfigurationOrRef" - } - } - }, - "ProxyDefinitionsArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "proxy" - ], - "properties": { - "proxy": { - "$ref": "#/$defs/ProxyDefinition" - } - } - } - }, - "ProxyDefinition": { - "type": "object", - "additionalProperties": false, - "required": [ - "target" - ], - "properties": { - "target": { - "$ref": "#/$defs/SubstitutableString" - }, - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "timeoutInMilliseconds": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "adapters": { - "$ref": "#/$defs/AdapterConfigurationOrRef" - }, - "mock": { - "$ref": "#/$defs/SubstitutableStringOrArray" - }, - "cert": { - "$ref": "#/$defs/CertConfigurationOrRef" - }, - "recordingsDirectory": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "McpDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "test": { - "$ref": "#/$defs/McpTestRunOptions" - } - } - }, - "McpTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "transportKind": { - "anyOf": [ - { - "type": "string", - "enum": [ - "STREAMABLE_HTTP" - ] - }, - { - "$ref": "#/$defs/SubstitutableString" - } - ] - }, - "enableResiliencyTests": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "dictionaryFile": { - "$ref": "#/$defs/SubstitutableString" - }, - "bearerToken": { - "$ref": "#/$defs/SubstitutableString" - }, - "filterTools": { - "$ref": "#/$defs/SubstitutableStringArray" - }, - "skipTools": { - "$ref": "#/$defs/SubstitutableStringArray" - } - } - }, - "SpecmaticDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "license": { - "$ref": "#/$defs/LicenseDefinition" - }, - "governance": { - "type": "object", - "additionalProperties": false, - "properties": { - "report": { - "$ref": "#/$defs/ReportsDefinition" - }, - "successCriteria": { - "$ref": "#/$defs/SuccessCriteriaDefinition" - } - } - }, - "settings": { - "$ref": "#/$defs/ConcreteSettingsOrRef" - } - } - }, - "LicenseDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "path": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "ReportsDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "formats": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "html", - "ctrf" - ] - } - }, - { - "$ref": "#/$defs/SubstitutableString" - } - ] - }, - "outputDirectory": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "SuccessCriteriaDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "minCoveragePercentage": { - "$ref": "#/$defs/SubstitutableFloat" - }, - "maxMissedOperationsInSpec": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "enforce": { - "$ref": "#/$defs/SubstitutableBoolean" - } - } - }, - "StaticServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "description": { - "type": "string" - }, - "definitions": { - "$ref": "#/$defs/SpecificationStaticDefinitionArray" - } - } - }, - "SpecificationStaticDefinitionArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "definition" - ], - "properties": { - "definition": { - "$ref": "#/$defs/SpecificationStaticDefinition" - } - } - } - }, - "SpecificationStaticDefinition": { - "type": "object", - "additionalProperties": false, - "required": [ - "source", - "specs" - ], - "properties": { - "source": { - "$ref": "#/$defs/SourceSchemaOrRef" - }, - "specs": { - "type": "array", - "items": { - "$ref": "#/$defs/SpecificationSchema" - } - } - } - }, - "SpecificationSchema": { - "oneOf": [ - { - "$ref": "#/$defs/SpecificationPath" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "spec": { - "$ref": "#/$defs/SpecificationObject" - } - } - } - ] - }, - "SpecificationPath": { - "type": "string" - }, - "SpecificationObject": { - "type": "object", - "additionalProperties": false, - "required": [ - "path" - ], - "properties": { - "id": { - "type": "string" - }, - "path": { - "type": "string" - }, - "urlPathPrefix": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "SourceSchemaOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/SourceSchema" - } - }, - "SourceSchema": { - "oneOf": [ - { - "$ref": "#/$defs/GitSourceSchema" - }, - { - "$ref": "#/$defs/FileSystemSourceSchema" - } - ] - }, - "GitSourceSchema": { - "type": "object", - "additionalProperties": false, - "required": [ - "git" - ], - "properties": { - "git": { - "$ref": "#/$defs/GitSourceOptions" - } - } - }, - "GitSourceOptions": { - "type": "object", - "additionalProperties": false, - "required": [ - "url" - ], - "properties": { - "url": { - "$ref": "#/$defs/SubstitutableString" - }, - "branch": { - "$ref": "#/$defs/SubstitutableString" - }, - "matchBranch": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "auth": { - "$ref": "#/$defs/GitSourceAuthentication" - } - } - }, - "GitSourceAuthentication": { - "oneOf": [ - { - "$ref": "#/$defs/GitSourceBearerFileAuthentication" - }, - { - "$ref": "#/$defs/GitSourceBearerEnvAuthentication" - }, - { - "$ref": "#/$defs/GitSourcePersonalAccessTokenAuthentication" - } - ] - }, - "GitSourceBearerFileAuthentication": { - "type": "object", - "additionalProperties": false, - "required": [ - "bearerFile" - ], - "properties": { - "bearerFile": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "GitSourceBearerEnvAuthentication": { - "type": "object", - "additionalProperties": false, - "required": [ - "bearerEnvironmentVariable" - ], - "properties": { - "bearerEnvironmentVariable": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "GitSourcePersonalAccessTokenAuthentication": { - "type": "object", - "additionalProperties": false, - "required": [ - "personalAccessToken" - ], - "properties": { - "personalAccessToken": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "FileSystemSourceSchema": { - "type": "object", - "additionalProperties": false, - "required": [ - "filesystem" - ], - "properties": { - "filesystem": { - "$ref": "#/$defs/FileSystemSourceOptions" - } - } - }, - "FileSystemSourceOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "directory": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "RunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "openapi": { - "$ref": "#/$defs/OpenApiRunOptions" - }, - "wsdl": { - "$ref": "#/$defs/WsdlRunOptions" - }, - "asyncapi": { - "$ref": "#/$defs/AsyncApiRunOptions" - }, - "graphqlsdl": { - "$ref": "#/$defs/GraphQLSdlRunOptions" - }, - "protobuf": { - "$ref": "#/$defs/ProtobufRunOptions" - } - } - }, - "TestRunOptionsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/TestRunOptions" - } - }, - "TestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "openapi": { - "$ref": "#/$defs/OpenApiTestRunOptions" - }, - "wsdl": { - "$ref": "#/$defs/WsdlTestRunOptions" - }, - "asyncapi": { - "$ref": "#/$defs/AsyncApiTestRunOptions" - }, - "graphqlsdl": { - "$ref": "#/$defs/GraphqlSdlTestRunOptions" - }, - "protobuf": { - "$ref": "#/$defs/ProtobufTestRunOptions" - } - } - }, - "MockRunOptionsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/MockRunOptions" - } - }, - "MockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "openapi": { - "$ref": "#/$defs/OpenApiMockRunOptions" - }, - "wsdl": { - "$ref": "#/$defs/WsdlMockRunOptions" - }, - "asyncapi": { - "$ref": "#/$defs/AsyncApiMockRunOptions" - }, - "graphqlsdl": { - "$ref": "#/$defs/GraphqlSdlMockRunOptions" - }, - "protobuf": { - "$ref": "#/$defs/ProtobufMockRunOptions" - } - } - }, - "OpenApiRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/$defs/OpenApiTestRunOptions" - }, - "else": { - "$ref": "#/$defs/OpenApiMockRunOptions" - } - }, - "AsyncApiRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/$defs/AsyncApiTestRunOptions" - }, - "else": { - "$ref": "#/$defs/AsyncApiMockRunOptions" - } - }, - "GraphQLSdlRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/$defs/GraphqlSdlTestRunOptions" - }, - "else": { - "$ref": "#/$defs/GraphqlSdlMockRunOptions" - } - }, - "ProtobufRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/$defs/ProtobufTestRunOptions" - }, - "else": { - "$ref": "#/$defs/ProtobufMockRunOptions" - } - }, - "WsdlRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/$defs/WsdlTestRunOptions" - }, - "else": { - "$ref": "#/$defs/WsdlMockRunOptions" - } - }, - "WsdlTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "WsdlMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "cert": { - "$ref": "#/$defs/CertConfigurationOrRef" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "AsyncApiTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "replyTimeout": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "subscriberReadinessWaitTimeout": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/AsyncApiServerDefinition" - } - }, - "schemaRegistry": { - "$ref": "#/$defs/AsyncApiSchemaRegistry" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "AsyncApiServerDefinition": { - "type": "object", - "additionalProperties": false, - "required": [ - "host", - "protocol" - ], - "properties": { - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "protocol": { - "$ref": "#/$defs/SubstitutableString" - }, - "adminCredentials": { - "$ref": "#/$defs/FreeFormObject" - }, - "client": { - "type": "object", - "additionalProperties": false, - "properties": { - "consumer": { - "$ref": "#/$defs/CertConfigurationOrRef" - }, - "producer": { - "$ref": "#/$defs/CertConfigurationOrRef" - } - } - } - } - }, - "AsyncApiMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/AsyncApiServerDefinition" - } - }, - "schemaRegistry": { - "$ref": "#/$defs/AsyncApiSchemaRegistry" - }, - "inMemoryBroker": { - "type": "object", - "additionalProperties": false, - "properties": { - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "logDir": { - "$ref": "#/$defs/SubstitutableString" - } - } - } - } - }, - "AsyncApiSchemaRegistry": { - "type": "object", - "additionalProperties": false, - "required": [ - "kind" - ], - "properties": { - "kind": { - "anyOf": [ - { - "type": "string", - "enum": [ - "CONFLUENT", - "DEFAULT" - ] - }, - { - "$ref": "#/$defs/SubstitutableString" - } - ] - }, - "url": { - "$ref": "#/$defs/SubstitutableString" - }, - "username": { - "$ref": "#/$defs/SubstitutableString" - }, - "password": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "GraphqlSdlTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "GraphqlSdlMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "ProtobufTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "importPaths": { - "$ref": "#/$defs/SubstitutableStringArray" - }, - "protocVersion": { - "$ref": "#/$defs/SubstitutableString" - }, - "requestTimeout": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "ProtobufMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "importPaths": { - "$ref": "#/$defs/SubstitutableStringArray" - }, - "protocVersion": { - "$ref": "#/$defs/SubstitutableString" - }, - "specs": { - "$ref": "#/$defs/SpecificationRuntimeDefinitionArray" - } - } - }, - "OpenApiTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "filter": { - "$ref": "#/$defs/SubstitutableString" - }, - "workflow": { - "$ref": "#/$defs/WorkflowConfiguration" - }, - "swaggerUiBaseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "swaggerUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "actuatorUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "specs": { - "$ref": "#/$defs/OpenApiSpecificationRuntimeDefinitionArray" - } - } - }, - "OpenApiMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "enum": [ - "mock", - "stateful-mock" - ] - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "filter": { - "$ref": "#/$defs/SubstitutableString" - }, - "logMode": { - "anyOf": [ - { - "type": "string", - "enum": [ - "ALL", - "REQUEST_RESPONSE" - ] - }, - { - "$ref": "#/$defs/SubstitutableString" - } - ] - }, - "logsDirPath": { - "$ref": "#/$defs/SubstitutableString" - }, - "cert": { - "$ref": "#/$defs/CertConfigurationOrRef" - }, - "specs": { - "$ref": "#/$defs/OpenApiSpecificationRuntimeDefinitionArray" - } - } - }, - "OpenApiSpecificationRuntimeDefinitionArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "spec" - ], - "properties": { - "spec": { - "$ref": "#/$defs/OpenApiSpecificationRuntimeDefinition" - } - } - } - }, - "SpecificationRuntimeDefinitionArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "spec" - ], - "properties": { - "spec": { - "$ref": "#/$defs/SpecificationRuntimeDefinition" - } - } - } - }, - "FreeFormObject": { - "type": "object", - "additionalProperties": { - "type": [ - "string", - "number", - "boolean", - "object", - "array", - "null" - ] - } - }, - "SpecificationRuntimeDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "overlayFilePath": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "OpenApiSpecificationRuntimeDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "host": { - "$ref": "#/$defs/SubstitutableString" - }, - "port": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/$defs/SubstitutableString" - }, - "overlayFilePath": { - "$ref": "#/$defs/SubstitutableString" - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/SecuritySchemeConfiguration" - } - } - } - }, - "SecuritySchemeConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "token" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2", - "basicAuth", - "bearer", - "apiKey" - ] - }, - "token": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "WorkflowConfiguration": { - "type": "object", - "additionalProperties": false, - "properties": { - "ids": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "extract": { - "$ref": "#/$defs/SubstitutableString" - }, - "use": { - "$ref": "#/$defs/SubstitutableString" - } - } - } - } - } - }, - "ExamplesConfiguration": { - "type": "object", - "additionalProperties": false, - "properties": { - "testExamples": { - "type": "array", - "items": { - "$ref": "#/$defs/BaseExampleConfigurationOrRef" - } - }, - "mockExamples": { - "type": "array", - "items": { - "$ref": "#/$defs/BaseExampleConfigurationOrRef" - } - }, - "commonExamples": { - "$ref": "#/$defs/BaseExampleConfiguration" - } - } - }, - "ArrayExampleConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/ArrayExampleConfiguration" - } - }, - "ArrayExampleConfiguration": { - "type": "array", - "items": { - "$ref": "#/$defs/BaseExampleConfigurationOrRef" - } - }, - "BaseExampleConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/BaseExampleConfiguration" - } - }, - "BaseExampleConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "directories" - ], - "properties": { - "directories": { - "$ref": "#/$defs/SubstitutableStringArray" - } - } - }, - "DictionaryConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/DictionaryConfiguration" - } - }, - "DictionaryConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "AdapterConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/AdapterConfiguration" - } - }, - "AdapterConfiguration": { - "type": "object", - "additionalProperties": false, - "properties": { - "pre_specmatic_request_processor": { - "$ref": "#/$defs/SubstitutableString" - }, - "post_specmatic_response_processor": { - "$ref": "#/$defs/SubstitutableString" - }, - "pre_specmatic_response_processor": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "CertConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/CertConfiguration" - } - }, - "CertConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "keyStore" - ], - "properties": { - "keyStore": { - "$ref": "#/$defs/KeyStoreConfiguration" - }, - "keyStorePassword": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "ConcreteSettingsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/ConcreteSettings" - } - }, - "ModeSpecificSettings": { - "type": "object", - "not": { - "anyOf": [ - { - "required": [ - "general" - ] - }, - { - "required": [ - "test" - ] - }, - { - "required": [ - "mock" - ] - }, - { - "required": [ - "proxy" - ] - }, - { - "required": [ - "backwardCompatibility" - ] - } - ] - }, - "anyOf": [ - { - "$ref": "#/$defs/TestSettings" - }, - { - "$ref": "#/$defs/MockSettings" - } - ] - }, - "ConcreteSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "general": { - "$ref": "#/$defs/GeneralSettings" - }, - "test": { - "$ref": "#/$defs/TestSettings" - }, - "mock": { - "$ref": "#/$defs/MockSettings" - }, - "proxy": { - "$ref": "#/$defs/ProxySettings" - }, - "backwardCompatibility": { - "$ref": "#/$defs/BackwardCompatibilitySettings" - } - } - }, - "KeyStoreConfiguration": { - "oneOf": [ - { - "$ref": "#/$defs/KeyStoreFileConfiguration" - }, - { - "$ref": "#/$defs/KeyStoreDirectoryConfiguration" - } - ] - }, - "KeyStoreFileConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "file" - ], - "properties": { - "file": { - "$ref": "#/$defs/SubstitutableString" - }, - "password": { - "$ref": "#/$defs/SubstitutableString" - }, - "alias": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "KeyStoreDirectoryConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "directory" - ], - "properties": { - "directory": { - "$ref": "#/$defs/SubstitutableString" - }, - "password": { - "$ref": "#/$defs/SubstitutableString" - }, - "alias": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "BackwardCompatibilitySettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "baseBranch": { - "$ref": "#/$defs/SubstitutableString" - }, - "targetPath": { - "$ref": "#/$defs/SubstitutableString" - }, - "repoDirectory": { - "$ref": "#/$defs/SubstitutableString" - }, - "strictMode": { - "$ref": "#/$defs/SubstitutableBoolean" - } - } - }, - "ProxySettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "recordRequests": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "ignoreHeaders": { - "$ref": "#/$defs/SubstitutableStringArray" - } - } - }, - "MockSettingsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/MockSettings" - } - }, - "MockSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "generative": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "delayInMilliseconds": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "startTimeoutInMilliseconds": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "hotReload": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "strictMode": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "lenientMode": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "gracefulRestartTimeoutInMilliseconds": { - "$ref": "#/$defs/SubstitutableInteger" - } - } - }, - "TestSettingsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/Reference" - }, - "else": { - "$ref": "#/$defs/TestSettings" - } - }, - "TestSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "schemaResiliencyTests": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "none", - "positiveOnly" - ] - }, - { - "$ref": "#/$defs/SubstitutableString" - } - ] - }, - "timeoutInMilliseconds": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "strictMode": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "lenientMode": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "parallelism": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "maxTestRequestCombinations": { - "$ref": "#/$defs/SubstitutableInteger" - }, - "junitReportDir": { - "$ref": "#/$defs/SubstitutableString" - }, - "validateResponseValues": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "maxTestCount": { - "$ref": "#/$defs/SubstitutableInteger" - } - } - }, - "GeneralSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "disableTelemetry": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "ignoreInlineExamples": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "ignoreInlineExampleWarnings": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "prettyPrint": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "logging": { - "$ref": "#/$defs/LoggingSettings" - }, - "featureFlags": { - "$ref": "#/$defs/FeatureFlags" - }, - "specExamplesDirectoryTemplate": { - "$ref": "#/$defs/SubstitutableString" - }, - "sharedExamplesDirectoryTemplate": { - "$ref": "#/$defs/SubstitutableStringArray" - } - } - }, - "LoggingSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "level": { - "anyOf": [ - { - "type": "string", - "enum": [ - "DEBUG", - "INFO" - ] - }, - { - "$ref": "#/$defs/SubstitutableString" - } - ] - }, - "text": { - "$ref": "#/$defs/LogOutputSettings" - }, - "json": { - "$ref": "#/$defs/LogOutputSettings" - } - } - }, - "LogOutputSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "directory": { - "$ref": "#/$defs/SubstitutableString" - }, - "console": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "logFilePrefix": { - "$ref": "#/$defs/SubstitutableString" - } - } - }, - "FeatureFlags": { - "type": "object", - "additionalProperties": false, - "properties": { - "fuzzyMatcherForPayloads": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "schemaExampleDefault": { - "$ref": "#/$defs/SubstitutableBoolean" - }, - "escapeSoapAction": { - "$ref": "#/$defs/SubstitutableBoolean" - } - } - } - } -} \ No newline at end of file diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index ad95091e364..fe3c297ca1d 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -1,7 +1,12 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/specmatic.json", + "title": "Specmatic Configuration", + "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", "type": "object", - "required": ["version"], + "required": [ + "version" + ], "properties": { "version": { "type": "integer", @@ -18,11 +23,2695 @@ } }, "then": { - "$ref": "specmatic-3.json" + "$ref": "#/definitions/ConfigV3" }, "else": { - "$ref": "specmatic-2.json" + "$ref": "#/definitions/ConfigV2" } } - ] + ], + "definitions": { + "ConfigV3": { + "type": "object", + "required": [ + "version" + ], + "additionalProperties": false, + "properties": { + "version": { + "type": "integer", + "enum": [ + 3 + ] + }, + "systemUnderTest": { + "$ref": "#/definitions/TestRuntimeServiceDefinition" + }, + "dependencies": { + "$ref": "#/definitions/DependenciesDefinition" + }, + "proxies": { + "$ref": "#/definitions/ProxyDefinitionsArray" + }, + "mcp": { + "$ref": "#/definitions/McpDefinition" + }, + "specmatic": { + "$ref": "#/definitions/SpecmaticDefinition" + }, + "components": { + "type": "object", + "additionalProperties": false, + "properties": { + "sources": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SourceSchema" + } + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/StaticServiceDefinition" + } + }, + "runOptions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/RunOptions" + } + }, + "examples": { + "$ref": "#/definitions/ExamplesConfiguration" + }, + "dictionaries": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DictionaryConfiguration" + } + }, + "adapters": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AdapterConfiguration" + } + }, + "certificates": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CertConfiguration" + } + }, + "settings": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/ConcreteSettings" + }, + { + "$ref": "#/definitions/ModeSpecificSettings" + } + ] + } + } + } + } + } + }, + "ConfigV2": { + "type": "object", + "required": [ + "version", + "contracts" + ], + "additionalProperties": false, + "properties": { + "version": { + "type": "integer", + "enum": [ + 2 + ], + "description": "Configuration version for Specmatic" + }, + "contracts": { + "type": "array", + "description": "Array of contract configurations", + "items": { + "$ref": "#/definitions/ContractConfig" + } + }, + "auth": { + "$ref": "#/definitions/Auth", + "description": "Authentication configuration" + }, + "pipeline": { + "$ref": "#/definitions/Pipeline", + "description": "Pipeline configuration for Azure DevOps" + }, + "environments": { + "type": "object", + "description": "Environment-specific configurations", + "additionalProperties": { + "$ref": "#/definitions/Environment" + } + }, + "hooks": { + "type": "object", + "description": "Custom hooks configuration", + "additionalProperties": { + "type": "string" + } + }, + "repository": { + "$ref": "#/definitions/RepositoryInfo", + "description": "Repository information" + }, + "report": { + "$ref": "#/definitions/ReportConfigurationDetails", + "description": "Report generation configuration" + }, + "security": { + "$ref": "#/definitions/SecurityConfiguration", + "description": "Security configuration for API testing" + }, + "test": { + "$ref": "#/definitions/TestConfiguration", + "description": "Test execution configuration" + }, + "stub": { + "$ref": "#/definitions/StubConfiguration", + "description": "Stub/mock server configuration" + }, + "virtualService": { + "$ref": "#/definitions/VirtualServiceConfiguration", + "description": "Virtual service configuration" + }, + "examples": { + "type": "array", + "description": "List of example file paths", + "items": { + "type": "string" + } + }, + "workflow": { + "$ref": "#/definitions/WorkflowConfiguration", + "description": "Workflow configuration for ID management" + }, + "ignoreInlineExamples": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to ignore inline examples in specifications" + }, + "additionalExampleParamsFilePath": { + "type": [ + "string", + "null" + ], + "description": "Path to additional example parameters file" + }, + "attributeSelectionPattern": { + "$ref": "#/definitions/AttributeSelectionPattern", + "description": "Pattern for selecting attributes in responses" + }, + "allPatternsMandatory": { + "type": [ + "boolean", + "null" + ], + "description": "Whether all patterns are mandatory" + }, + "defaultPatternValues": { + "type": "object", + "description": "Default values for patterns", + "additionalProperties": true + } + } + }, + "ContractConfig": { + "type": "object", + "title": "ContractConfig", + "description": "Defines a contract source and its provides/consumes configuration.", + "additionalProperties": false, + "properties": { + "git": { + "type": "object", + "description": "Git contract source details.", + "additionalProperties": false, + "properties": { + "url": { + "type": [ + "string", + "null" + ], + "description": "URL of the git repository." + }, + "branch": { + "type": [ + "string", + "null" + ], + "description": "Branch name in the git repository." + }, + "matchBranch": { + "type": "boolean" + } + }, + "required": [] + }, + "filesystem": { + "type": "object", + "description": "Filesystem contract source details.", + "additionalProperties": false, + "properties": { + "directory": { + "type": "string", + "description": "Directory path for contract files." + } + }, + "required": [] + }, + "provides": { + "type": [ + "array", + "null" + ], + "description": "List of specs provided for testing. Each entry can be a string or an object.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/StringValue" + }, + { + "$ref": "#/definitions/ObjectValueFullUrl" + }, + { + "$ref": "#/definitions/ObjectValuePartialUrl" + }, + { + "$ref": "#/definitions/ConfigValue" + } + ] + } + }, + "consumes": { + "type": [ + "array", + "null" + ], + "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/StringValue" + }, + { + "$ref": "#/definitions/ObjectValueFullUrl" + }, + { + "$ref": "#/definitions/ObjectValuePartialUrl" + }, + { + "$ref": "#/definitions/ConfigValue" + } + ] + } + } + }, + "required": [] + }, + "Auth": { + "type": "object", + "additionalProperties": false, + "description": "Authentication configuration", + "properties": { + "bearer-file": { + "type": "string", + "description": "Path to file containing bearer token" + }, + "bearer-environment-variable": { + "type": [ + "string", + "null" + ], + "description": "Environment variable name containing bearer token" + } + } + }, + "Pipeline": { + "type": "object", + "additionalProperties": false, + "description": "Azure DevOps pipeline configuration", + "properties": { + "provider": { + "type": "string", + "enum": [ + "azure" + ], + "description": "Pipeline provider type" + }, + "organization": { + "type": "string", + "description": "Azure DevOps organization name" + }, + "project": { + "type": "string", + "description": "Azure DevOps project name" + }, + "definitionId": { + "type": "integer", + "description": "Pipeline definition ID" + } + } + }, + "Environment": { + "type": "object", + "additionalProperties": false, + "description": "Environment-specific configuration", + "properties": { + "baseurls": { + "type": [ + "object", + "null" + ], + "description": "Base URLs for different services", + "additionalProperties": { + "type": "string" + } + }, + "variables": { + "type": [ + "object", + "null" + ], + "description": "Environment variables", + "additionalProperties": { + "type": "string" + } + } + } + }, + "RepositoryInfo": { + "type": "object", + "additionalProperties": false, + "description": "Repository information", + "properties": { + "provider": { + "type": "string", + "description": "Repository provider type" + }, + "collectionName": { + "type": "string", + "description": "Name of the collection" + } + } + }, + "ReportConfigurationDetails": { + "type": "object", + "additionalProperties": false, + "description": "Report generation configuration", + "properties": { + "formatters": { + "type": [ + "array", + "null" + ], + "description": "List of report formatters", + "items": { + "$ref": "#/definitions/ReportFormatterDetails" + }, + "deprecated": true + }, + "types": { + "$ref": "#/definitions/ReportTypes" + } + } + }, + "ReportFormatterDetails": { + "type": "object", + "additionalProperties": false, + "deprecated": true, + "description": "Configuration for a specific report formatter", + "properties": { + "type": { + "type": [ + "string", + "null" + ], + "enum": [ + "text", + "html", + "ctrf" + ], + "description": "Type of report formatter" + }, + "layout": { + "type": [ + "string", + "null" + ], + "enum": [ + "table" + ], + "description": "Layout style for the report" + }, + "lite": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to generate a lite version of the report" + }, + "title": { + "type": [ + "string", + "null" + ], + "description": "Title for the report" + }, + "logo": { + "type": [ + "string", + "null" + ], + "description": "Path to logo image for the report" + }, + "logoAltText": { + "type": [ + "string", + "null" + ], + "description": "Alt text for the logo" + }, + "heading": { + "type": [ + "string", + "null" + ], + "description": "Heading for the report" + }, + "outputDirectory": { + "type": [ + "string", + "null" + ], + "description": "Directory to output the report" + } + } + }, + "ReportTypes": { + "type": "object", + "additionalProperties": false, + "description": "Configuration for different report types", + "properties": { + "APICoverage": { + "$ref": "#/definitions/APICoverage" + } + } + }, + "APICoverage": { + "type": "object", + "additionalProperties": false, + "description": "API coverage report configuration", + "properties": { + "OpenAPI": { + "$ref": "#/definitions/APICoverageConfiguration" + } + } + }, + "APICoverageConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "OpenAPI coverage configuration", + "properties": { + "successCriteria": { + "$ref": "#/definitions/SuccessCriteria" + }, + "excludedEndpoints": { + "type": [ + "array", + "null" + ], + "description": "List of endpoints to exclude from coverage", + "items": { + "type": "string" + } + } + } + }, + "SuccessCriteria": { + "type": "object", + "additionalProperties": false, + "description": "Success criteria for API coverage", + "properties": { + "minThresholdPercentage": { + "type": [ + "integer", + "null" + ], + "description": "Minimum coverage percentage threshold" + }, + "maxMissedEndpointsInSpec": { + "type": [ + "integer", + "null" + ], + "description": "Maximum number of missed endpoints allowed" + }, + "enforce": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to enforce the success criteria" + } + } + }, + "SecurityConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "Security configuration", + "properties": { + "OpenAPI": { + "$ref": "#/definitions/OpenAPISecurityConfiguration" + } + } + }, + "OpenAPISecurityConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "OpenAPI security configuration", + "properties": { + "securitySchemes": { + "type": "object", + "description": "Security scheme configurations", + "additionalProperties": { + "$ref": "#/definitions/SecuritySchemeConfiguration" + } + } + } + }, + "SecuritySchemeConfiguration": { + "type": "object", + "description": "Configuration for a security scheme", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2", + "basicAuth", + "bearer", + "apiKey" + ], + "description": "Type of security scheme" + }, + "token": { + "type": [ + "string", + "null" + ], + "description": "Authentication token" + }, + "value": { + "type": [ + "string", + "null" + ], + "description": "Authentication value" + } + } + }, + "TestConfiguration": { + "type": "object", + "description": "Test execution configuration", + "additionalProperties": false, + "properties": { + "resiliencyTests": { + "$ref": "#/definitions/ResiliencyTestsConfig" + }, + "validateResponseValues": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to validate response values" + }, + "allowExtensibleSchema": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to allow extensible schema validation" + }, + "timeoutInMilliseconds": { + "type": [ + "integer", + "null" + ], + "description": "Test timeout in milliseconds" + }, + "strictMode": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to enable strict mode for contract testing" + } + } + }, + "ResiliencyTestsConfig": { + "type": "object", + "description": "Configuration for resiliency tests", + "additionalProperties": false, + "properties": { + "enable": { + "type": [ + "string", + "null" + ], + "enum": [ + "all", + "positiveOnly", + "none" + ], + "description": "Level of resiliency tests to enable" + } + } + }, + "StubConfiguration": { + "type": "object", + "description": "Stub/mock server configuration", + "additionalProperties": false, + "properties": { + "generative": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to enable generative stubbing" + }, + "delayInMilliseconds": { + "type": [ + "integer", + "null" + ], + "description": "Delay to add to stub responses in milliseconds" + }, + "dictionary": { + "type": [ + "string", + "null" + ], + "description": "Path to dictionary file for generative stubbing" + }, + "includeMandatoryAndRequestedKeysInResponse": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to include mandatory and requested keys in response" + }, + "startTimeoutInMilliseconds": { + "type": [ + "integer", + "null" + ], + "description": "Timeout for stub server startup in milliseconds" + }, + "hotReload": { + "type": [ + "string", + "null" + ], + "description": "Hot reload configuration" + }, + "strictMode": { + "type": [ + "boolean", + "null" + ], + "description": "Whether to enable strict mode for stubbing" + } + } + }, + "VirtualServiceConfiguration": { + "type": "object", + "description": "Virtual service configuration", + "additionalProperties": false, + "properties": { + "nonPatchableKeys": { + "type": "array", + "description": "List of keys that cannot be patched", + "items": { + "type": "string" + } + } + } + }, + "WorkflowConfiguration": { + "type": "object", + "description": "Workflow configuration for ID management", + "additionalProperties": false, + "properties": { + "ids": { + "type": "object", + "description": "ID operation configurations", + "additionalProperties": { + "$ref": "#/definitions/WorkflowIDOperation" + } + } + } + }, + "WorkflowIDOperation": { + "type": "object", + "description": "Configuration for ID operations in workflow", + "additionalProperties": false, + "properties": { + "extract": { + "type": [ + "string", + "null" + ], + "description": "JSONPath expression to extract ID" + }, + "use": { + "type": [ + "string", + "null" + ], + "description": "JSONPath expression to use extracted ID" + } + } + }, + "AttributeSelectionPattern": { + "type": "object", + "additionalProperties": false, + "description": "Pattern for selecting attributes in API responses", + "properties": { + "default_fields": { + "type": [ + "array", + "null" + ], + "description": "Default fields to include", + "items": { + "type": "string" + } + }, + "query_param_key": { + "type": [ + "string", + "null" + ], + "description": "Query parameter key for field selection" + } + } + }, + "SpecsArray": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "StringValue": { + "type": "string", + "description": "A single spec path." + }, + "ObjectValueFullUrl": { + "type": "object", + "additionalProperties": false, + "required": [ + "baseUrl", + "specs" + ], + "properties": { + "baseUrl": { + "type": "string" + }, + "specs": { + "$ref": "#/definitions/SpecsArray" + }, + "resiliencyTests": { + "$ref": "#/definitions/ResiliencyTestsConfig" + } + } + }, + "ObjectValuePartialUrl": { + "type": "object", + "required": [ + "specs" + ], + "anyOf": [ + { + "required": ["host"], + "properties": { + "host": { + "type": "string" + } + } + }, + { + "required": ["port"], + "properties": { + "port": { + "type": "integer" + } + } + } + ], + "properties": { + "specs": { + "$ref": "#/definitions/SpecsArray" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "basePath": { + "type": "string" + }, + "resiliencyTests": { + "$ref": "#/definitions/ResiliencyTestsConfig" + } + } + }, + "ConfigValue": { + "type": "object", + "additionalProperties": false, + "required": [ + "specs", + "specType", + "config" + ], + "properties": { + "specs": { + "$ref": "#/definitions/SpecsArray" + }, + "specType": { + "type": "string" + }, + "config": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + } + ] + } + } + } + }, + "ConfigValueScalarOrComposite": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + } + ] + }, + "SubstitutionExpression": { + "type": "string", + "pattern": "^\\$\\{[^}]+\\}$" + }, + "GuardedSubstitutionString": { + "type": "string", + "allOf": [ + { + "if": { + "pattern": "^\\$\\{" + }, + "then": { + "$ref": "#/definitions/SubstitutionExpression" + } + } + ] + }, + "SubstitutableString": { + "$ref": "#/definitions/GuardedSubstitutionString" + }, + "SubstitutableStringArray": { + "type": "array", + "items": { + "$ref": "#/definitions/SubstitutableString" + } + }, + "SubstitutableInteger": { + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/definitions/GuardedSubstitutionString" + } + ] + }, + "SubstitutableFloat": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/GuardedSubstitutionString" + } + ] + }, + "SubstitutableBoolean": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/GuardedSubstitutionString" + } + ] + }, + "SubstitutableStringOrArray": { + "oneOf": [ + { + "$ref": "#/definitions/SubstitutableString" + }, + { + "$ref": "#/definitions/SubstitutableStringArray" + } + ] + }, + "Reference": { + "type": "object", + "additionalProperties": true, + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + } + } + }, + "DependenciesDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "services": { + "$ref": "#/definitions/RuntimeServiceDefinitionOrRefArray" + }, + "data": { + "$ref": "#/definitions/DataDefinition" + }, + "settings": { + "$ref": "#/definitions/MockSettingsOrRef" + } + } + }, + "RuntimeServiceDefinitionOrRefArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "service" + ], + "properties": { + "service": { + "$ref": "#/definitions/MockRuntimeServiceDefinitionOrRef" + } + } + } + }, + "MockRuntimeServiceDefinitionOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/MockRuntimeServiceDefinition" + } + }, + "MockRuntimeServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "service": { + "type": "object", + "additionalProperties": false, + "required": [ + "definitions" + ], + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" + }, + "runOptions": { + "$ref": "#/definitions/MockRunOptionsOrRef" + }, + "data": { + "$ref": "#/definitions/DataDefinition" + }, + "settings": { + "$ref": "#/definitions/MockSettingsOrRef" + } + } + } + } + }, + "TestRuntimeServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "service": { + "$ref": "#/definitions/TestServiceDefinitionOrRef" + } + } + }, + "TestServiceDefinitionOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/TestRuntimeServiceDefinition" + } + }, + "TestServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" + }, + "runOptions": { + "$ref": "#/definitions/TestRunOptionsOrRef" + }, + "data": { + "$ref": "#/definitions/DataDefinition" + }, + "settings": { + "$ref": "#/definitions/TestSettingsOrRef" + } + } + }, + "DataDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "examples": { + "$ref": "#/definitions/ArrayExampleConfigurationOrRef" + }, + "dictionary": { + "$ref": "#/definitions/DictionaryConfigurationOrRef" + }, + "adapters": { + "$ref": "#/definitions/AdapterConfigurationOrRef" + } + } + }, + "ProxyDefinitionsArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "proxy" + ], + "properties": { + "proxy": { + "$ref": "#/definitions/ProxyDefinition" + } + } + } + }, + "ProxyDefinition": { + "type": "object", + "additionalProperties": false, + "required": [ + "target" + ], + "properties": { + "target": { + "$ref": "#/definitions/SubstitutableString" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "timeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "adapters": { + "$ref": "#/definitions/AdapterConfigurationOrRef" + }, + "mock": { + "$ref": "#/definitions/SubstitutableStringOrArray" + }, + "cert": { + "$ref": "#/definitions/CertConfigurationOrRef" + }, + "recordingsDirectory": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "McpDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/McpTestRunOptions" + } + } + }, + "McpTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "transportKind": { + "anyOf": [ + { + "type": "string", + "enum": [ + "STREAMABLE_HTTP" + ] + }, + { + "$ref": "#/definitions/SubstitutableString" + } + ] + }, + "enableResiliencyTests": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "dictionaryFile": { + "$ref": "#/definitions/SubstitutableString" + }, + "bearerToken": { + "$ref": "#/definitions/SubstitutableString" + }, + "filterTools": { + "$ref": "#/definitions/SubstitutableStringArray" + }, + "skipTools": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "SpecmaticDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "license": { + "$ref": "#/definitions/LicenseDefinition" + }, + "governance": { + "type": "object", + "additionalProperties": false, + "properties": { + "report": { + "$ref": "#/definitions/ReportsDefinition" + }, + "successCriteria": { + "$ref": "#/definitions/SuccessCriteriaDefinition" + } + } + }, + "settings": { + "$ref": "#/definitions/ConcreteSettingsOrRef" + } + } + }, + "LicenseDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "ReportsDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "formats": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "html", + "ctrf" + ] + } + }, + { + "$ref": "#/definitions/SubstitutableString" + } + ] + }, + "outputDirectory": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "SuccessCriteriaDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "minCoveragePercentage": { + "$ref": "#/definitions/SubstitutableFloat" + }, + "maxMissedOperationsInSpec": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "enforce": { + "$ref": "#/definitions/SubstitutableBoolean" + } + } + }, + "StaticServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" + } + } + }, + "SpecificationStaticDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "definition" + ], + "properties": { + "definition": { + "$ref": "#/definitions/SpecificationStaticDefinition" + } + } + } + }, + "SpecificationStaticDefinition": { + "type": "object", + "additionalProperties": false, + "required": [ + "source", + "specs" + ], + "properties": { + "source": { + "$ref": "#/definitions/SourceSchemaOrRef" + }, + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/SpecificationSchema" + } + } + } + }, + "SpecificationSchema": { + "oneOf": [ + { + "$ref": "#/definitions/SpecificationPath" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "spec": { + "$ref": "#/definitions/SpecificationObject" + } + } + } + ] + }, + "SpecificationPath": { + "type": "string" + }, + "SpecificationObject": { + "type": "object", + "additionalProperties": false, + "required": [ + "path" + ], + "properties": { + "id": { + "type": "string" + }, + "path": { + "type": "string" + }, + "urlPathPrefix": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "SourceSchemaOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/SourceSchema" + } + }, + "SourceSchema": { + "oneOf": [ + { + "$ref": "#/definitions/GitSourceSchema" + }, + { + "$ref": "#/definitions/FileSystemSourceSchema" + } + ] + }, + "GitSourceSchema": { + "type": "object", + "additionalProperties": false, + "required": [ + "git" + ], + "properties": { + "git": { + "$ref": "#/definitions/GitSourceOptions" + } + } + }, + "GitSourceOptions": { + "type": "object", + "additionalProperties": false, + "required": [ + "url" + ], + "properties": { + "url": { + "$ref": "#/definitions/SubstitutableString" + }, + "branch": { + "$ref": "#/definitions/SubstitutableString" + }, + "matchBranch": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "auth": { + "$ref": "#/definitions/GitSourceAuthentication" + } + } + }, + "GitSourceAuthentication": { + "oneOf": [ + { + "$ref": "#/definitions/GitSourceBearerFileAuthentication" + }, + { + "$ref": "#/definitions/GitSourceBearerEnvAuthentication" + }, + { + "$ref": "#/definitions/GitSourcePersonalAccessTokenAuthentication" + } + ] + }, + "GitSourceBearerFileAuthentication": { + "type": "object", + "additionalProperties": false, + "required": [ + "bearerFile" + ], + "properties": { + "bearerFile": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "GitSourceBearerEnvAuthentication": { + "type": "object", + "additionalProperties": false, + "required": [ + "bearerEnvironmentVariable" + ], + "properties": { + "bearerEnvironmentVariable": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "GitSourcePersonalAccessTokenAuthentication": { + "type": "object", + "additionalProperties": false, + "required": [ + "personalAccessToken" + ], + "properties": { + "personalAccessToken": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "FileSystemSourceSchema": { + "type": "object", + "additionalProperties": false, + "required": [ + "filesystem" + ], + "properties": { + "filesystem": { + "$ref": "#/definitions/FileSystemSourceOptions" + } + } + }, + "FileSystemSourceOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "directory": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "RunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/definitions/OpenApiRunOptions" + }, + "wsdl": { + "$ref": "#/definitions/WsdlRunOptions" + }, + "asyncapi": { + "$ref": "#/definitions/AsyncApiRunOptions" + }, + "graphqlsdl": { + "$ref": "#/definitions/GraphQLSdlRunOptions" + }, + "protobuf": { + "$ref": "#/definitions/ProtobufRunOptions" + } + } + }, + "TestRunOptionsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/TestRunOptions" + } + }, + "TestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/definitions/OpenApiTestRunOptions" + }, + "wsdl": { + "$ref": "#/definitions/WsdlTestRunOptions" + }, + "asyncapi": { + "$ref": "#/definitions/AsyncApiTestRunOptions" + }, + "graphqlsdl": { + "$ref": "#/definitions/GraphqlSdlTestRunOptions" + }, + "protobuf": { + "$ref": "#/definitions/ProtobufTestRunOptions" + } + } + }, + "MockRunOptionsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/MockRunOptions" + } + }, + "MockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/definitions/OpenApiMockRunOptions" + }, + "wsdl": { + "$ref": "#/definitions/WsdlMockRunOptions" + }, + "asyncapi": { + "$ref": "#/definitions/AsyncApiMockRunOptions" + }, + "graphqlsdl": { + "$ref": "#/definitions/GraphqlSdlMockRunOptions" + }, + "protobuf": { + "$ref": "#/definitions/ProtobufMockRunOptions" + } + } + }, + "OpenApiRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/OpenApiTestRunOptions" + }, + "else": { + "$ref": "#/definitions/OpenApiMockRunOptions" + } + }, + "AsyncApiRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/AsyncApiTestRunOptions" + }, + "else": { + "$ref": "#/definitions/AsyncApiMockRunOptions" + } + }, + "GraphQLSdlRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/GraphqlSdlTestRunOptions" + }, + "else": { + "$ref": "#/definitions/GraphqlSdlMockRunOptions" + } + }, + "ProtobufRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/ProtobufTestRunOptions" + }, + "else": { + "$ref": "#/definitions/ProtobufMockRunOptions" + } + }, + "WsdlRunOptions": { + "type": "object", + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/WsdlTestRunOptions" + }, + "else": { + "$ref": "#/definitions/WsdlMockRunOptions" + } + }, + "WsdlTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "WsdlMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "cert": { + "$ref": "#/definitions/CertConfigurationOrRef" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "AsyncApiTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "replyTimeout": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "subscriberReadinessWaitTimeout": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/AsyncApiServerDefinition" + } + }, + "schemaRegistry": { + "$ref": "#/definitions/AsyncApiSchemaRegistry" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "AsyncApiServerDefinition": { + "type": "object", + "additionalProperties": false, + "required": [ + "host", + "protocol" + ], + "properties": { + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "protocol": { + "$ref": "#/definitions/SubstitutableString" + }, + "adminCredentials": { + "$ref": "#/definitions/FreeFormObject" + }, + "client": { + "type": "object", + "additionalProperties": false, + "properties": { + "consumer": { + "$ref": "#/definitions/CertConfigurationOrRef" + }, + "producer": { + "$ref": "#/definitions/CertConfigurationOrRef" + } + } + } + } + }, + "AsyncApiMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/AsyncApiServerDefinition" + } + }, + "schemaRegistry": { + "$ref": "#/definitions/AsyncApiSchemaRegistry" + }, + "inMemoryBroker": { + "type": "object", + "additionalProperties": false, + "properties": { + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "logDir": { + "$ref": "#/definitions/SubstitutableString" + } + } + } + } + }, + "AsyncApiSchemaRegistry": { + "type": "object", + "additionalProperties": false, + "required": [ + "kind" + ], + "properties": { + "kind": { + "anyOf": [ + { + "type": "string", + "enum": [ + "CONFLUENT", + "DEFAULT" + ] + }, + { + "$ref": "#/definitions/SubstitutableString" + } + ] + }, + "url": { + "$ref": "#/definitions/SubstitutableString" + }, + "username": { + "$ref": "#/definitions/SubstitutableString" + }, + "password": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "GraphqlSdlTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "GraphqlSdlMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "ProtobufTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "importPaths": { + "$ref": "#/definitions/SubstitutableStringArray" + }, + "protocVersion": { + "$ref": "#/definitions/SubstitutableString" + }, + "requestTimeout": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "ProtobufMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "importPaths": { + "$ref": "#/definitions/SubstitutableStringArray" + }, + "protocVersion": { + "$ref": "#/definitions/SubstitutableString" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "filter": { + "$ref": "#/definitions/SubstitutableString" + }, + "workflow": { + "$ref": "#/definitions/WorkflowConfigurationV3" + }, + "swaggerUiBaseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "swaggerUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "actuatorUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "specs": { + "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ + "mock", + "stateful-mock" + ] + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "filter": { + "$ref": "#/definitions/SubstitutableString" + }, + "logMode": { + "anyOf": [ + { + "type": "string", + "enum": [ + "ALL", + "REQUEST_RESPONSE" + ] + }, + { + "$ref": "#/definitions/SubstitutableString" + } + ] + }, + "logsDirPath": { + "$ref": "#/definitions/SubstitutableString" + }, + "cert": { + "$ref": "#/definitions/CertConfigurationOrRef" + }, + "specs": { + "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiSpecificationRuntimeDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "spec" + ], + "properties": { + "spec": { + "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinition" + } + } + } + }, + "SpecificationRuntimeDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "spec" + ], + "properties": { + "spec": { + "$ref": "#/definitions/SpecificationRuntimeDefinition" + } + } + } + }, + "FreeFormObject": { + "type": "object", + "additionalProperties": {} + }, + "SpecificationRuntimeDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "overlayFilePath": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "OpenApiSpecificationRuntimeDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "overlayFilePath": { + "$ref": "#/definitions/SubstitutableString" + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SecuritySchemeConfigurationV3" + } + } + } + }, + "SecuritySchemeConfigurationV3": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "token" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2", + "basicAuth", + "bearer", + "apiKey" + ] + }, + "token": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "WorkflowConfigurationV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "extract": { + "$ref": "#/definitions/SubstitutableString" + }, + "use": { + "$ref": "#/definitions/SubstitutableString" + } + } + } + } + } + }, + "ExamplesConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "testExamples": { + "type": "array", + "items": { + "$ref": "#/definitions/BaseExampleConfigurationOrRef" + } + }, + "mockExamples": { + "type": "array", + "items": { + "$ref": "#/definitions/BaseExampleConfigurationOrRef" + } + }, + "commonExamples": { + "$ref": "#/definitions/BaseExampleConfiguration" + } + } + }, + "ArrayExampleConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/ArrayExampleConfiguration" + } + }, + "ArrayExampleConfiguration": { + "type": "array", + "items": { + "$ref": "#/definitions/BaseExampleConfigurationOrRef" + } + }, + "BaseExampleConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/BaseExampleConfiguration" + } + }, + "BaseExampleConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "directories" + ], + "properties": { + "directories": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "DictionaryConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/DictionaryConfiguration" + } + }, + "DictionaryConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "path" + ], + "properties": { + "path": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "AdapterConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/AdapterConfiguration" + } + }, + "AdapterConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "pre_specmatic_request_processor": { + "$ref": "#/definitions/SubstitutableString" + }, + "post_specmatic_response_processor": { + "$ref": "#/definitions/SubstitutableString" + }, + "pre_specmatic_response_processor": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "CertConfigurationOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/CertConfiguration" + } + }, + "CertConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "keyStore" + ], + "properties": { + "keyStore": { + "$ref": "#/definitions/KeyStoreConfiguration" + }, + "keyStorePassword": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "ConcreteSettingsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/ConcreteSettings" + } + }, + "ModeSpecificSettings": { + "type": "object", + "anyOf": [ + { + "$ref": "#/definitions/TestSettings" + }, + { + "$ref": "#/definitions/MockSettings" + } + ] + }, + "ConcreteSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "general": { + "$ref": "#/definitions/GeneralSettings" + }, + "test": { + "$ref": "#/definitions/TestSettings" + }, + "mock": { + "$ref": "#/definitions/MockSettings" + }, + "proxy": { + "$ref": "#/definitions/ProxySettings" + }, + "backwardCompatibility": { + "$ref": "#/definitions/BackwardCompatibilitySettings" + } + } + }, + "KeyStoreConfiguration": { + "oneOf": [ + { + "$ref": "#/definitions/KeyStoreFileConfiguration" + }, + { + "$ref": "#/definitions/KeyStoreDirectoryConfiguration" + } + ] + }, + "KeyStoreFileConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "file" + ], + "properties": { + "file": { + "$ref": "#/definitions/SubstitutableString" + }, + "password": { + "$ref": "#/definitions/SubstitutableString" + }, + "alias": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "KeyStoreDirectoryConfiguration": { + "type": "object", + "additionalProperties": false, + "required": [ + "directory" + ], + "properties": { + "directory": { + "$ref": "#/definitions/SubstitutableString" + }, + "password": { + "$ref": "#/definitions/SubstitutableString" + }, + "alias": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "BackwardCompatibilitySettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "baseBranch": { + "$ref": "#/definitions/SubstitutableString" + }, + "targetPath": { + "$ref": "#/definitions/SubstitutableString" + }, + "repoDirectory": { + "$ref": "#/definitions/SubstitutableString" + }, + "strictMode": { + "$ref": "#/definitions/SubstitutableBoolean" + } + } + }, + "ProxySettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "recordRequests": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "ignoreHeaders": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "MockSettingsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/MockSettings" + } + }, + "MockSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "generative": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "delayInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "startTimeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "hotReload": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "strictMode": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "lenientMode": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "gracefulRestartTimeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" + } + } + }, + "TestSettingsOrRef": { + "if": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/TestSettings" + } + }, + "TestSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "schemaResiliencyTests": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "none", + "positiveOnly" + ] + }, + { + "$ref": "#/definitions/SubstitutableString" + } + ] + }, + "timeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "strictMode": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "lenientMode": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "parallelism": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "maxTestRequestCombinations": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "junitReportDir": { + "$ref": "#/definitions/SubstitutableString" + }, + "validateResponseValues": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "maxTestCount": { + "$ref": "#/definitions/SubstitutableInteger" + } + } + }, + "GeneralSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "disableTelemetry": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "ignoreInlineExamples": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "ignoreInlineExampleWarnings": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "prettyPrint": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "logging": { + "$ref": "#/definitions/LoggingSettings" + }, + "featureFlags": { + "$ref": "#/definitions/FeatureFlags" + }, + "specExamplesDirectoryTemplate": { + "$ref": "#/definitions/SubstitutableString" + }, + "sharedExamplesDirectoryTemplate": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "LoggingSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "level": { + "anyOf": [ + { + "type": "string", + "enum": [ + "DEBUG", + "INFO" + ] + }, + { + "$ref": "#/definitions/SubstitutableString" + } + ] + }, + "text": { + "$ref": "#/definitions/LogOutputSettings" + }, + "json": { + "$ref": "#/definitions/LogOutputSettings" + } + } + }, + "LogOutputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "directory": { + "$ref": "#/definitions/SubstitutableString" + }, + "console": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "logFilePrefix": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "FeatureFlags": { + "type": "object", + "additionalProperties": false, + "properties": { + "fuzzyMatcherForPayloads": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "schemaExampleDefault": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "escapeSoapAction": { + "$ref": "#/definitions/SubstitutableBoolean" + } + } + } + } } \ No newline at end of file diff --git a/src/test/specmatic/specmatic.json b/src/test/specmatic/specmatic.json index c6861cb783c..62bd97bbfdc 100644 --- a/src/test/specmatic/specmatic.json +++ b/src/test/specmatic/specmatic.json @@ -15,7 +15,6 @@ "src/test/petstore.yaml", { "basePath": "/v1", - "baseUrl": "https://api.example.com", "host": "api.example.com", "port": 443, "specs": ["src/test/payments.yaml"] @@ -28,6 +27,7 @@ "provides": [ "src/test/petstore.yaml", { + "basePath": "/v1", "host": "localhost", "port": 8080, "resiliencyTests": { From 8c5acb37ce11106b30559b7b68f3acc4ca48c3d4 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 12:09:14 +0530 Subject: [PATCH 05/13] Added v3 examples --- .../{specmatic.json => specmatic-v2.json} | 0 src/test/specmatic/specmatic-v3-dereffed.json | 73 ++++++++++++++++++ src/test/specmatic/specmatic-v3-reffed.json | 75 +++++++++++++++++++ 3 files changed, 148 insertions(+) rename src/test/specmatic/{specmatic.json => specmatic-v2.json} (100%) create mode 100644 src/test/specmatic/specmatic-v3-dereffed.json create mode 100644 src/test/specmatic/specmatic-v3-reffed.json diff --git a/src/test/specmatic/specmatic.json b/src/test/specmatic/specmatic-v2.json similarity index 100% rename from src/test/specmatic/specmatic.json rename to src/test/specmatic/specmatic-v2.json diff --git a/src/test/specmatic/specmatic-v3-dereffed.json b/src/test/specmatic/specmatic-v3-dereffed.json new file mode 100644 index 00000000000..f19a32a7031 --- /dev/null +++ b/src/test/specmatic/specmatic-v3-dereffed.json @@ -0,0 +1,73 @@ +{ + "version": 3, + "systemUnderTest": { + "service": { + "definitions": [ + { + "definition": { + "source": { + "filesystem": { + "directory": "." + } + }, + "specs": [ + "product_search_bff_v5.yaml" + ] + } + } + ], + "runOptions": { + "openapi": { + "baseUrl": "http://studio:9090" + } + }, + "settings": { + "resiliencyTests": "all" + } + } + }, + "dependencies": { + "services": [ + { + "service": { + "definitions": [ + { + "definition": { + "source": { + "filesystem": { + "directory": "." + } + }, + "specs": [ + "product_search_bff_v5.yaml" + ] + } + } + ], + "runOptions": { + "openapi": { + "type": "mock", + "baseUrl": "http://0.0.0.0:9090" + } + } + } + } + ] + }, + "specmatic": { + "governance": { + "report": { + "outputDirectory": "file:///usr/src/app/build/reports/specmatic/" + }, + "successCriteria": { + "minCoveragePercentage": 70, + "enforce": true + } + }, + "settings": { + "general": { + "prettyPrint": true + } + } + } +} \ No newline at end of file diff --git a/src/test/specmatic/specmatic-v3-reffed.json b/src/test/specmatic/specmatic-v3-reffed.json new file mode 100644 index 00000000000..75076ef1b20 --- /dev/null +++ b/src/test/specmatic/specmatic-v3-reffed.json @@ -0,0 +1,75 @@ +{ + "version": 3, + "systemUnderTest": { + "service": { + "$ref": "#/components/services/productSearchBffV5", + "runOptions": { + "$ref": "#/components/runOptions/productSearchBffV5" + }, + "settings": { + "$ref": "#/components/settings/productSearchBffV5" + } + } + }, + "dependencies": { + "services": [ + { + "service": { + "$ref": "#/components/services/productSearchBffV5", + "runOptions": { + "$ref": "#/components/runOptions/productSearchBffV5" + } + } + } + ] + }, + "specmatic": { + "governance": { + "report": { + "outputDirectory": "file:///usr/src/app/build/reports/specmatic/" + }, + "successCriteria": { + "minCoveragePercentage": 70, + "enforce": true + } + }, + "settings": { + "general": { + "prettyPrint": true + } + } + }, + "components": { + "services": { + "productSearchBffV5": { + "definitions": [ + { + "definition": { + "source": { + "filesystem": { + "directory": "." + } + }, + "specs": [ + "product_search_bff_v5.yaml" + ] + } + } + ] + } + }, + "runOptions": { + "productSearchBffV5": { + "openapi": { + "type": "mock", + "baseUrl": "http://studio:9090" + } + } + }, + "settings": { + "productSearchBffV5": { + "resiliencyTests": "all" + } + } + } +} \ No newline at end of file From b1edcd517e00c3bf2a904f504a59ada1a8926d51 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 15:07:54 +0530 Subject: [PATCH 06/13] Got jsonschema working with the simpler reffed and re-reffed examples --- src/schemas/json/specmatic.json | 46 ++++++++----------- src/test/specmatic/specmatic-v3-dereffed.json | 2 +- src/test/specmatic/specmatic-v3-reffed.json | 2 +- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index fe3c297ca1d..b4061644afd 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -1038,7 +1038,7 @@ "additionalProperties": false, "properties": { "services": { - "$ref": "#/definitions/RuntimeServiceDefinitionOrRefArray" + "$ref": "#/definitions/MockRuntimeServiceDefinitionOrRefArray" }, "data": { "$ref": "#/definitions/DataDefinition" @@ -1048,7 +1048,7 @@ } } }, - "RuntimeServiceDefinitionOrRefArray": { + "MockRuntimeServiceDefinitionOrRefArray": { "type": "array", "items": { "type": "object", @@ -1085,30 +1085,24 @@ "MockRuntimeServiceDefinition": { "type": "object", "additionalProperties": false, + "required": [ + "definitions" + ], "properties": { - "service": { - "type": "object", - "additionalProperties": false, - "required": [ - "definitions" - ], - "properties": { - "description": { - "type": "string" - }, - "definitions": { - "$ref": "#/definitions/SpecificationStaticDefinitionArray" - }, - "runOptions": { - "$ref": "#/definitions/MockRunOptionsOrRef" - }, - "data": { - "$ref": "#/definitions/DataDefinition" - }, - "settings": { - "$ref": "#/definitions/MockSettingsOrRef" - } - } + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" + }, + "runOptions": { + "$ref": "#/definitions/MockRunOptionsOrRef" + }, + "data": { + "$ref": "#/definitions/DataDefinition" + }, + "settings": { + "$ref": "#/definitions/MockSettingsOrRef" } } }, @@ -1137,7 +1131,7 @@ "$ref": "#/definitions/Reference" }, "else": { - "$ref": "#/definitions/TestRuntimeServiceDefinition" + "$ref": "#/definitions/TestServiceDefinition" } }, "TestServiceDefinition": { diff --git a/src/test/specmatic/specmatic-v3-dereffed.json b/src/test/specmatic/specmatic-v3-dereffed.json index f19a32a7031..c7a8c344faa 100644 --- a/src/test/specmatic/specmatic-v3-dereffed.json +++ b/src/test/specmatic/specmatic-v3-dereffed.json @@ -22,7 +22,7 @@ } }, "settings": { - "resiliencyTests": "all" + "schemaResiliencyTests": "all" } } }, diff --git a/src/test/specmatic/specmatic-v3-reffed.json b/src/test/specmatic/specmatic-v3-reffed.json index 75076ef1b20..f7dc38c6673 100644 --- a/src/test/specmatic/specmatic-v3-reffed.json +++ b/src/test/specmatic/specmatic-v3-reffed.json @@ -68,7 +68,7 @@ }, "settings": { "productSearchBffV5": { - "resiliencyTests": "all" + "schemaResiliencyTests": "all" } } } From 8192077c67d7d5cc7477e1c7abaa74b41998ee0a Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 15:09:57 +0530 Subject: [PATCH 07/13] Changed some schema names of systemUnderTest schemas to improve symmetry with the corresponding dependency schema names --- src/schemas/json/specmatic.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index b4061644afd..ea9427f3add 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -45,7 +45,7 @@ ] }, "systemUnderTest": { - "$ref": "#/definitions/TestRuntimeServiceDefinition" + "$ref": "#/definitions/SystemUnderTestServiceDefinition" }, "dependencies": { "$ref": "#/definitions/DependenciesDefinition" @@ -1106,7 +1106,7 @@ } } }, - "TestRuntimeServiceDefinition": { + "SystemUnderTestServiceDefinition": { "type": "object", "additionalProperties": false, "properties": { @@ -1131,10 +1131,10 @@ "$ref": "#/definitions/Reference" }, "else": { - "$ref": "#/definitions/TestServiceDefinition" + "$ref": "#/definitions/TestRuntimeServiceDefinition" } }, - "TestServiceDefinition": { + "TestRuntimeServiceDefinition": { "type": "object", "additionalProperties": false, "properties": { From dd7419fbd7128d1ea8161f0643c28315154001b4 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 16:34:38 +0530 Subject: [PATCH 08/13] Updated specmatic schema and sample uber-v3 json file --- src/schemas/json/specmatic.json | 123 +++--- src/test/specmatic/specmatic-uber-v3.json | 453 ++++++++++++++++++++++ 2 files changed, 520 insertions(+), 56 deletions(-) create mode 100644 src/test/specmatic/specmatic-uber-v3.json diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index ea9427f3add..b143e15967a 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -970,12 +970,15 @@ }, "then": { "$ref": "#/definitions/SubstitutionExpression" + }, + "else": { + } } ] }, "SubstitutableString": { - "$ref": "#/definitions/GuardedSubstitutionString" + "type": "string" }, "SubstitutableStringArray": { "type": "array", @@ -1058,40 +1061,21 @@ ], "properties": { "service": { - "$ref": "#/definitions/MockRuntimeServiceDefinitionOrRef" + "$ref": "#/definitions/MockRuntimeServiceDefinition" } } } }, - "MockRuntimeServiceDefinitionOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/MockRuntimeServiceDefinition" - } - }, "MockRuntimeServiceDefinition": { "type": "object", "additionalProperties": false, - "required": [ - "definitions" - ], "properties": { "description": { "type": "string" }, + "$ref": { + "type": "string" + }, "definitions": { "$ref": "#/definitions/SpecificationStaticDefinitionArray" }, @@ -1104,56 +1088,83 @@ "settings": { "$ref": "#/definitions/MockSettingsOrRef" } - } + }, + "oneOf": [ + { + "required": ["$ref"], + "properties": { + "$ref": {} + }, + "not": { + "required": ["definitions"], + "properties": { + "definitions": {} + } + } + }, + { + "required": ["definitions"], + "properties": { + "definitions": {} + }, + "not": { + "required": ["$ref"], + "properties": { + "$ref": {} + } + } + } + ] }, "SystemUnderTestServiceDefinition": { "type": "object", "additionalProperties": false, "properties": { "service": { - "$ref": "#/definitions/TestServiceDefinitionOrRef" + "$ref": "#/definitions/TestRuntimeServiceDefinition" } } }, - "TestServiceDefinitionOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/TestRuntimeServiceDefinition" - } - }, "TestRuntimeServiceDefinition": { "type": "object", "additionalProperties": false, "properties": { - "description": { - "type": "string" - }, + "$ref": { "type": "string" }, "definitions": { "$ref": "#/definitions/SpecificationStaticDefinitionArray" }, - "runOptions": { - "$ref": "#/definitions/TestRunOptionsOrRef" - }, - "data": { - "$ref": "#/definitions/DataDefinition" + + "description": { "type": "string" }, + "runOptions": { "$ref": "#/definitions/TestRunOptionsOrRef" }, + "data": { "$ref": "#/definitions/DataDefinition" }, + "settings": { "$ref": "#/definitions/TestSettingsOrRef" } + }, + "oneOf": [ + { + "required": ["$ref"], + "properties": { + "$ref": {} + }, + "not": { + "required": ["definitions"], + "properties": { + "definitions": {} + } + } }, - "settings": { - "$ref": "#/definitions/TestSettingsOrRef" + { + "required": ["definitions"], + "properties": { + "definitions": {} + }, + "not": { + "required": ["$ref"], + "properties": { + "$ref": {} + } + } } - } + ] }, "DataDefinition": { "type": "object", diff --git a/src/test/specmatic/specmatic-uber-v3.json b/src/test/specmatic/specmatic-uber-v3.json new file mode 100644 index 00000000000..3204b7c836a --- /dev/null +++ b/src/test/specmatic/specmatic-uber-v3.json @@ -0,0 +1,453 @@ +{ + "version": 3, + "systemUnderTest": { + "service": { + "$ref": "#/components/services/orderApiService", + "runOptions": { + "$ref": "#/components/runOptions/orderApiService" + }, + "data": { + "examples": { + "$ref": "#/components/examples/testExamples" + }, + "dictionary": { + "$ref": "#/components/dictionaries/globalDictionary" + }, + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" + } + }, + "settings": { + "$ref": "#/components/settings/myService" + } + } + }, + "dependencies": { + "services": [ + { + "service": { + "$ref": "#/components/services/userApiService", + "runOptions": { + "$ref": "#/components/runOptions/userApiService" + } + } + }, + { + "service": { + "$ref": "#/components/services/productApiService", + "runOptions": { + "protobuf": { + "host": "localhost", + "port": 10000, + "importPaths": [ + "./proto-imports" + ], + "protocVersion": "3.15.0" + } + }, + "data": { + "examples": { + "$ref": "#/components/examples/mockExamples" + }, + "dictionary": { + "$ref": "#/components/dictionaries/productServiceDictionary" + }, + "adapters": { + "$ref": "#/components/adapters/productServiceHooks" + } + }, + "settings": { + "$ref": "#/components/settings/userApiMock" + } + } + } + ], + "data": { + "examples": { + "$ref": "#/components/examples/mockExamples" + }, + "dictionary": { + "$ref": "#/components/dictionaries/globalDictionary" + }, + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" + } + }, + "settings": { + "$ref": "#/components/settings/allMocks" + } + }, + "proxies": [ + { + "proxy": { + "target": "https://www.example.com/api", + "baseUrl": "http://localhost:8888", + "timeoutInMilliseconds": 15000, + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" + }, + "mock": [ + "specifications/proxy-api.yaml" + ], + "cert": { + "$ref": "#/components/certificates/serverCert" + }, + "recordingsDirectory": "./proxy-recordings/example" + } + }, + { + "proxy": { + "target": "https://www.foo-bar.com/api", + "baseUrl": "http://localhost:9999", + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" + }, + "recordingsDirectory": "./proxy-recordings/foo-bar" + } + } + ], + "mcp": { + "test": { + "baseUrl": "http://localhost:9100", + "transportKind": "STREAMABLE_HTTP", + "enableResiliencyTests": true, + "dictionaryFile": "./mcp-dictionary.json", + "bearerToken": "mcp-bearer-token", + "filterTools": [ + "tool.alpha", + "tool.beta" + ], + "skipTools": [ + "tool.gamma" + ] + } + }, + "specmatic": { + "license": { + "path": "${LICENCE:~/.home/specmatic-license.txt}" + }, + "governance": { + "report": { + "formats": "${REPORT_FORMAT:[html, ctrf]}", + "outputDirectory": "${REPORT_OUTPUT_DIR:./build/reports/specmatic}" + }, + "successCriteria": { + "minCoveragePercentage": "${MIN_COVERAGE:80}", + "maxMissedOperationsInSpec": "${MAX_MISSED_OPS:5}", + "enforce": "${ENFORCE_GOVERNANCE_CRITERIA:true}" + } + }, + "settings": { + "$ref": "#/components/settings/myGlobal" + } + }, + "components": { + "sources": { + "specsRepo": { + "git": { + "url": "https://github.com/example/specs-repo.git", + "branch": "main", + "matchBranch": true, + "auth": { + "bearerFile": "bearer.txt" + } + } + }, + "localSpecs": { + "filesystem": { + "directory": "./local-specs" + } + } + }, + "services": { + "orderApiService": { + "description": "Order API Service", + "definitions": [ + { + "definition": { + "source": { + "$ref": "#/components/sources/specsRepo" + }, + "specs": [ + { + "spec": { + "id": "orderAPIServiceSpec", + "path": "api_specs/oas/order-api-oas.yaml", + "urlPathPrefix": "/v1/http/orders" + } + }, + { + "spec": { + "path": "api_specs/proto/order-api-grpc.proto" + } + } + ] + } + }, + { + "definition": { + "source": { + "$ref": "#/components/sources/localSpecs" + }, + "specs": [ + { + "spec": { + "path": "wsdl/soap.wsdl" + } + } + ] + } + } + ] + }, + "userApiService": { + "definitions": [ + { + "definition": { + "source": { + "$ref": "#/components/sources/specsRepo" + }, + "specs": [ + "api_specs/oas/user-api-oas.yaml", + "api_specs/async/user-api-asyncapi.yaml" + ] + } + } + ] + }, + "productApiService": { + "definitions": [ + { + "definition": { + "source": { + "$ref": "#/components/sources/specsRepo" + }, + "specs": [ + "api_specs/proto/product-api.proto" + ] + } + } + ] + } + }, + "runOptions": { + "orderApiService": { + "openapi": { + "type": "test", + "baseUrl": "${ORDER_API_SERVICE_BASE_URL:http://localhost:8080}", + "workflow": { + "ids": { + "createUser": { + "extract": "$.userId" + }, + "*": { + "use": "$.globalId" + } + } + }, + "swaggerUrl": "http://localhost:8080/v3/api-docs", + "actuatorUrl": "http://localhost:8080/actuator", + "specs": [ + { + "spec": { + "id": "orderAPIServiceSpec", + "overlayFilePath": "./overlays/order-service-overlay.yaml", + "securitySchemes": { + "oauthScheme": { + "type": "oauth2", + "token": "${OAUTH2_TOKEN:default_token_value}" + }, + "basicScheme": { + "type": "basicAuth", + "token": "${BASIC_AUTH_USER:default_user}:${BASIC_AUTH_PWD:default_pwd}" + }, + "bearerScheme": { + "type": "bearer", + "token": "${BEARER_TOKEN:default_bearer_token}" + }, + "apiKeyScheme": { + "type": "apiKey", + "token": "${API_KEY:default_API_key_value}" + } + } + } + }, + { + "spec": { + "id": "userAPIServiceSpec", + "overlayFilePath": "./overlays/user-service-overlay.yaml" + } + } + ] + } + }, + "userApiService": { + "openapi": { + "type": "stateful-mock", + "baseUrl": "${USER_API_SERVICE_BASE_URL:http://localhost:9000}", + "cert": { + "$ref": "#/components/certificates/serverCert" + }, + "logsDirPath": "./vs-logs", + "logMode": "REQUEST_RESPONSE", + "filter": "PATH=\"/order\" && METHOD=\"POST\"", + "specs": [ + { + "spec": { + "id": "userAPIServiceSpec", + "securitySchemes": { + "bearerScheme": { + "type": "bearer", + "token": "${USER_API_BEARER_TOKEN:default_user_bearer_token}" + } + } + } + } + ] + }, + "asyncapi": { + "type": "mock", + "inMemoryBroker": { + "host": "localhost", + "port": 9092 + }, + "servers": [ + { + "host": "localhost:9092", + "protocol": "kafka" + } + ] + } + } + }, + "examples": { + "testExamples": [ + { + "directories": [ + "./test-examples", + "./test-examples", + "./test-data" + ] + }, + { + "$ref": "#/components/examples/commonExamples" + } + ], + "mockExamples": [ + { + "directories": [ + "./mock-examples", + "./mock-data" + ] + }, + { + "$ref": "#/components/examples/commonExamples" + } + ], + "commonExamples": { + "directories": [ + "./common-examples-for-my-service", + "./common-examples-for-all-service" + ] + } + }, + "dictionaries": { + "globalDictionary": { + "path": "./dictionaries/global-dictionary.yaml" + }, + "productServiceDictionary": { + "path": "./stub-dictionary.json" + } + }, + "adapters": { + "apiServiceHooks": { + "pre_specmatic_request_processor": "./hooks/decode_request_from_consumer.sh", + "post_specmatic_response_processor": "./hooks/encode_response_to_consumer.sh", + "pre_specmatic_response_processor": "./hooks/decode_response_from_provider.sh" + }, + "productServiceHooks": { + "pre_specmatic_request_processor": "./hooks/decode_request_from_consumer.sh", + "pre_specmatic_response_processor": "./hooks/decode_response_from_provider.sh" + } + }, + "certificates": { + "serverCert": { + "keyStore": { + "file": "./certs/proxy-keystore.jks", + "password": "changeit", + "alias": "specmatic_server" + }, + "keyStorePassword": "changeit" + } + }, + "settings": { + "myGlobal": { + "general": { + "disableTelemetry": false, + "ignoreInlineExamples": false, + "ignoreInlineExampleWarnings": false, + "prettyPrint": true, + "logging": { + "level": "INFO", + "text": { + "directory": "./logs/text", + "console": true, + "logFilePrefix": "specmatic" + }, + "json": { + "directory": "./logs/json", + "console": false, + "logFilePrefix": "specmatic" + } + }, + "featureFlags": { + "fuzzyMatcherForPayloads": false, + "schemaExampleDefault": true, + "escapeSoapAction": false + } + }, + "test": { + "schemaResiliencyTests": "all", + "timeoutInMilliseconds": 120000, + "strictMode": true, + "parallelism": "4", + "maxTestRequestCombinations": 100, + "junitReportDir": "./build/test-results/specmatic" + }, + "mock": { + "generative": true, + "delayInMilliseconds": 250, + "startTimeoutInMilliseconds": 30000, + "hotReload": true, + "strictMode": false, + "gracefulRestartTimeoutInMilliseconds": 10000 + }, + "backwardCompatibility": { + "baseBranch": "main", + "targetPath": "specifications", + "repoDirectory": "../specs", + "strictMode": true + }, + "proxy": { + "recordRequests": true, + "ignoreHeaders": [ + "Authorization", + "Cookie" + ] + } + }, + "myService": { + "timeoutInMilliseconds": 45000, + "schemaResiliencyTests": "none" + }, + "allMocks": { + "delayInMilliseconds": 100, + "strictMode": false + }, + "userApiMock": { + "delayInMilliseconds": 50, + "strictMode": true + } + } + } +} \ No newline at end of file From 8c0f61b96aa7b9ee9da79173ec0fbe4a5e7d9321 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 16:47:15 +0530 Subject: [PATCH 09/13] added some negative examples for specmatic v3 schema --- .../v3-components-additional-properties.json | 6 ++++++ ...ency-service-ref-and-definitions-together.json | 13 +++++++++++++ .../v3-examples-additional-properties.json | 10 ++++++++++ .../specmatic/v3-examples-wrong-type.json | 8 ++++++++ .../v3-global-settings-additional-properties.json | 10 ++++++++++ .../specmatic/v3-global-settings-wrong-type.json | 10 ++++++++++ .../specmatic/v3-proxy-missing-target.json | 10 ++++++++++ .../v3-root-additional-properties-contracts.json | 4 ++++ .../v3-run-options-additional-properties.json | 10 ++++++++++ .../v3-run-options-openapi-missing-type.json | 12 ++++++++++++ .../specmatic/v3-run-options-wrong-datatype.json | 13 +++++++++++++ .../v3-source-mixed-git-and-filesystem.json | 15 +++++++++++++++ ...r-test-service-missing-ref-or-definitions.json | 8 ++++++++ 13 files changed, 129 insertions(+) create mode 100644 src/negative_test/specmatic/v3-components-additional-properties.json create mode 100644 src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json create mode 100644 src/negative_test/specmatic/v3-examples-additional-properties.json create mode 100644 src/negative_test/specmatic/v3-examples-wrong-type.json create mode 100644 src/negative_test/specmatic/v3-global-settings-additional-properties.json create mode 100644 src/negative_test/specmatic/v3-global-settings-wrong-type.json create mode 100644 src/negative_test/specmatic/v3-proxy-missing-target.json create mode 100644 src/negative_test/specmatic/v3-root-additional-properties-contracts.json create mode 100644 src/negative_test/specmatic/v3-run-options-additional-properties.json create mode 100644 src/negative_test/specmatic/v3-run-options-openapi-missing-type.json create mode 100644 src/negative_test/specmatic/v3-run-options-wrong-datatype.json create mode 100644 src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json create mode 100644 src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json diff --git a/src/negative_test/specmatic/v3-components-additional-properties.json b/src/negative_test/specmatic/v3-components-additional-properties.json new file mode 100644 index 00000000000..68a94b72f6c --- /dev/null +++ b/src/negative_test/specmatic/v3-components-additional-properties.json @@ -0,0 +1,6 @@ +{ + "version": 3, + "components": { + "unknownSection": {} + } +} diff --git a/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json b/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json new file mode 100644 index 00000000000..578eb744767 --- /dev/null +++ b/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json @@ -0,0 +1,13 @@ +{ + "version": 3, + "dependencies": { + "services": [ + { + "service": { + "$ref": "#/components/services/userApiService", + "definitions": [] + } + } + ] + } +} diff --git a/src/negative_test/specmatic/v3-examples-additional-properties.json b/src/negative_test/specmatic/v3-examples-additional-properties.json new file mode 100644 index 00000000000..8e70b2eb70e --- /dev/null +++ b/src/negative_test/specmatic/v3-examples-additional-properties.json @@ -0,0 +1,10 @@ +{ + "version": 3, + "components": { + "examples": { + "invalidExamplesSection": { + "directories": "./examples" + } + } + } +} diff --git a/src/negative_test/specmatic/v3-examples-wrong-type.json b/src/negative_test/specmatic/v3-examples-wrong-type.json new file mode 100644 index 00000000000..67a816a9ac0 --- /dev/null +++ b/src/negative_test/specmatic/v3-examples-wrong-type.json @@ -0,0 +1,8 @@ +{ + "version": 3, + "components": { + "examples": { + "testExamples": "not-an-array" + } + } +} diff --git a/src/negative_test/specmatic/v3-global-settings-additional-properties.json b/src/negative_test/specmatic/v3-global-settings-additional-properties.json new file mode 100644 index 00000000000..f0445c264c8 --- /dev/null +++ b/src/negative_test/specmatic/v3-global-settings-additional-properties.json @@ -0,0 +1,10 @@ +{ + "version": 3, + "specmatic": { + "settings": { + "general": { + "unsupportedSetting": true + } + } + } +} diff --git a/src/negative_test/specmatic/v3-global-settings-wrong-type.json b/src/negative_test/specmatic/v3-global-settings-wrong-type.json new file mode 100644 index 00000000000..d690c3dc940 --- /dev/null +++ b/src/negative_test/specmatic/v3-global-settings-wrong-type.json @@ -0,0 +1,10 @@ +{ + "version": 3, + "specmatic": { + "settings": { + "general": { + "prettyPrint": 1 + } + } + } +} diff --git a/src/negative_test/specmatic/v3-proxy-missing-target.json b/src/negative_test/specmatic/v3-proxy-missing-target.json new file mode 100644 index 00000000000..7257318de35 --- /dev/null +++ b/src/negative_test/specmatic/v3-proxy-missing-target.json @@ -0,0 +1,10 @@ +{ + "version": 3, + "proxies": [ + { + "proxy": { + "baseUrl": "http://localhost:9000" + } + } + ] +} diff --git a/src/negative_test/specmatic/v3-root-additional-properties-contracts.json b/src/negative_test/specmatic/v3-root-additional-properties-contracts.json new file mode 100644 index 00000000000..4afe27cda09 --- /dev/null +++ b/src/negative_test/specmatic/v3-root-additional-properties-contracts.json @@ -0,0 +1,4 @@ +{ + "version": 3, + "contracts": [] +} diff --git a/src/negative_test/specmatic/v3-run-options-additional-properties.json b/src/negative_test/specmatic/v3-run-options-additional-properties.json new file mode 100644 index 00000000000..bcc7df0cc6b --- /dev/null +++ b/src/negative_test/specmatic/v3-run-options-additional-properties.json @@ -0,0 +1,10 @@ +{ + "version": 3, + "components": { + "runOptions": { + "orderApiService": { + "invalidProtocol": {} + } + } + } +} diff --git a/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json b/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json new file mode 100644 index 00000000000..3e1aa7470e0 --- /dev/null +++ b/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json @@ -0,0 +1,12 @@ +{ + "version": 3, + "components": { + "runOptions": { + "orderApiService": { + "openapi": { + "baseUrl": "http://localhost:8080" + } + } + } + } +} diff --git a/src/negative_test/specmatic/v3-run-options-wrong-datatype.json b/src/negative_test/specmatic/v3-run-options-wrong-datatype.json new file mode 100644 index 00000000000..824dea6d4f9 --- /dev/null +++ b/src/negative_test/specmatic/v3-run-options-wrong-datatype.json @@ -0,0 +1,13 @@ +{ + "version": 3, + "components": { + "runOptions": { + "orderApiService": { + "openapi": { + "type": "test", + "baseUrl": 8080 + } + } + } + } +} diff --git a/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json b/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json new file mode 100644 index 00000000000..48c0563c5bf --- /dev/null +++ b/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json @@ -0,0 +1,15 @@ +{ + "version": 3, + "components": { + "sources": { + "specsRepo": { + "git": { + "url": "https://github.com/example/specs-repo.git" + }, + "filesystem": { + "directory": "./local-specs" + } + } + } + } +} diff --git a/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json b/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json new file mode 100644 index 00000000000..4b20fc57fbf --- /dev/null +++ b/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json @@ -0,0 +1,8 @@ +{ + "version": 3, + "systemUnderTest": { + "service": { + "description": "Order API service" + } + } +} From 538a06eb918bc3192799367c7dc599c1760d463e Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Wed, 11 Feb 2026 21:45:09 +0530 Subject: [PATCH 10/13] Updated the new specmatic schema and test files using prettier --- .../v3-components-additional-properties.json | 4 +- ...-service-ref-and-definitions-together.json | 4 +- .../v3-examples-additional-properties.json | 4 +- .../specmatic/v3-examples-wrong-type.json | 4 +- ...global-settings-additional-properties.json | 4 +- .../v3-global-settings-wrong-type.json | 4 +- .../specmatic/v3-proxy-missing-target.json | 4 +- ...-root-additional-properties-contracts.json | 4 +- .../v3-run-options-additional-properties.json | 4 +- .../v3-run-options-openapi-missing-type.json | 4 +- .../v3-run-options-wrong-datatype.json | 8 +- .../v3-source-mixed-git-and-filesystem.json | 10 +- ...st-service-missing-ref-or-definitions.json | 4 +- src/schemas/json/specmatic.json | 4875 ++++++++--------- src/test/specmatic/specmatic-uber-v3.json | 671 ++- src/test/specmatic/specmatic-v3-dereffed.json | 68 +- src/test/specmatic/specmatic-v3-reffed.json | 84 +- 17 files changed, 2733 insertions(+), 3027 deletions(-) diff --git a/src/negative_test/specmatic/v3-components-additional-properties.json b/src/negative_test/specmatic/v3-components-additional-properties.json index 68a94b72f6c..c3d6b40c758 100644 --- a/src/negative_test/specmatic/v3-components-additional-properties.json +++ b/src/negative_test/specmatic/v3-components-additional-properties.json @@ -1,6 +1,6 @@ { - "version": 3, "components": { "unknownSection": {} - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json b/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json index 578eb744767..a6c8d0cdbc5 100644 --- a/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json +++ b/src/negative_test/specmatic/v3-dependency-service-ref-and-definitions-together.json @@ -1,5 +1,4 @@ { - "version": 3, "dependencies": { "services": [ { @@ -9,5 +8,6 @@ } } ] - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-examples-additional-properties.json b/src/negative_test/specmatic/v3-examples-additional-properties.json index 8e70b2eb70e..a8d5e3b04b5 100644 --- a/src/negative_test/specmatic/v3-examples-additional-properties.json +++ b/src/negative_test/specmatic/v3-examples-additional-properties.json @@ -1,10 +1,10 @@ { - "version": 3, "components": { "examples": { "invalidExamplesSection": { "directories": "./examples" } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-examples-wrong-type.json b/src/negative_test/specmatic/v3-examples-wrong-type.json index 67a816a9ac0..bc739c0ebbf 100644 --- a/src/negative_test/specmatic/v3-examples-wrong-type.json +++ b/src/negative_test/specmatic/v3-examples-wrong-type.json @@ -1,8 +1,8 @@ { - "version": 3, "components": { "examples": { "testExamples": "not-an-array" } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-global-settings-additional-properties.json b/src/negative_test/specmatic/v3-global-settings-additional-properties.json index f0445c264c8..1f29e3d5442 100644 --- a/src/negative_test/specmatic/v3-global-settings-additional-properties.json +++ b/src/negative_test/specmatic/v3-global-settings-additional-properties.json @@ -1,10 +1,10 @@ { - "version": 3, "specmatic": { "settings": { "general": { "unsupportedSetting": true } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-global-settings-wrong-type.json b/src/negative_test/specmatic/v3-global-settings-wrong-type.json index d690c3dc940..52aaae010ed 100644 --- a/src/negative_test/specmatic/v3-global-settings-wrong-type.json +++ b/src/negative_test/specmatic/v3-global-settings-wrong-type.json @@ -1,10 +1,10 @@ { - "version": 3, "specmatic": { "settings": { "general": { "prettyPrint": 1 } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-proxy-missing-target.json b/src/negative_test/specmatic/v3-proxy-missing-target.json index 7257318de35..de93a8c7674 100644 --- a/src/negative_test/specmatic/v3-proxy-missing-target.json +++ b/src/negative_test/specmatic/v3-proxy-missing-target.json @@ -1,10 +1,10 @@ { - "version": 3, "proxies": [ { "proxy": { "baseUrl": "http://localhost:9000" } } - ] + ], + "version": 3 } diff --git a/src/negative_test/specmatic/v3-root-additional-properties-contracts.json b/src/negative_test/specmatic/v3-root-additional-properties-contracts.json index 4afe27cda09..38ef7b87f97 100644 --- a/src/negative_test/specmatic/v3-root-additional-properties-contracts.json +++ b/src/negative_test/specmatic/v3-root-additional-properties-contracts.json @@ -1,4 +1,4 @@ { - "version": 3, - "contracts": [] + "contracts": [], + "version": 3 } diff --git a/src/negative_test/specmatic/v3-run-options-additional-properties.json b/src/negative_test/specmatic/v3-run-options-additional-properties.json index bcc7df0cc6b..0e5eb5a9e2d 100644 --- a/src/negative_test/specmatic/v3-run-options-additional-properties.json +++ b/src/negative_test/specmatic/v3-run-options-additional-properties.json @@ -1,10 +1,10 @@ { - "version": 3, "components": { "runOptions": { "orderApiService": { "invalidProtocol": {} } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json b/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json index 3e1aa7470e0..25e4d8a5cd5 100644 --- a/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json +++ b/src/negative_test/specmatic/v3-run-options-openapi-missing-type.json @@ -1,5 +1,4 @@ { - "version": 3, "components": { "runOptions": { "orderApiService": { @@ -8,5 +7,6 @@ } } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-run-options-wrong-datatype.json b/src/negative_test/specmatic/v3-run-options-wrong-datatype.json index 824dea6d4f9..8aaed539237 100644 --- a/src/negative_test/specmatic/v3-run-options-wrong-datatype.json +++ b/src/negative_test/specmatic/v3-run-options-wrong-datatype.json @@ -1,13 +1,13 @@ { - "version": 3, "components": { "runOptions": { "orderApiService": { "openapi": { - "type": "test", - "baseUrl": 8080 + "baseUrl": 8080, + "type": "test" } } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json b/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json index 48c0563c5bf..f6fdce40be8 100644 --- a/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json +++ b/src/negative_test/specmatic/v3-source-mixed-git-and-filesystem.json @@ -1,15 +1,15 @@ { - "version": 3, "components": { "sources": { "specsRepo": { - "git": { - "url": "https://github.com/example/specs-repo.git" - }, "filesystem": { "directory": "./local-specs" + }, + "git": { + "url": "https://github.com/example/specs-repo.git" } } } - } + }, + "version": 3 } diff --git a/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json b/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json index 4b20fc57fbf..0cc159f5c34 100644 --- a/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json +++ b/src/negative_test/specmatic/v3-system-under-test-service-missing-ref-or-definitions.json @@ -1,8 +1,8 @@ { - "version": 3, "systemUnderTest": { "service": { "description": "Order API service" } - } + }, + "version": 3 } diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index b143e15967a..285dc1ed5a9 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -1,2722 +1,2455 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://json.schemastore.org/specmatic.json", - "title": "Specmatic Configuration", - "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "default": 2 - } - }, - "allOf": [ - { - "if": { - "properties": { - "version": { - "const": 3 - } - } - }, - "then": { - "$ref": "#/definitions/ConfigV3" - }, - "else": { - "$ref": "#/definitions/ConfigV2" - } + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/specmatic.json", + "title": "Specmatic Configuration", + "description": "Configuration file for Specmatic, a contract-driven testing tool\nhttps://specmatic.io/documentation/", + "type": "object", + "required": ["version"], + "properties": { + "version": { + "type": "integer", + "default": 2 + } + }, + "allOf": [ + { + "if": { + "properties": { + "version": { + "const": 3 + } } - ], - "definitions": { - "ConfigV3": { - "type": "object", - "required": [ - "version" - ], - "additionalProperties": false, - "properties": { - "version": { - "type": "integer", - "enum": [ - 3 - ] - }, - "systemUnderTest": { - "$ref": "#/definitions/SystemUnderTestServiceDefinition" - }, - "dependencies": { - "$ref": "#/definitions/DependenciesDefinition" - }, - "proxies": { - "$ref": "#/definitions/ProxyDefinitionsArray" - }, - "mcp": { - "$ref": "#/definitions/McpDefinition" - }, - "specmatic": { - "$ref": "#/definitions/SpecmaticDefinition" - }, - "components": { - "type": "object", - "additionalProperties": false, - "properties": { - "sources": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/SourceSchema" - } - }, - "services": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/StaticServiceDefinition" - } - }, - "runOptions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/RunOptions" - } - }, - "examples": { - "$ref": "#/definitions/ExamplesConfiguration" - }, - "dictionaries": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/DictionaryConfiguration" - } - }, - "adapters": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/AdapterConfiguration" - } - }, - "certificates": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CertConfiguration" - } - }, - "settings": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/ConcreteSettings" - }, - { - "$ref": "#/definitions/ModeSpecificSettings" - } - ] - } - } - } - } - } - }, - "ConfigV2": { - "type": "object", - "required": [ - "version", - "contracts" - ], - "additionalProperties": false, - "properties": { - "version": { - "type": "integer", - "enum": [ - 2 - ], - "description": "Configuration version for Specmatic" - }, - "contracts": { - "type": "array", - "description": "Array of contract configurations", - "items": { - "$ref": "#/definitions/ContractConfig" - } - }, - "auth": { - "$ref": "#/definitions/Auth", - "description": "Authentication configuration" - }, - "pipeline": { - "$ref": "#/definitions/Pipeline", - "description": "Pipeline configuration for Azure DevOps" - }, - "environments": { - "type": "object", - "description": "Environment-specific configurations", - "additionalProperties": { - "$ref": "#/definitions/Environment" - } - }, - "hooks": { - "type": "object", - "description": "Custom hooks configuration", - "additionalProperties": { - "type": "string" - } - }, - "repository": { - "$ref": "#/definitions/RepositoryInfo", - "description": "Repository information" - }, - "report": { - "$ref": "#/definitions/ReportConfigurationDetails", - "description": "Report generation configuration" - }, - "security": { - "$ref": "#/definitions/SecurityConfiguration", - "description": "Security configuration for API testing" - }, - "test": { - "$ref": "#/definitions/TestConfiguration", - "description": "Test execution configuration" - }, - "stub": { - "$ref": "#/definitions/StubConfiguration", - "description": "Stub/mock server configuration" - }, - "virtualService": { - "$ref": "#/definitions/VirtualServiceConfiguration", - "description": "Virtual service configuration" - }, - "examples": { - "type": "array", - "description": "List of example file paths", - "items": { - "type": "string" - } - }, - "workflow": { - "$ref": "#/definitions/WorkflowConfiguration", - "description": "Workflow configuration for ID management" - }, - "ignoreInlineExamples": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to ignore inline examples in specifications" - }, - "additionalExampleParamsFilePath": { - "type": [ - "string", - "null" - ], - "description": "Path to additional example parameters file" - }, - "attributeSelectionPattern": { - "$ref": "#/definitions/AttributeSelectionPattern", - "description": "Pattern for selecting attributes in responses" - }, - "allPatternsMandatory": { - "type": [ - "boolean", - "null" - ], - "description": "Whether all patterns are mandatory" - }, - "defaultPatternValues": { - "type": "object", - "description": "Default values for patterns", - "additionalProperties": true - } - } - }, - "ContractConfig": { - "type": "object", - "title": "ContractConfig", - "description": "Defines a contract source and its provides/consumes configuration.", - "additionalProperties": false, - "properties": { - "git": { - "type": "object", - "description": "Git contract source details.", - "additionalProperties": false, - "properties": { - "url": { - "type": [ - "string", - "null" - ], - "description": "URL of the git repository." - }, - "branch": { - "type": [ - "string", - "null" - ], - "description": "Branch name in the git repository." - }, - "matchBranch": { - "type": "boolean" - } - }, - "required": [] - }, - "filesystem": { - "type": "object", - "description": "Filesystem contract source details.", - "additionalProperties": false, - "properties": { - "directory": { - "type": "string", - "description": "Directory path for contract files." - } - }, - "required": [] - }, - "provides": { - "type": [ - "array", - "null" - ], - "description": "List of specs provided for testing. Each entry can be a string or an object.", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/StringValue" - }, - { - "$ref": "#/definitions/ObjectValueFullUrl" - }, - { - "$ref": "#/definitions/ObjectValuePartialUrl" - }, - { - "$ref": "#/definitions/ConfigValue" - } - ] - } - }, - "consumes": { - "type": [ - "array", - "null" - ], - "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/StringValue" - }, - { - "$ref": "#/definitions/ObjectValueFullUrl" - }, - { - "$ref": "#/definitions/ObjectValuePartialUrl" - }, - { - "$ref": "#/definitions/ConfigValue" - } - ] - } - } - }, - "required": [] + }, + "then": { + "$ref": "#/definitions/ConfigV3" + }, + "else": { + "$ref": "#/definitions/ConfigV2" + } + } + ], + "definitions": { + "ConfigV3": { + "type": "object", + "required": ["version"], + "additionalProperties": false, + "properties": { + "version": { + "type": "integer", + "enum": [3] }, - "Auth": { - "type": "object", - "additionalProperties": false, - "description": "Authentication configuration", - "properties": { - "bearer-file": { - "type": "string", - "description": "Path to file containing bearer token" - }, - "bearer-environment-variable": { - "type": [ - "string", - "null" - ], - "description": "Environment variable name containing bearer token" - } - } + "systemUnderTest": { + "$ref": "#/definitions/SystemUnderTestServiceDefinition" }, - "Pipeline": { - "type": "object", - "additionalProperties": false, - "description": "Azure DevOps pipeline configuration", - "properties": { - "provider": { - "type": "string", - "enum": [ - "azure" - ], - "description": "Pipeline provider type" - }, - "organization": { - "type": "string", - "description": "Azure DevOps organization name" - }, - "project": { - "type": "string", - "description": "Azure DevOps project name" - }, - "definitionId": { - "type": "integer", - "description": "Pipeline definition ID" - } - } + "dependencies": { + "$ref": "#/definitions/DependenciesDefinition" }, - "Environment": { - "type": "object", - "additionalProperties": false, - "description": "Environment-specific configuration", - "properties": { - "baseurls": { - "type": [ - "object", - "null" - ], - "description": "Base URLs for different services", - "additionalProperties": { - "type": "string" - } - }, - "variables": { - "type": [ - "object", - "null" - ], - "description": "Environment variables", - "additionalProperties": { - "type": "string" - } - } - } + "proxies": { + "$ref": "#/definitions/ProxyDefinitionsArray" }, - "RepositoryInfo": { - "type": "object", - "additionalProperties": false, - "description": "Repository information", - "properties": { - "provider": { - "type": "string", - "description": "Repository provider type" - }, - "collectionName": { - "type": "string", - "description": "Name of the collection" - } - } + "mcp": { + "$ref": "#/definitions/McpDefinition" }, - "ReportConfigurationDetails": { - "type": "object", - "additionalProperties": false, - "description": "Report generation configuration", - "properties": { - "formatters": { - "type": [ - "array", - "null" - ], - "description": "List of report formatters", - "items": { - "$ref": "#/definitions/ReportFormatterDetails" - }, - "deprecated": true - }, - "types": { - "$ref": "#/definitions/ReportTypes" - } - } - }, - "ReportFormatterDetails": { - "type": "object", - "additionalProperties": false, - "deprecated": true, - "description": "Configuration for a specific report formatter", - "properties": { - "type": { - "type": [ - "string", - "null" - ], - "enum": [ - "text", - "html", - "ctrf" - ], - "description": "Type of report formatter" - }, - "layout": { - "type": [ - "string", - "null" - ], - "enum": [ - "table" - ], - "description": "Layout style for the report" - }, - "lite": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to generate a lite version of the report" - }, - "title": { - "type": [ - "string", - "null" - ], - "description": "Title for the report" - }, - "logo": { - "type": [ - "string", - "null" - ], - "description": "Path to logo image for the report" - }, - "logoAltText": { - "type": [ - "string", - "null" - ], - "description": "Alt text for the logo" - }, - "heading": { - "type": [ - "string", - "null" - ], - "description": "Heading for the report" - }, - "outputDirectory": { - "type": [ - "string", - "null" - ], - "description": "Directory to output the report" - } - } + "specmatic": { + "$ref": "#/definitions/SpecmaticDefinition" }, - "ReportTypes": { - "type": "object", - "additionalProperties": false, - "description": "Configuration for different report types", - "properties": { - "APICoverage": { - "$ref": "#/definitions/APICoverage" - } - } - }, - "APICoverage": { - "type": "object", - "additionalProperties": false, - "description": "API coverage report configuration", - "properties": { - "OpenAPI": { - "$ref": "#/definitions/APICoverageConfiguration" - } - } + "components": { + "type": "object", + "additionalProperties": false, + "properties": { + "sources": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SourceSchema" + } + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/StaticServiceDefinition" + } + }, + "runOptions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/RunOptions" + } + }, + "examples": { + "$ref": "#/definitions/ExamplesConfiguration" + }, + "dictionaries": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DictionaryConfiguration" + } + }, + "adapters": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AdapterConfiguration" + } + }, + "certificates": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CertConfiguration" + } + }, + "settings": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/ConcreteSettings" + }, + { + "$ref": "#/definitions/ModeSpecificSettings" + } + ] + } + } + } + } + } + }, + "ConfigV2": { + "type": "object", + "required": ["version", "contracts"], + "additionalProperties": false, + "properties": { + "version": { + "type": "integer", + "enum": [2], + "description": "Configuration version for Specmatic" + }, + "contracts": { + "type": "array", + "description": "Array of contract configurations", + "items": { + "$ref": "#/definitions/ContractConfig" + } + }, + "auth": { + "$ref": "#/definitions/Auth", + "description": "Authentication configuration" + }, + "pipeline": { + "$ref": "#/definitions/Pipeline", + "description": "Pipeline configuration for Azure DevOps" + }, + "environments": { + "type": "object", + "description": "Environment-specific configurations", + "additionalProperties": { + "$ref": "#/definitions/Environment" + } + }, + "hooks": { + "type": "object", + "description": "Custom hooks configuration", + "additionalProperties": { + "type": "string" + } }, - "APICoverageConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "OpenAPI coverage configuration", - "properties": { - "successCriteria": { - "$ref": "#/definitions/SuccessCriteria" - }, - "excludedEndpoints": { - "type": [ - "array", - "null" - ], - "description": "List of endpoints to exclude from coverage", - "items": { - "type": "string" - } - } - } + "repository": { + "$ref": "#/definitions/RepositoryInfo", + "description": "Repository information" }, - "SuccessCriteria": { - "type": "object", - "additionalProperties": false, - "description": "Success criteria for API coverage", - "properties": { - "minThresholdPercentage": { - "type": [ - "integer", - "null" - ], - "description": "Minimum coverage percentage threshold" - }, - "maxMissedEndpointsInSpec": { - "type": [ - "integer", - "null" - ], - "description": "Maximum number of missed endpoints allowed" - }, - "enforce": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to enforce the success criteria" - } - } + "report": { + "$ref": "#/definitions/ReportConfigurationDetails", + "description": "Report generation configuration" }, - "SecurityConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "Security configuration", - "properties": { - "OpenAPI": { - "$ref": "#/definitions/OpenAPISecurityConfiguration" - } - } + "security": { + "$ref": "#/definitions/SecurityConfiguration", + "description": "Security configuration for API testing" }, - "OpenAPISecurityConfiguration": { - "type": "object", - "additionalProperties": false, - "description": "OpenAPI security configuration", - "properties": { - "securitySchemes": { - "type": "object", - "description": "Security scheme configurations", - "additionalProperties": { - "$ref": "#/definitions/SecuritySchemeConfiguration" - } - } - } + "test": { + "$ref": "#/definitions/TestConfiguration", + "description": "Test execution configuration" }, - "SecuritySchemeConfiguration": { - "type": "object", - "description": "Configuration for a security scheme", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2", - "basicAuth", - "bearer", - "apiKey" - ], - "description": "Type of security scheme" - }, - "token": { - "type": [ - "string", - "null" - ], - "description": "Authentication token" - }, - "value": { - "type": [ - "string", - "null" - ], - "description": "Authentication value" - } - } + "stub": { + "$ref": "#/definitions/StubConfiguration", + "description": "Stub/mock server configuration" }, - "TestConfiguration": { - "type": "object", - "description": "Test execution configuration", - "additionalProperties": false, - "properties": { - "resiliencyTests": { - "$ref": "#/definitions/ResiliencyTestsConfig" - }, - "validateResponseValues": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to validate response values" - }, - "allowExtensibleSchema": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to allow extensible schema validation" - }, - "timeoutInMilliseconds": { - "type": [ - "integer", - "null" - ], - "description": "Test timeout in milliseconds" - }, - "strictMode": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to enable strict mode for contract testing" - } - } + "virtualService": { + "$ref": "#/definitions/VirtualServiceConfiguration", + "description": "Virtual service configuration" }, - "ResiliencyTestsConfig": { - "type": "object", - "description": "Configuration for resiliency tests", - "additionalProperties": false, - "properties": { - "enable": { - "type": [ - "string", - "null" - ], - "enum": [ - "all", - "positiveOnly", - "none" - ], - "description": "Level of resiliency tests to enable" - } - } + "examples": { + "type": "array", + "description": "List of example file paths", + "items": { + "type": "string" + } }, - "StubConfiguration": { - "type": "object", - "description": "Stub/mock server configuration", - "additionalProperties": false, - "properties": { - "generative": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to enable generative stubbing" - }, - "delayInMilliseconds": { - "type": [ - "integer", - "null" - ], - "description": "Delay to add to stub responses in milliseconds" - }, - "dictionary": { - "type": [ - "string", - "null" - ], - "description": "Path to dictionary file for generative stubbing" - }, - "includeMandatoryAndRequestedKeysInResponse": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to include mandatory and requested keys in response" - }, - "startTimeoutInMilliseconds": { - "type": [ - "integer", - "null" - ], - "description": "Timeout for stub server startup in milliseconds" - }, - "hotReload": { - "type": [ - "string", - "null" - ], - "description": "Hot reload configuration" - }, - "strictMode": { - "type": [ - "boolean", - "null" - ], - "description": "Whether to enable strict mode for stubbing" - } - } + "workflow": { + "$ref": "#/definitions/WorkflowConfiguration", + "description": "Workflow configuration for ID management" }, - "VirtualServiceConfiguration": { - "type": "object", - "description": "Virtual service configuration", - "additionalProperties": false, - "properties": { - "nonPatchableKeys": { - "type": "array", - "description": "List of keys that cannot be patched", - "items": { - "type": "string" - } - } - } + "ignoreInlineExamples": { + "type": ["boolean", "null"], + "description": "Whether to ignore inline examples in specifications" }, - "WorkflowConfiguration": { - "type": "object", - "description": "Workflow configuration for ID management", - "additionalProperties": false, - "properties": { - "ids": { - "type": "object", - "description": "ID operation configurations", - "additionalProperties": { - "$ref": "#/definitions/WorkflowIDOperation" - } - } - } + "additionalExampleParamsFilePath": { + "type": ["string", "null"], + "description": "Path to additional example parameters file" }, - "WorkflowIDOperation": { - "type": "object", - "description": "Configuration for ID operations in workflow", - "additionalProperties": false, - "properties": { - "extract": { - "type": [ - "string", - "null" - ], - "description": "JSONPath expression to extract ID" - }, - "use": { - "type": [ - "string", - "null" - ], - "description": "JSONPath expression to use extracted ID" - } - } + "attributeSelectionPattern": { + "$ref": "#/definitions/AttributeSelectionPattern", + "description": "Pattern for selecting attributes in responses" }, - "AttributeSelectionPattern": { - "type": "object", - "additionalProperties": false, - "description": "Pattern for selecting attributes in API responses", - "properties": { - "default_fields": { - "type": [ - "array", - "null" - ], - "description": "Default fields to include", - "items": { - "type": "string" - } - }, - "query_param_key": { - "type": [ - "string", - "null" - ], - "description": "Query parameter key for field selection" - } - } + "allPatternsMandatory": { + "type": ["boolean", "null"], + "description": "Whether all patterns are mandatory" }, - "SpecsArray": { - "type": "array", - "items": { - "type": "string" + "defaultPatternValues": { + "type": "object", + "description": "Default values for patterns", + "additionalProperties": true + } + } + }, + "ContractConfig": { + "type": "object", + "title": "ContractConfig", + "description": "Defines a contract source and its provides/consumes configuration.", + "additionalProperties": false, + "properties": { + "git": { + "type": "object", + "description": "Git contract source details.", + "additionalProperties": false, + "properties": { + "url": { + "type": ["string", "null"], + "description": "URL of the git repository." }, - "minItems": 1 - }, - "StringValue": { - "type": "string", - "description": "A single spec path." - }, - "ObjectValueFullUrl": { - "type": "object", - "additionalProperties": false, - "required": [ - "baseUrl", - "specs" - ], - "properties": { - "baseUrl": { - "type": "string" - }, - "specs": { - "$ref": "#/definitions/SpecsArray" - }, - "resiliencyTests": { - "$ref": "#/definitions/ResiliencyTestsConfig" - } - } - }, - "ObjectValuePartialUrl": { - "type": "object", - "required": [ - "specs" - ], + "branch": { + "type": ["string", "null"], + "description": "Branch name in the git repository." + }, + "matchBranch": { + "type": "boolean" + } + }, + "required": [] + }, + "filesystem": { + "type": "object", + "description": "Filesystem contract source details.", + "additionalProperties": false, + "properties": { + "directory": { + "type": "string", + "description": "Directory path for contract files." + } + }, + "required": [] + }, + "provides": { + "type": ["array", "null"], + "description": "List of specs provided for testing. Each entry can be a string or an object.", + "items": { "anyOf": [ - { - "required": ["host"], - "properties": { - "host": { - "type": "string" - } - } - }, - { - "required": ["port"], - "properties": { - "port": { - "type": "integer" - } - } - } - ], - "properties": { - "specs": { - "$ref": "#/definitions/SpecsArray" - }, - "host": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "basePath": { - "type": "string" - }, - "resiliencyTests": { - "$ref": "#/definitions/ResiliencyTestsConfig" - } - } - }, - "ConfigValue": { - "type": "object", - "additionalProperties": false, - "required": [ - "specs", - "specType", - "config" - ], - "properties": { - "specs": { - "$ref": "#/definitions/SpecsArray" - }, - "specType": { - "type": "string" - }, - "config": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - } - ] - } - } - } - }, - "ConfigValueScalarOrComposite": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ConfigValueScalarOrComposite" - } - } + { + "$ref": "#/definitions/StringValue" + }, + { + "$ref": "#/definitions/ObjectValueFullUrl" + }, + { + "$ref": "#/definitions/ObjectValuePartialUrl" + }, + { + "$ref": "#/definitions/ConfigValue" + } ] + } }, - "SubstitutionExpression": { - "type": "string", - "pattern": "^\\$\\{[^}]+\\}$" - }, - "GuardedSubstitutionString": { - "type": "string", - "allOf": [ - { - "if": { - "pattern": "^\\$\\{" - }, - "then": { - "$ref": "#/definitions/SubstitutionExpression" - }, - "else": { - - } - } + "consumes": { + "type": ["array", "null"], + "description": "List of specs consumed for stubbing. Each entry can be a string or an object.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/StringValue" + }, + { + "$ref": "#/definitions/ObjectValueFullUrl" + }, + { + "$ref": "#/definitions/ObjectValuePartialUrl" + }, + { + "$ref": "#/definitions/ConfigValue" + } ] + } + } + }, + "required": [] + }, + "Auth": { + "type": "object", + "additionalProperties": false, + "description": "Authentication configuration", + "properties": { + "bearer-file": { + "type": "string", + "description": "Path to file containing bearer token" + }, + "bearer-environment-variable": { + "type": ["string", "null"], + "description": "Environment variable name containing bearer token" + } + } + }, + "Pipeline": { + "type": "object", + "additionalProperties": false, + "description": "Azure DevOps pipeline configuration", + "properties": { + "provider": { + "type": "string", + "enum": ["azure"], + "description": "Pipeline provider type" + }, + "organization": { + "type": "string", + "description": "Azure DevOps organization name" + }, + "project": { + "type": "string", + "description": "Azure DevOps project name" + }, + "definitionId": { + "type": "integer", + "description": "Pipeline definition ID" + } + } + }, + "Environment": { + "type": "object", + "additionalProperties": false, + "description": "Environment-specific configuration", + "properties": { + "baseurls": { + "type": ["object", "null"], + "description": "Base URLs for different services", + "additionalProperties": { + "type": "string" + } }, - "SubstitutableString": { + "variables": { + "type": ["object", "null"], + "description": "Environment variables", + "additionalProperties": { "type": "string" + } + } + } + }, + "RepositoryInfo": { + "type": "object", + "additionalProperties": false, + "description": "Repository information", + "properties": { + "provider": { + "type": "string", + "description": "Repository provider type" + }, + "collectionName": { + "type": "string", + "description": "Name of the collection" + } + } + }, + "ReportConfigurationDetails": { + "type": "object", + "additionalProperties": false, + "description": "Report generation configuration", + "properties": { + "formatters": { + "type": ["array", "null"], + "description": "List of report formatters", + "items": { + "$ref": "#/definitions/ReportFormatterDetails" + }, + "deprecated": true + }, + "types": { + "$ref": "#/definitions/ReportTypes" + } + } + }, + "ReportFormatterDetails": { + "type": "object", + "additionalProperties": false, + "deprecated": true, + "description": "Configuration for a specific report formatter", + "properties": { + "type": { + "type": ["string", "null"], + "enum": ["text", "html", "ctrf"], + "description": "Type of report formatter" + }, + "layout": { + "type": ["string", "null"], + "enum": ["table"], + "description": "Layout style for the report" + }, + "lite": { + "type": ["boolean", "null"], + "description": "Whether to generate a lite version of the report" + }, + "title": { + "type": ["string", "null"], + "description": "Title for the report" + }, + "logo": { + "type": ["string", "null"], + "description": "Path to logo image for the report" + }, + "logoAltText": { + "type": ["string", "null"], + "description": "Alt text for the logo" + }, + "heading": { + "type": ["string", "null"], + "description": "Heading for the report" + }, + "outputDirectory": { + "type": ["string", "null"], + "description": "Directory to output the report" + } + } + }, + "ReportTypes": { + "type": "object", + "additionalProperties": false, + "description": "Configuration for different report types", + "properties": { + "APICoverage": { + "$ref": "#/definitions/APICoverage" + } + } + }, + "APICoverage": { + "type": "object", + "additionalProperties": false, + "description": "API coverage report configuration", + "properties": { + "OpenAPI": { + "$ref": "#/definitions/APICoverageConfiguration" + } + } + }, + "APICoverageConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "OpenAPI coverage configuration", + "properties": { + "successCriteria": { + "$ref": "#/definitions/SuccessCriteria" + }, + "excludedEndpoints": { + "type": ["array", "null"], + "description": "List of endpoints to exclude from coverage", + "items": { + "type": "string" + } + } + } + }, + "SuccessCriteria": { + "type": "object", + "additionalProperties": false, + "description": "Success criteria for API coverage", + "properties": { + "minThresholdPercentage": { + "type": ["integer", "null"], + "description": "Minimum coverage percentage threshold" + }, + "maxMissedEndpointsInSpec": { + "type": ["integer", "null"], + "description": "Maximum number of missed endpoints allowed" + }, + "enforce": { + "type": ["boolean", "null"], + "description": "Whether to enforce the success criteria" + } + } + }, + "SecurityConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "Security configuration", + "properties": { + "OpenAPI": { + "$ref": "#/definitions/OpenAPISecurityConfiguration" + } + } + }, + "OpenAPISecurityConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "OpenAPI security configuration", + "properties": { + "securitySchemes": { + "type": "object", + "description": "Security scheme configurations", + "additionalProperties": { + "$ref": "#/definitions/SecuritySchemeConfiguration" + } + } + } + }, + "SecuritySchemeConfiguration": { + "type": "object", + "description": "Configuration for a security scheme", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["oauth2", "basicAuth", "bearer", "apiKey"], + "description": "Type of security scheme" + }, + "token": { + "type": ["string", "null"], + "description": "Authentication token" + }, + "value": { + "type": ["string", "null"], + "description": "Authentication value" + } + } + }, + "TestConfiguration": { + "type": "object", + "description": "Test execution configuration", + "additionalProperties": false, + "properties": { + "resiliencyTests": { + "$ref": "#/definitions/ResiliencyTestsConfig" + }, + "validateResponseValues": { + "type": ["boolean", "null"], + "description": "Whether to validate response values" + }, + "allowExtensibleSchema": { + "type": ["boolean", "null"], + "description": "Whether to allow extensible schema validation" + }, + "timeoutInMilliseconds": { + "type": ["integer", "null"], + "description": "Test timeout in milliseconds" + }, + "strictMode": { + "type": ["boolean", "null"], + "description": "Whether to enable strict mode for contract testing" + } + } + }, + "ResiliencyTestsConfig": { + "type": "object", + "description": "Configuration for resiliency tests", + "additionalProperties": false, + "properties": { + "enable": { + "type": ["string", "null"], + "enum": ["all", "positiveOnly", "none"], + "description": "Level of resiliency tests to enable" + } + } + }, + "StubConfiguration": { + "type": "object", + "description": "Stub/mock server configuration", + "additionalProperties": false, + "properties": { + "generative": { + "type": ["boolean", "null"], + "description": "Whether to enable generative stubbing" + }, + "delayInMilliseconds": { + "type": ["integer", "null"], + "description": "Delay to add to stub responses in milliseconds" + }, + "dictionary": { + "type": ["string", "null"], + "description": "Path to dictionary file for generative stubbing" + }, + "includeMandatoryAndRequestedKeysInResponse": { + "type": ["boolean", "null"], + "description": "Whether to include mandatory and requested keys in response" + }, + "startTimeoutInMilliseconds": { + "type": ["integer", "null"], + "description": "Timeout for stub server startup in milliseconds" + }, + "hotReload": { + "type": ["string", "null"], + "description": "Hot reload configuration" + }, + "strictMode": { + "type": ["boolean", "null"], + "description": "Whether to enable strict mode for stubbing" + } + } + }, + "VirtualServiceConfiguration": { + "type": "object", + "description": "Virtual service configuration", + "additionalProperties": false, + "properties": { + "nonPatchableKeys": { + "type": "array", + "description": "List of keys that cannot be patched", + "items": { + "type": "string" + } + } + } + }, + "WorkflowConfiguration": { + "type": "object", + "description": "Workflow configuration for ID management", + "additionalProperties": false, + "properties": { + "ids": { + "type": "object", + "description": "ID operation configurations", + "additionalProperties": { + "$ref": "#/definitions/WorkflowIDOperation" + } + } + } + }, + "WorkflowIDOperation": { + "type": "object", + "description": "Configuration for ID operations in workflow", + "additionalProperties": false, + "properties": { + "extract": { + "type": ["string", "null"], + "description": "JSONPath expression to extract ID" + }, + "use": { + "type": ["string", "null"], + "description": "JSONPath expression to use extracted ID" + } + } + }, + "AttributeSelectionPattern": { + "type": "object", + "additionalProperties": false, + "description": "Pattern for selecting attributes in API responses", + "properties": { + "default_fields": { + "type": ["array", "null"], + "description": "Default fields to include", + "items": { + "type": "string" + } }, - "SubstitutableStringArray": { - "type": "array", - "items": { - "$ref": "#/definitions/SubstitutableString" + "query_param_key": { + "type": ["string", "null"], + "description": "Query parameter key for field selection" + } + } + }, + "SpecsArray": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "StringValue": { + "type": "string", + "description": "A single spec path." + }, + "ObjectValueFullUrl": { + "type": "object", + "additionalProperties": false, + "required": ["baseUrl", "specs"], + "properties": { + "baseUrl": { + "type": "string" + }, + "specs": { + "$ref": "#/definitions/SpecsArray" + }, + "resiliencyTests": { + "$ref": "#/definitions/ResiliencyTestsConfig" + } + } + }, + "ObjectValuePartialUrl": { + "type": "object", + "required": ["specs"], + "anyOf": [ + { + "required": ["host"], + "properties": { + "host": { + "type": "string" } + } }, - "SubstitutableInteger": { - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/definitions/GuardedSubstitutionString" - } - ] + { + "required": ["port"], + "properties": { + "port": { + "type": "integer" + } + } + } + ], + "properties": { + "specs": { + "$ref": "#/definitions/SpecsArray" }, - "SubstitutableFloat": { - "oneOf": [ - { - "type": "number" - }, - { - "$ref": "#/definitions/GuardedSubstitutionString" - } - ] + "host": { + "type": "string" }, - "SubstitutableBoolean": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/definitions/GuardedSubstitutionString" - } - ] + "port": { + "type": "integer" + }, + "basePath": { + "type": "string" }, - "SubstitutableStringOrArray": { + "resiliencyTests": { + "$ref": "#/definitions/ResiliencyTestsConfig" + } + } + }, + "ConfigValue": { + "type": "object", + "additionalProperties": false, + "required": ["specs", "specType", "config"], + "properties": { + "specs": { + "$ref": "#/definitions/SpecsArray" + }, + "specType": { + "type": "string" + }, + "config": { + "type": "object", + "additionalProperties": { "oneOf": [ - { - "$ref": "#/definitions/SubstitutableString" - }, - { - "$ref": "#/definitions/SubstitutableStringArray" + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" } + } ] + } + } + } + }, + "ConfigValueScalarOrComposite": { + "oneOf": [ + { + "type": "string" }, - "Reference": { - "type": "object", - "additionalProperties": true, - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - } - } + { + "type": "integer" }, - "DependenciesDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "services": { - "$ref": "#/definitions/MockRuntimeServiceDefinitionOrRefArray" - }, - "data": { - "$ref": "#/definitions/DataDefinition" - }, - "settings": { - "$ref": "#/definitions/MockSettingsOrRef" - } - } + { + "type": "number" }, - "MockRuntimeServiceDefinitionOrRefArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "service" - ], - "properties": { - "service": { - "$ref": "#/definitions/MockRuntimeServiceDefinition" - } - } - } + { + "type": "boolean" }, - "MockRuntimeServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "description": { - "type": "string" - }, - "$ref": { - "type": "string" - }, - "definitions": { - "$ref": "#/definitions/SpecificationStaticDefinitionArray" - }, - "runOptions": { - "$ref": "#/definitions/MockRunOptionsOrRef" - }, - "data": { - "$ref": "#/definitions/DataDefinition" - }, - "settings": { - "$ref": "#/definitions/MockSettingsOrRef" - } - }, - "oneOf": [ - { - "required": ["$ref"], - "properties": { - "$ref": {} - }, - "not": { - "required": ["definitions"], - "properties": { - "definitions": {} - } - } - }, - { - "required": ["definitions"], - "properties": { - "definitions": {} - }, - "not": { - "required": ["$ref"], - "properties": { - "$ref": {} - } - } - } - ] + { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } }, - "SystemUnderTestServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "service": { - "$ref": "#/definitions/TestRuntimeServiceDefinition" - } - } + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConfigValueScalarOrComposite" + } + } + ] + }, + "SubstitutionExpression": { + "type": "string", + "pattern": "^\\$\\{[^}]+\\}$" + }, + "GuardedSubstitutionString": { + "type": "string", + "allOf": [ + { + "if": { + "pattern": "^\\$\\{" + }, + "then": { + "$ref": "#/definitions/SubstitutionExpression" + }, + "else": {} + } + ] + }, + "SubstitutableString": { + "type": "string" + }, + "SubstitutableStringArray": { + "type": "array", + "items": { + "$ref": "#/definitions/SubstitutableString" + } + }, + "SubstitutableInteger": { + "anyOf": [ + { + "type": "integer" }, - "TestRuntimeServiceDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "$ref": { "type": "string" }, - "definitions": { - "$ref": "#/definitions/SpecificationStaticDefinitionArray" - }, - - "description": { "type": "string" }, - "runOptions": { "$ref": "#/definitions/TestRunOptionsOrRef" }, - "data": { "$ref": "#/definitions/DataDefinition" }, - "settings": { "$ref": "#/definitions/TestSettingsOrRef" } - }, - "oneOf": [ - { - "required": ["$ref"], - "properties": { - "$ref": {} - }, - "not": { - "required": ["definitions"], - "properties": { - "definitions": {} - } - } - }, - { - "required": ["definitions"], - "properties": { - "definitions": {} - }, - "not": { - "required": ["$ref"], - "properties": { - "$ref": {} - } - } - } - ] + { + "$ref": "#/definitions/GuardedSubstitutionString" + } + ] + }, + "SubstitutableFloat": { + "oneOf": [ + { + "type": "number" }, - "DataDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "examples": { - "$ref": "#/definitions/ArrayExampleConfigurationOrRef" - }, - "dictionary": { - "$ref": "#/definitions/DictionaryConfigurationOrRef" - }, - "adapters": { - "$ref": "#/definitions/AdapterConfigurationOrRef" - } - } + { + "$ref": "#/definitions/GuardedSubstitutionString" + } + ] + }, + "SubstitutableBoolean": { + "oneOf": [ + { + "type": "boolean" }, - "ProxyDefinitionsArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "proxy" - ], - "properties": { - "proxy": { - "$ref": "#/definitions/ProxyDefinition" - } - } - } + { + "$ref": "#/definitions/GuardedSubstitutionString" + } + ] + }, + "SubstitutableStringOrArray": { + "oneOf": [ + { + "$ref": "#/definitions/SubstitutableString" }, - "ProxyDefinition": { - "type": "object", - "additionalProperties": false, - "required": [ - "target" - ], - "properties": { - "target": { - "$ref": "#/definitions/SubstitutableString" - }, - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "timeoutInMilliseconds": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "adapters": { - "$ref": "#/definitions/AdapterConfigurationOrRef" - }, - "mock": { - "$ref": "#/definitions/SubstitutableStringOrArray" - }, - "cert": { - "$ref": "#/definitions/CertConfigurationOrRef" - }, - "recordingsDirectory": { - "$ref": "#/definitions/SubstitutableString" - } - } + { + "$ref": "#/definitions/SubstitutableStringArray" + } + ] + }, + "Reference": { + "type": "object", + "additionalProperties": true, + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + } + } + }, + "DependenciesDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "services": { + "$ref": "#/definitions/MockRuntimeServiceDefinitionOrRefArray" + }, + "data": { + "$ref": "#/definitions/DataDefinition" + }, + "settings": { + "$ref": "#/definitions/MockSettingsOrRef" + } + } + }, + "MockRuntimeServiceDefinitionOrRefArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["service"], + "properties": { + "service": { + "$ref": "#/definitions/MockRuntimeServiceDefinition" + } + } + } + }, + "MockRuntimeServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "$ref": { + "type": "string" }, - "McpDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "test": { - "$ref": "#/definitions/McpTestRunOptions" - } - } + "description": { + "type": "string" }, - "McpTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "transportKind": { - "anyOf": [ - { - "type": "string", - "enum": [ - "STREAMABLE_HTTP" - ] - }, - { - "$ref": "#/definitions/SubstitutableString" - } - ] - }, - "enableResiliencyTests": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "dictionaryFile": { - "$ref": "#/definitions/SubstitutableString" - }, - "bearerToken": { - "$ref": "#/definitions/SubstitutableString" - }, - "filterTools": { - "$ref": "#/definitions/SubstitutableStringArray" - }, - "skipTools": { - "$ref": "#/definitions/SubstitutableStringArray" - } - } + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" }, - "SpecmaticDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "license": { - "$ref": "#/definitions/LicenseDefinition" - }, - "governance": { - "type": "object", - "additionalProperties": false, - "properties": { - "report": { - "$ref": "#/definitions/ReportsDefinition" - }, - "successCriteria": { - "$ref": "#/definitions/SuccessCriteriaDefinition" - } - } - }, - "settings": { - "$ref": "#/definitions/ConcreteSettingsOrRef" - } - } + "runOptions": { + "$ref": "#/definitions/MockRunOptionsOrRef" + }, + "data": { + "$ref": "#/definitions/DataDefinition" }, - "LicenseDefinition": { - "type": "object", - "additionalProperties": false, + "settings": { + "$ref": "#/definitions/MockSettingsOrRef" + } + }, + "oneOf": [ + { + "required": ["$ref"], + "properties": { + "$ref": {} + }, + "not": { + "required": ["definitions"], "properties": { - "path": { - "$ref": "#/definitions/SubstitutableString" - } + "definitions": {} } + } }, - "ReportsDefinition": { - "type": "object", - "additionalProperties": false, + { + "required": ["definitions"], + "properties": { + "definitions": {} + }, + "not": { + "required": ["$ref"], "properties": { - "formats": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "html", - "ctrf" - ] - } - }, - { - "$ref": "#/definitions/SubstitutableString" - } - ] - }, - "outputDirectory": { - "$ref": "#/definitions/SubstitutableString" - } + "$ref": {} } + } + } + ] + }, + "SystemUnderTestServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "service": { + "$ref": "#/definitions/TestRuntimeServiceDefinition" + } + } + }, + "TestRuntimeServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "$ref": { "type": "string" }, + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" }, - "SuccessCriteriaDefinition": { - "type": "object", - "additionalProperties": false, + + "description": { "type": "string" }, + "runOptions": { "$ref": "#/definitions/TestRunOptionsOrRef" }, + "data": { "$ref": "#/definitions/DataDefinition" }, + "settings": { "$ref": "#/definitions/TestSettingsOrRef" } + }, + "oneOf": [ + { + "required": ["$ref"], + "properties": { + "$ref": {} + }, + "not": { + "required": ["definitions"], "properties": { - "minCoveragePercentage": { - "$ref": "#/definitions/SubstitutableFloat" - }, - "maxMissedOperationsInSpec": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "enforce": { - "$ref": "#/definitions/SubstitutableBoolean" - } + "definitions": {} } + } }, - "StaticServiceDefinition": { - "type": "object", - "additionalProperties": false, + { + "required": ["definitions"], + "properties": { + "definitions": {} + }, + "not": { + "required": ["$ref"], "properties": { - "description": { - "type": "string" - }, - "definitions": { - "$ref": "#/definitions/SpecificationStaticDefinitionArray" - } + "$ref": {} } + } + } + ] + }, + "DataDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "examples": { + "$ref": "#/definitions/ArrayExampleConfigurationOrRef" + }, + "dictionary": { + "$ref": "#/definitions/DictionaryConfigurationOrRef" + }, + "adapters": { + "$ref": "#/definitions/AdapterConfigurationOrRef" + } + } + }, + "ProxyDefinitionsArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["proxy"], + "properties": { + "proxy": { + "$ref": "#/definitions/ProxyDefinition" + } + } + } + }, + "ProxyDefinition": { + "type": "object", + "additionalProperties": false, + "required": ["target"], + "properties": { + "target": { + "$ref": "#/definitions/SubstitutableString" }, - "SpecificationStaticDefinitionArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "definition" - ], - "properties": { - "definition": { - "$ref": "#/definitions/SpecificationStaticDefinition" - } - } - } + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" }, - "SpecificationStaticDefinition": { - "type": "object", - "additionalProperties": false, - "required": [ - "source", - "specs" - ], - "properties": { - "source": { - "$ref": "#/definitions/SourceSchemaOrRef" - }, - "specs": { - "type": "array", - "items": { - "$ref": "#/definitions/SpecificationSchema" - } - } - } + "timeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" }, - "SpecificationSchema": { - "oneOf": [ - { - "$ref": "#/definitions/SpecificationPath" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "spec": { - "$ref": "#/definitions/SpecificationObject" - } - } - } - ] + "adapters": { + "$ref": "#/definitions/AdapterConfigurationOrRef" }, - "SpecificationPath": { - "type": "string" + "mock": { + "$ref": "#/definitions/SubstitutableStringOrArray" }, - "SpecificationObject": { - "type": "object", - "additionalProperties": false, - "required": [ - "path" - ], - "properties": { - "id": { - "type": "string" - }, - "path": { - "type": "string" - }, - "urlPathPrefix": { - "$ref": "#/definitions/SubstitutableString" - } - } + "cert": { + "$ref": "#/definitions/CertConfigurationOrRef" }, - "SourceSchemaOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" + "recordingsDirectory": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "McpDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "test": { + "$ref": "#/definitions/McpTestRunOptions" + } + } + }, + "McpTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "transportKind": { + "anyOf": [ + { + "type": "string", + "enum": ["STREAMABLE_HTTP"] }, - "else": { - "$ref": "#/definitions/SourceSchema" + { + "$ref": "#/definitions/SubstitutableString" } + ] }, - "SourceSchema": { - "oneOf": [ - { - "$ref": "#/definitions/GitSourceSchema" - }, - { - "$ref": "#/definitions/FileSystemSourceSchema" - } - ] + "enableResiliencyTests": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "GitSourceSchema": { - "type": "object", - "additionalProperties": false, - "required": [ - "git" - ], - "properties": { - "git": { - "$ref": "#/definitions/GitSourceOptions" - } - } + "dictionaryFile": { + "$ref": "#/definitions/SubstitutableString" }, - "GitSourceOptions": { - "type": "object", - "additionalProperties": false, - "required": [ - "url" - ], - "properties": { - "url": { - "$ref": "#/definitions/SubstitutableString" - }, - "branch": { - "$ref": "#/definitions/SubstitutableString" - }, - "matchBranch": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "auth": { - "$ref": "#/definitions/GitSourceAuthentication" - } - } + "bearerToken": { + "$ref": "#/definitions/SubstitutableString" }, - "GitSourceAuthentication": { - "oneOf": [ - { - "$ref": "#/definitions/GitSourceBearerFileAuthentication" - }, - { - "$ref": "#/definitions/GitSourceBearerEnvAuthentication" - }, - { - "$ref": "#/definitions/GitSourcePersonalAccessTokenAuthentication" - } - ] + "filterTools": { + "$ref": "#/definitions/SubstitutableStringArray" }, - "GitSourceBearerFileAuthentication": { - "type": "object", - "additionalProperties": false, - "required": [ - "bearerFile" - ], - "properties": { - "bearerFile": { - "$ref": "#/definitions/SubstitutableString" - } + "skipTools": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "SpecmaticDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "license": { + "$ref": "#/definitions/LicenseDefinition" + }, + "governance": { + "type": "object", + "additionalProperties": false, + "properties": { + "report": { + "$ref": "#/definitions/ReportsDefinition" + }, + "successCriteria": { + "$ref": "#/definitions/SuccessCriteriaDefinition" } + } }, - "GitSourceBearerEnvAuthentication": { - "type": "object", - "additionalProperties": false, - "required": [ - "bearerEnvironmentVariable" - ], - "properties": { - "bearerEnvironmentVariable": { - "$ref": "#/definitions/SubstitutableString" - } + "settings": { + "$ref": "#/definitions/ConcreteSettingsOrRef" + } + } + }, + "LicenseDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "ReportsDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "formats": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": ["html", "ctrf"] + } + }, + { + "$ref": "#/definitions/SubstitutableString" } + ] }, - "GitSourcePersonalAccessTokenAuthentication": { - "type": "object", - "additionalProperties": false, - "required": [ - "personalAccessToken" - ], - "properties": { - "personalAccessToken": { - "$ref": "#/definitions/SubstitutableString" - } - } + "outputDirectory": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "SuccessCriteriaDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "minCoveragePercentage": { + "$ref": "#/definitions/SubstitutableFloat" + }, + "maxMissedOperationsInSpec": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "enforce": { + "$ref": "#/definitions/SubstitutableBoolean" + } + } + }, + "StaticServiceDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "definitions": { + "$ref": "#/definitions/SpecificationStaticDefinitionArray" + } + } + }, + "SpecificationStaticDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["definition"], + "properties": { + "definition": { + "$ref": "#/definitions/SpecificationStaticDefinition" + } + } + } + }, + "SpecificationStaticDefinition": { + "type": "object", + "additionalProperties": false, + "required": ["source", "specs"], + "properties": { + "source": { + "$ref": "#/definitions/SourceSchemaOrRef" + }, + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/SpecificationSchema" + } + } + } + }, + "SpecificationSchema": { + "oneOf": [ + { + "$ref": "#/definitions/SpecificationPath" }, - "FileSystemSourceSchema": { - "type": "object", - "additionalProperties": false, - "required": [ - "filesystem" - ], - "properties": { - "filesystem": { - "$ref": "#/definitions/FileSystemSourceOptions" - } + { + "type": "object", + "additionalProperties": false, + "properties": { + "spec": { + "$ref": "#/definitions/SpecificationObject" } + } + } + ] + }, + "SpecificationPath": { + "type": "string" + }, + "SpecificationObject": { + "type": "object", + "additionalProperties": false, + "required": ["path"], + "properties": { + "id": { + "type": "string" + }, + "path": { + "type": "string" + }, + "urlPathPrefix": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "SourceSchemaOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/SourceSchema" + } + }, + "SourceSchema": { + "oneOf": [ + { + "$ref": "#/definitions/GitSourceSchema" }, - "FileSystemSourceOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "directory": { - "$ref": "#/definitions/SubstitutableString" - } - } + { + "$ref": "#/definitions/FileSystemSourceSchema" + } + ] + }, + "GitSourceSchema": { + "type": "object", + "additionalProperties": false, + "required": ["git"], + "properties": { + "git": { + "$ref": "#/definitions/GitSourceOptions" + } + } + }, + "GitSourceOptions": { + "type": "object", + "additionalProperties": false, + "required": ["url"], + "properties": { + "url": { + "$ref": "#/definitions/SubstitutableString" + }, + "branch": { + "$ref": "#/definitions/SubstitutableString" + }, + "matchBranch": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "auth": { + "$ref": "#/definitions/GitSourceAuthentication" + } + } + }, + "GitSourceAuthentication": { + "oneOf": [ + { + "$ref": "#/definitions/GitSourceBearerFileAuthentication" }, - "RunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "openapi": { - "$ref": "#/definitions/OpenApiRunOptions" - }, - "wsdl": { - "$ref": "#/definitions/WsdlRunOptions" - }, - "asyncapi": { - "$ref": "#/definitions/AsyncApiRunOptions" - }, - "graphqlsdl": { - "$ref": "#/definitions/GraphQLSdlRunOptions" - }, - "protobuf": { - "$ref": "#/definitions/ProtobufRunOptions" - } - } + { + "$ref": "#/definitions/GitSourceBearerEnvAuthentication" }, - "TestRunOptionsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/TestRunOptions" - } + { + "$ref": "#/definitions/GitSourcePersonalAccessTokenAuthentication" + } + ] + }, + "GitSourceBearerFileAuthentication": { + "type": "object", + "additionalProperties": false, + "required": ["bearerFile"], + "properties": { + "bearerFile": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "GitSourceBearerEnvAuthentication": { + "type": "object", + "additionalProperties": false, + "required": ["bearerEnvironmentVariable"], + "properties": { + "bearerEnvironmentVariable": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "GitSourcePersonalAccessTokenAuthentication": { + "type": "object", + "additionalProperties": false, + "required": ["personalAccessToken"], + "properties": { + "personalAccessToken": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "FileSystemSourceSchema": { + "type": "object", + "additionalProperties": false, + "required": ["filesystem"], + "properties": { + "filesystem": { + "$ref": "#/definitions/FileSystemSourceOptions" + } + } + }, + "FileSystemSourceOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "directory": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "RunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/definitions/OpenApiRunOptions" }, - "TestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "openapi": { - "$ref": "#/definitions/OpenApiTestRunOptions" - }, - "wsdl": { - "$ref": "#/definitions/WsdlTestRunOptions" - }, - "asyncapi": { - "$ref": "#/definitions/AsyncApiTestRunOptions" - }, - "graphqlsdl": { - "$ref": "#/definitions/GraphqlSdlTestRunOptions" - }, - "protobuf": { - "$ref": "#/definitions/ProtobufTestRunOptions" - } - } + "wsdl": { + "$ref": "#/definitions/WsdlRunOptions" }, - "MockRunOptionsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/MockRunOptions" - } + "asyncapi": { + "$ref": "#/definitions/AsyncApiRunOptions" }, - "MockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "openapi": { - "$ref": "#/definitions/OpenApiMockRunOptions" - }, - "wsdl": { - "$ref": "#/definitions/WsdlMockRunOptions" - }, - "asyncapi": { - "$ref": "#/definitions/AsyncApiMockRunOptions" - }, - "graphqlsdl": { - "$ref": "#/definitions/GraphqlSdlMockRunOptions" - }, - "protobuf": { - "$ref": "#/definitions/ProtobufMockRunOptions" - } - } + "graphqlsdl": { + "$ref": "#/definitions/GraphQLSdlRunOptions" }, - "OpenApiRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/definitions/OpenApiTestRunOptions" - }, - "else": { - "$ref": "#/definitions/OpenApiMockRunOptions" - } + "protobuf": { + "$ref": "#/definitions/ProtobufRunOptions" + } + } + }, + "TestRunOptionsOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/TestRunOptions" + } + }, + "TestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/definitions/OpenApiTestRunOptions" }, - "AsyncApiRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/definitions/AsyncApiTestRunOptions" - }, - "else": { - "$ref": "#/definitions/AsyncApiMockRunOptions" - } + "wsdl": { + "$ref": "#/definitions/WsdlTestRunOptions" }, - "GraphQLSdlRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/definitions/GraphqlSdlTestRunOptions" + "asyncapi": { + "$ref": "#/definitions/AsyncApiTestRunOptions" + }, + "graphqlsdl": { + "$ref": "#/definitions/GraphqlSdlTestRunOptions" + }, + "protobuf": { + "$ref": "#/definitions/ProtobufTestRunOptions" + } + } + }, + "MockRunOptionsOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/MockRunOptions" + } + }, + "MockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "openapi": { + "$ref": "#/definitions/OpenApiMockRunOptions" + }, + "wsdl": { + "$ref": "#/definitions/WsdlMockRunOptions" + }, + "asyncapi": { + "$ref": "#/definitions/AsyncApiMockRunOptions" + }, + "graphqlsdl": { + "$ref": "#/definitions/GraphqlSdlMockRunOptions" + }, + "protobuf": { + "$ref": "#/definitions/ProtobufMockRunOptions" + } + } + }, + "OpenApiRunOptions": { + "type": "object", + "required": ["type"], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/OpenApiTestRunOptions" + }, + "else": { + "$ref": "#/definitions/OpenApiMockRunOptions" + } + }, + "AsyncApiRunOptions": { + "type": "object", + "required": ["type"], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/AsyncApiTestRunOptions" + }, + "else": { + "$ref": "#/definitions/AsyncApiMockRunOptions" + } + }, + "GraphQLSdlRunOptions": { + "type": "object", + "required": ["type"], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/GraphqlSdlTestRunOptions" + }, + "else": { + "$ref": "#/definitions/GraphqlSdlMockRunOptions" + } + }, + "ProtobufRunOptions": { + "type": "object", + "required": ["type"], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/ProtobufTestRunOptions" + }, + "else": { + "$ref": "#/definitions/ProtobufMockRunOptions" + } + }, + "WsdlRunOptions": { + "type": "object", + "required": ["type"], + "if": { + "properties": { + "type": { + "const": "test" + } + } + }, + "then": { + "$ref": "#/definitions/WsdlTestRunOptions" + }, + "else": { + "$ref": "#/definitions/WsdlMockRunOptions" + } + }, + "WsdlTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "WsdlMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "cert": { + "$ref": "#/definitions/CertConfigurationOrRef" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "AsyncApiTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "replyTimeout": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "subscriberReadinessWaitTimeout": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/AsyncApiServerDefinition" + } + }, + "schemaRegistry": { + "$ref": "#/definitions/AsyncApiSchemaRegistry" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "AsyncApiServerDefinition": { + "type": "object", + "additionalProperties": false, + "required": ["host", "protocol"], + "properties": { + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "protocol": { + "$ref": "#/definitions/SubstitutableString" + }, + "adminCredentials": { + "$ref": "#/definitions/FreeFormObject" + }, + "client": { + "type": "object", + "additionalProperties": false, + "properties": { + "consumer": { + "$ref": "#/definitions/CertConfigurationOrRef" }, - "else": { - "$ref": "#/definitions/GraphqlSdlMockRunOptions" + "producer": { + "$ref": "#/definitions/CertConfigurationOrRef" } - }, - "ProtobufRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } + } + } + } + }, + "AsyncApiMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/AsyncApiServerDefinition" + } + }, + "schemaRegistry": { + "$ref": "#/definitions/AsyncApiSchemaRegistry" + }, + "inMemoryBroker": { + "type": "object", + "additionalProperties": false, + "properties": { + "host": { + "$ref": "#/definitions/SubstitutableString" }, - "then": { - "$ref": "#/definitions/ProtobufTestRunOptions" + "port": { + "$ref": "#/definitions/SubstitutableInteger" }, - "else": { - "$ref": "#/definitions/ProtobufMockRunOptions" + "logDir": { + "$ref": "#/definitions/SubstitutableString" } - }, - "WsdlRunOptions": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "const": "test" - } - } - }, - "then": { - "$ref": "#/definitions/WsdlTestRunOptions" + } + } + } + }, + "AsyncApiSchemaRegistry": { + "type": "object", + "additionalProperties": false, + "required": ["kind"], + "properties": { + "kind": { + "anyOf": [ + { + "type": "string", + "enum": ["CONFLUENT", "DEFAULT"] }, - "else": { - "$ref": "#/definitions/WsdlMockRunOptions" + { + "$ref": "#/definitions/SubstitutableString" } + ] }, - "WsdlTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "url": { + "$ref": "#/definitions/SubstitutableString" }, - "WsdlMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "cert": { - "$ref": "#/definitions/CertConfigurationOrRef" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "username": { + "$ref": "#/definitions/SubstitutableString" }, - "AsyncApiTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "replyTimeout": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "subscriberReadinessWaitTimeout": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/AsyncApiServerDefinition" - } - }, - "schemaRegistry": { - "$ref": "#/definitions/AsyncApiSchemaRegistry" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "password": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "GraphqlSdlTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "GraphqlSdlMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "ProtobufTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "importPaths": { + "$ref": "#/definitions/SubstitutableStringArray" + }, + "protocVersion": { + "$ref": "#/definitions/SubstitutableString" + }, + "requestTimeout": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "ProtobufMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "mock" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "importPaths": { + "$ref": "#/definitions/SubstitutableStringArray" + }, + "protocVersion": { + "$ref": "#/definitions/SubstitutableString" + }, + "specs": { + "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiTestRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "const": "test" }, - "AsyncApiServerDefinition": { - "type": "object", - "additionalProperties": false, - "required": [ - "host", - "protocol" - ], - "properties": { - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "protocol": { - "$ref": "#/definitions/SubstitutableString" - }, - "adminCredentials": { - "$ref": "#/definitions/FreeFormObject" - }, - "client": { - "type": "object", - "additionalProperties": false, - "properties": { - "consumer": { - "$ref": "#/definitions/CertConfigurationOrRef" - }, - "producer": { - "$ref": "#/definitions/CertConfigurationOrRef" - } - } - } - } + "host": { + "$ref": "#/definitions/SubstitutableString" }, - "AsyncApiMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/AsyncApiServerDefinition" - } - }, - "schemaRegistry": { - "$ref": "#/definitions/AsyncApiSchemaRegistry" - }, - "inMemoryBroker": { - "type": "object", - "additionalProperties": false, - "properties": { - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "logDir": { - "$ref": "#/definitions/SubstitutableString" - } - } - } - } + "port": { + "$ref": "#/definitions/SubstitutableInteger" }, - "AsyncApiSchemaRegistry": { - "type": "object", - "additionalProperties": false, - "required": [ - "kind" - ], - "properties": { - "kind": { - "anyOf": [ - { - "type": "string", - "enum": [ - "CONFLUENT", - "DEFAULT" - ] - }, - { - "$ref": "#/definitions/SubstitutableString" - } - ] - }, - "url": { - "$ref": "#/definitions/SubstitutableString" - }, - "username": { - "$ref": "#/definitions/SubstitutableString" - }, - "password": { - "$ref": "#/definitions/SubstitutableString" - } - } + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" }, - "GraphqlSdlTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "filter": { + "$ref": "#/definitions/SubstitutableString" }, - "GraphqlSdlMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "workflow": { + "$ref": "#/definitions/WorkflowConfigurationV3" }, - "ProtobufTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "importPaths": { - "$ref": "#/definitions/SubstitutableStringArray" - }, - "protocVersion": { - "$ref": "#/definitions/SubstitutableString" - }, - "requestTimeout": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "swaggerUiBaseUrl": { + "$ref": "#/definitions/SubstitutableString" }, - "ProtobufMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "mock" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "importPaths": { - "$ref": "#/definitions/SubstitutableStringArray" - }, - "protocVersion": { - "$ref": "#/definitions/SubstitutableString" - }, - "specs": { - "$ref": "#/definitions/SpecificationRuntimeDefinitionArray" - } - } + "swaggerUrl": { + "$ref": "#/definitions/SubstitutableString" }, - "OpenApiTestRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "const": "test" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "filter": { - "$ref": "#/definitions/SubstitutableString" - }, - "workflow": { - "$ref": "#/definitions/WorkflowConfigurationV3" - }, - "swaggerUiBaseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "swaggerUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "actuatorUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "specs": { - "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinitionArray" - } - } + "actuatorUrl": { + "$ref": "#/definitions/SubstitutableString" }, - "OpenApiMockRunOptions": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "enum": [ - "mock", - "stateful-mock" - ] - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "filter": { - "$ref": "#/definitions/SubstitutableString" - }, - "logMode": { - "anyOf": [ - { - "type": "string", - "enum": [ - "ALL", - "REQUEST_RESPONSE" - ] - }, - { - "$ref": "#/definitions/SubstitutableString" - } - ] - }, - "logsDirPath": { - "$ref": "#/definitions/SubstitutableString" - }, - "cert": { - "$ref": "#/definitions/CertConfigurationOrRef" - }, - "specs": { - "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinitionArray" - } + "specs": { + "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiMockRunOptions": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": ["mock", "stateful-mock"] + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "filter": { + "$ref": "#/definitions/SubstitutableString" + }, + "logMode": { + "anyOf": [ + { + "type": "string", + "enum": ["ALL", "REQUEST_RESPONSE"] + }, + { + "$ref": "#/definitions/SubstitutableString" } + ] }, - "OpenApiSpecificationRuntimeDefinitionArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "spec" - ], - "properties": { - "spec": { - "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinition" - } - } - } + "logsDirPath": { + "$ref": "#/definitions/SubstitutableString" }, - "SpecificationRuntimeDefinitionArray": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "spec" - ], - "properties": { - "spec": { - "$ref": "#/definitions/SpecificationRuntimeDefinition" - } - } - } + "cert": { + "$ref": "#/definitions/CertConfigurationOrRef" }, - "FreeFormObject": { - "type": "object", - "additionalProperties": {} + "specs": { + "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinitionArray" + } + } + }, + "OpenApiSpecificationRuntimeDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["spec"], + "properties": { + "spec": { + "$ref": "#/definitions/OpenApiSpecificationRuntimeDefinition" + } + } + } + }, + "SpecificationRuntimeDefinitionArray": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["spec"], + "properties": { + "spec": { + "$ref": "#/definitions/SpecificationRuntimeDefinition" + } + } + } + }, + "FreeFormObject": { + "type": "object", + "additionalProperties": {} + }, + "SpecificationRuntimeDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" }, - "SpecificationRuntimeDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "overlayFilePath": { - "$ref": "#/definitions/SubstitutableString" - } - } + "host": { + "$ref": "#/definitions/SubstitutableString" }, - "OpenApiSpecificationRuntimeDefinition": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "host": { - "$ref": "#/definitions/SubstitutableString" - }, - "port": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "baseUrl": { - "$ref": "#/definitions/SubstitutableString" - }, - "overlayFilePath": { - "$ref": "#/definitions/SubstitutableString" - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/SecuritySchemeConfigurationV3" - } - } - } + "port": { + "$ref": "#/definitions/SubstitutableInteger" }, - "SecuritySchemeConfigurationV3": { + "overlayFilePath": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "OpenApiSpecificationRuntimeDefinition": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "host": { + "$ref": "#/definitions/SubstitutableString" + }, + "port": { + "$ref": "#/definitions/SubstitutableInteger" + }, + "baseUrl": { + "$ref": "#/definitions/SubstitutableString" + }, + "overlayFilePath": { + "$ref": "#/definitions/SubstitutableString" + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SecuritySchemeConfigurationV3" + } + } + } + }, + "SecuritySchemeConfigurationV3": { + "type": "object", + "additionalProperties": false, + "required": ["type", "token"], + "properties": { + "type": { + "type": "string", + "enum": ["oauth2", "basicAuth", "bearer", "apiKey"] + }, + "token": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "WorkflowConfigurationV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "type": "object", + "additionalProperties": { "type": "object", - "additionalProperties": false, - "required": [ - "type", - "token" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2", - "basicAuth", - "bearer", - "apiKey" - ] - }, - "token": { - "$ref": "#/definitions/SubstitutableString" - } + "extract": { + "$ref": "#/definitions/SubstitutableString" + }, + "use": { + "$ref": "#/definitions/SubstitutableString" + } } + } + } + } + }, + "ExamplesConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "testExamples": { + "type": "array", + "items": { + "$ref": "#/definitions/BaseExampleConfigurationOrRef" + } + }, + "mockExamples": { + "type": "array", + "items": { + "$ref": "#/definitions/BaseExampleConfigurationOrRef" + } + }, + "commonExamples": { + "$ref": "#/definitions/BaseExampleConfiguration" + } + } + }, + "ArrayExampleConfigurationOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/ArrayExampleConfiguration" + } + }, + "ArrayExampleConfiguration": { + "type": "array", + "items": { + "$ref": "#/definitions/BaseExampleConfigurationOrRef" + } + }, + "BaseExampleConfigurationOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/BaseExampleConfiguration" + } + }, + "BaseExampleConfiguration": { + "type": "object", + "additionalProperties": false, + "required": ["directories"], + "properties": { + "directories": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "DictionaryConfigurationOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/DictionaryConfiguration" + } + }, + "DictionaryConfiguration": { + "type": "object", + "additionalProperties": false, + "required": ["path"], + "properties": { + "path": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "AdapterConfigurationOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/AdapterConfiguration" + } + }, + "AdapterConfiguration": { + "type": "object", + "additionalProperties": false, + "properties": { + "pre_specmatic_request_processor": { + "$ref": "#/definitions/SubstitutableString" + }, + "post_specmatic_response_processor": { + "$ref": "#/definitions/SubstitutableString" + }, + "pre_specmatic_response_processor": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "CertConfigurationOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/CertConfiguration" + } + }, + "CertConfiguration": { + "type": "object", + "additionalProperties": false, + "required": ["keyStore"], + "properties": { + "keyStore": { + "$ref": "#/definitions/KeyStoreConfiguration" + }, + "keyStorePassword": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "ConcreteSettingsOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/ConcreteSettings" + } + }, + "ModeSpecificSettings": { + "type": "object", + "anyOf": [ + { + "$ref": "#/definitions/TestSettings" }, - "WorkflowConfigurationV3": { - "type": "object", - "additionalProperties": false, - "properties": { - "ids": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "extract": { - "$ref": "#/definitions/SubstitutableString" - }, - "use": { - "$ref": "#/definitions/SubstitutableString" - } - } - } - } - } + { + "$ref": "#/definitions/MockSettings" + } + ] + }, + "ConcreteSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "general": { + "$ref": "#/definitions/GeneralSettings" }, - "ExamplesConfiguration": { - "type": "object", - "additionalProperties": false, - "properties": { - "testExamples": { - "type": "array", - "items": { - "$ref": "#/definitions/BaseExampleConfigurationOrRef" - } - }, - "mockExamples": { - "type": "array", - "items": { - "$ref": "#/definitions/BaseExampleConfigurationOrRef" - } - }, - "commonExamples": { - "$ref": "#/definitions/BaseExampleConfiguration" - } - } + "test": { + "$ref": "#/definitions/TestSettings" }, - "ArrayExampleConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/ArrayExampleConfiguration" - } + "mock": { + "$ref": "#/definitions/MockSettings" }, - "ArrayExampleConfiguration": { - "type": "array", - "items": { - "$ref": "#/definitions/BaseExampleConfigurationOrRef" - } + "proxy": { + "$ref": "#/definitions/ProxySettings" }, - "BaseExampleConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/BaseExampleConfiguration" - } + "backwardCompatibility": { + "$ref": "#/definitions/BackwardCompatibilitySettings" + } + } + }, + "KeyStoreConfiguration": { + "oneOf": [ + { + "$ref": "#/definitions/KeyStoreFileConfiguration" }, - "BaseExampleConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "directories" - ], - "properties": { - "directories": { - "$ref": "#/definitions/SubstitutableStringArray" - } - } + { + "$ref": "#/definitions/KeyStoreDirectoryConfiguration" + } + ] + }, + "KeyStoreFileConfiguration": { + "type": "object", + "additionalProperties": false, + "required": ["file"], + "properties": { + "file": { + "$ref": "#/definitions/SubstitutableString" + }, + "password": { + "$ref": "#/definitions/SubstitutableString" + }, + "alias": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "KeyStoreDirectoryConfiguration": { + "type": "object", + "additionalProperties": false, + "required": ["directory"], + "properties": { + "directory": { + "$ref": "#/definitions/SubstitutableString" + }, + "password": { + "$ref": "#/definitions/SubstitutableString" + }, + "alias": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "BackwardCompatibilitySettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "baseBranch": { + "$ref": "#/definitions/SubstitutableString" }, - "DictionaryConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/DictionaryConfiguration" - } + "targetPath": { + "$ref": "#/definitions/SubstitutableString" }, - "DictionaryConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/definitions/SubstitutableString" - } - } + "repoDirectory": { + "$ref": "#/definitions/SubstitutableString" }, - "AdapterConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/AdapterConfiguration" - } + "strictMode": { + "$ref": "#/definitions/SubstitutableBoolean" + } + } + }, + "ProxySettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "recordRequests": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "ignoreHeaders": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "MockSettingsOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/MockSettings" + } + }, + "MockSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "generative": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "AdapterConfiguration": { - "type": "object", - "additionalProperties": false, - "properties": { - "pre_specmatic_request_processor": { - "$ref": "#/definitions/SubstitutableString" - }, - "post_specmatic_response_processor": { - "$ref": "#/definitions/SubstitutableString" - }, - "pre_specmatic_response_processor": { - "$ref": "#/definitions/SubstitutableString" - } - } + "delayInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" }, - "CertConfigurationOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/CertConfiguration" - } + "startTimeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" }, - "CertConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "keyStore" - ], - "properties": { - "keyStore": { - "$ref": "#/definitions/KeyStoreConfiguration" - }, - "keyStorePassword": { - "$ref": "#/definitions/SubstitutableString" - } - } + "hotReload": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "ConcreteSettingsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" + "strictMode": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "lenientMode": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "gracefulRestartTimeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" + } + } + }, + "TestSettingsOrRef": { + "if": { + "type": "object", + "required": ["$ref"], + "properties": { + "$ref": { + "type": "string" + } + } + }, + "then": { + "$ref": "#/definitions/Reference" + }, + "else": { + "$ref": "#/definitions/TestSettings" + } + }, + "TestSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "schemaResiliencyTests": { + "anyOf": [ + { + "type": "string", + "enum": ["all", "none", "positiveOnly"] }, - "else": { - "$ref": "#/definitions/ConcreteSettings" + { + "$ref": "#/definitions/SubstitutableString" } + ] }, - "ModeSpecificSettings": { - "type": "object", - "anyOf": [ - { - "$ref": "#/definitions/TestSettings" - }, - { - "$ref": "#/definitions/MockSettings" - } - ] + "timeoutInMilliseconds": { + "$ref": "#/definitions/SubstitutableInteger" }, - "ConcreteSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "general": { - "$ref": "#/definitions/GeneralSettings" - }, - "test": { - "$ref": "#/definitions/TestSettings" - }, - "mock": { - "$ref": "#/definitions/MockSettings" - }, - "proxy": { - "$ref": "#/definitions/ProxySettings" - }, - "backwardCompatibility": { - "$ref": "#/definitions/BackwardCompatibilitySettings" - } - } + "strictMode": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "KeyStoreConfiguration": { - "oneOf": [ - { - "$ref": "#/definitions/KeyStoreFileConfiguration" - }, - { - "$ref": "#/definitions/KeyStoreDirectoryConfiguration" - } - ] + "lenientMode": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "KeyStoreFileConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "file" - ], - "properties": { - "file": { - "$ref": "#/definitions/SubstitutableString" - }, - "password": { - "$ref": "#/definitions/SubstitutableString" - }, - "alias": { - "$ref": "#/definitions/SubstitutableString" - } - } + "parallelism": { + "$ref": "#/definitions/SubstitutableInteger" }, - "KeyStoreDirectoryConfiguration": { - "type": "object", - "additionalProperties": false, - "required": [ - "directory" - ], - "properties": { - "directory": { - "$ref": "#/definitions/SubstitutableString" - }, - "password": { - "$ref": "#/definitions/SubstitutableString" - }, - "alias": { - "$ref": "#/definitions/SubstitutableString" - } - } + "maxTestRequestCombinations": { + "$ref": "#/definitions/SubstitutableInteger" }, - "BackwardCompatibilitySettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "baseBranch": { - "$ref": "#/definitions/SubstitutableString" - }, - "targetPath": { - "$ref": "#/definitions/SubstitutableString" - }, - "repoDirectory": { - "$ref": "#/definitions/SubstitutableString" - }, - "strictMode": { - "$ref": "#/definitions/SubstitutableBoolean" - } - } + "junitReportDir": { + "$ref": "#/definitions/SubstitutableString" }, - "ProxySettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "recordRequests": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "ignoreHeaders": { - "$ref": "#/definitions/SubstitutableStringArray" - } - } + "validateResponseValues": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "MockSettingsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/MockSettings" - } + "maxTestCount": { + "$ref": "#/definitions/SubstitutableInteger" + } + } + }, + "GeneralSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "disableTelemetry": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "MockSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "generative": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "delayInMilliseconds": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "startTimeoutInMilliseconds": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "hotReload": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "strictMode": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "lenientMode": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "gracefulRestartTimeoutInMilliseconds": { - "$ref": "#/definitions/SubstitutableInteger" - } - } + "ignoreInlineExamples": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "TestSettingsOrRef": { - "if": { - "type": "object", - "required": [ - "$ref" - ], - "properties": { - "$ref": { - "type": "string" - } - } - }, - "then": { - "$ref": "#/definitions/Reference" - }, - "else": { - "$ref": "#/definitions/TestSettings" - } + "ignoreInlineExampleWarnings": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "TestSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "schemaResiliencyTests": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "none", - "positiveOnly" - ] - }, - { - "$ref": "#/definitions/SubstitutableString" - } - ] - }, - "timeoutInMilliseconds": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "strictMode": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "lenientMode": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "parallelism": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "maxTestRequestCombinations": { - "$ref": "#/definitions/SubstitutableInteger" - }, - "junitReportDir": { - "$ref": "#/definitions/SubstitutableString" - }, - "validateResponseValues": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "maxTestCount": { - "$ref": "#/definitions/SubstitutableInteger" - } - } + "prettyPrint": { + "$ref": "#/definitions/SubstitutableBoolean" }, - "GeneralSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "disableTelemetry": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "ignoreInlineExamples": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "ignoreInlineExampleWarnings": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "prettyPrint": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "logging": { - "$ref": "#/definitions/LoggingSettings" - }, - "featureFlags": { - "$ref": "#/definitions/FeatureFlags" - }, - "specExamplesDirectoryTemplate": { - "$ref": "#/definitions/SubstitutableString" - }, - "sharedExamplesDirectoryTemplate": { - "$ref": "#/definitions/SubstitutableStringArray" - } - } + "logging": { + "$ref": "#/definitions/LoggingSettings" }, - "LoggingSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "level": { - "anyOf": [ - { - "type": "string", - "enum": [ - "DEBUG", - "INFO" - ] - }, - { - "$ref": "#/definitions/SubstitutableString" - } - ] - }, - "text": { - "$ref": "#/definitions/LogOutputSettings" - }, - "json": { - "$ref": "#/definitions/LogOutputSettings" - } - } + "featureFlags": { + "$ref": "#/definitions/FeatureFlags" }, - "LogOutputSettings": { - "type": "object", - "additionalProperties": false, - "properties": { - "directory": { - "$ref": "#/definitions/SubstitutableString" - }, - "console": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "logFilePrefix": { - "$ref": "#/definitions/SubstitutableString" - } - } + "specExamplesDirectoryTemplate": { + "$ref": "#/definitions/SubstitutableString" }, - "FeatureFlags": { - "type": "object", - "additionalProperties": false, - "properties": { - "fuzzyMatcherForPayloads": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "schemaExampleDefault": { - "$ref": "#/definitions/SubstitutableBoolean" - }, - "escapeSoapAction": { - "$ref": "#/definitions/SubstitutableBoolean" - } + "sharedExamplesDirectoryTemplate": { + "$ref": "#/definitions/SubstitutableStringArray" + } + } + }, + "LoggingSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "level": { + "anyOf": [ + { + "type": "string", + "enum": ["DEBUG", "INFO"] + }, + { + "$ref": "#/definitions/SubstitutableString" } + ] + }, + "text": { + "$ref": "#/definitions/LogOutputSettings" + }, + "json": { + "$ref": "#/definitions/LogOutputSettings" + } + } + }, + "LogOutputSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "directory": { + "$ref": "#/definitions/SubstitutableString" + }, + "console": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "logFilePrefix": { + "$ref": "#/definitions/SubstitutableString" + } + } + }, + "FeatureFlags": { + "type": "object", + "additionalProperties": false, + "properties": { + "fuzzyMatcherForPayloads": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "schemaExampleDefault": { + "$ref": "#/definitions/SubstitutableBoolean" + }, + "escapeSoapAction": { + "$ref": "#/definitions/SubstitutableBoolean" } + } } -} \ No newline at end of file + } +} diff --git a/src/test/specmatic/specmatic-uber-v3.json b/src/test/specmatic/specmatic-uber-v3.json index 3204b7c836a..ef9987db9d6 100644 --- a/src/test/specmatic/specmatic-uber-v3.json +++ b/src/test/specmatic/specmatic-uber-v3.json @@ -1,167 +1,150 @@ { - "version": 3, - "systemUnderTest": { - "service": { - "$ref": "#/components/services/orderApiService", - "runOptions": { - "$ref": "#/components/runOptions/orderApiService" - }, - "data": { - "examples": { - "$ref": "#/components/examples/testExamples" - }, - "dictionary": { - "$ref": "#/components/dictionaries/globalDictionary" - }, - "adapters": { - "$ref": "#/components/adapters/apiServiceHooks" - } - }, - "settings": { - "$ref": "#/components/settings/myService" - } - } - }, - "dependencies": { - "services": [ - { - "service": { - "$ref": "#/components/services/userApiService", - "runOptions": { - "$ref": "#/components/runOptions/userApiService" - } - } - }, - { - "service": { - "$ref": "#/components/services/productApiService", - "runOptions": { - "protobuf": { - "host": "localhost", - "port": 10000, - "importPaths": [ - "./proto-imports" - ], - "protocVersion": "3.15.0" - } - }, - "data": { - "examples": { - "$ref": "#/components/examples/mockExamples" - }, - "dictionary": { - "$ref": "#/components/dictionaries/productServiceDictionary" - }, - "adapters": { - "$ref": "#/components/adapters/productServiceHooks" - } - }, - "settings": { - "$ref": "#/components/settings/userApiMock" - } - } - } - ], - "data": { - "examples": { - "$ref": "#/components/examples/mockExamples" - }, - "dictionary": { - "$ref": "#/components/dictionaries/globalDictionary" + "components": { + "adapters": { + "apiServiceHooks": { + "post_specmatic_response_processor": "./hooks/encode_response_to_consumer.sh", + "pre_specmatic_request_processor": "./hooks/decode_request_from_consumer.sh", + "pre_specmatic_response_processor": "./hooks/decode_response_from_provider.sh" }, - "adapters": { - "$ref": "#/components/adapters/apiServiceHooks" + "productServiceHooks": { + "pre_specmatic_request_processor": "./hooks/decode_request_from_consumer.sh", + "pre_specmatic_response_processor": "./hooks/decode_response_from_provider.sh" } }, - "settings": { - "$ref": "#/components/settings/allMocks" - } - }, - "proxies": [ - { - "proxy": { - "target": "https://www.example.com/api", - "baseUrl": "http://localhost:8888", - "timeoutInMilliseconds": 15000, - "adapters": { - "$ref": "#/components/adapters/apiServiceHooks" - }, - "mock": [ - "specifications/proxy-api.yaml" - ], - "cert": { - "$ref": "#/components/certificates/serverCert" + "certificates": { + "serverCert": { + "keyStore": { + "alias": "specmatic_server", + "file": "./certs/proxy-keystore.jks", + "password": "changeit" }, - "recordingsDirectory": "./proxy-recordings/example" + "keyStorePassword": "changeit" } }, - { - "proxy": { - "target": "https://www.foo-bar.com/api", - "baseUrl": "http://localhost:9999", - "adapters": { - "$ref": "#/components/adapters/apiServiceHooks" - }, - "recordingsDirectory": "./proxy-recordings/foo-bar" + "dictionaries": { + "globalDictionary": { + "path": "./dictionaries/global-dictionary.yaml" + }, + "productServiceDictionary": { + "path": "./stub-dictionary.json" } - } - ], - "mcp": { - "test": { - "baseUrl": "http://localhost:9100", - "transportKind": "STREAMABLE_HTTP", - "enableResiliencyTests": true, - "dictionaryFile": "./mcp-dictionary.json", - "bearerToken": "mcp-bearer-token", - "filterTools": [ - "tool.alpha", - "tool.beta" - ], - "skipTools": [ - "tool.gamma" - ] - } - }, - "specmatic": { - "license": { - "path": "${LICENCE:~/.home/specmatic-license.txt}" }, - "governance": { - "report": { - "formats": "${REPORT_FORMAT:[html, ctrf]}", - "outputDirectory": "${REPORT_OUTPUT_DIR:./build/reports/specmatic}" + "examples": { + "commonExamples": { + "directories": [ + "./common-examples-for-my-service", + "./common-examples-for-all-service" + ] }, - "successCriteria": { - "minCoveragePercentage": "${MIN_COVERAGE:80}", - "maxMissedOperationsInSpec": "${MAX_MISSED_OPS:5}", - "enforce": "${ENFORCE_GOVERNANCE_CRITERIA:true}" - } + "mockExamples": [ + { + "directories": ["./mock-examples", "./mock-data"] + }, + { + "$ref": "#/components/examples/commonExamples" + } + ], + "testExamples": [ + { + "directories": ["./test-examples", "./test-examples", "./test-data"] + }, + { + "$ref": "#/components/examples/commonExamples" + } + ] }, - "settings": { - "$ref": "#/components/settings/myGlobal" - } - }, - "components": { - "sources": { - "specsRepo": { - "git": { - "url": "https://github.com/example/specs-repo.git", - "branch": "main", - "matchBranch": true, - "auth": { - "bearerFile": "bearer.txt" + "runOptions": { + "orderApiService": { + "openapi": { + "actuatorUrl": "http://localhost:8080/actuator", + "baseUrl": "${ORDER_API_SERVICE_BASE_URL:http://localhost:8080}", + "specs": [ + { + "spec": { + "id": "orderAPIServiceSpec", + "overlayFilePath": "./overlays/order-service-overlay.yaml", + "securitySchemes": { + "apiKeyScheme": { + "token": "${API_KEY:default_API_key_value}", + "type": "apiKey" + }, + "basicScheme": { + "token": "${BASIC_AUTH_USER:default_user}:${BASIC_AUTH_PWD:default_pwd}", + "type": "basicAuth" + }, + "bearerScheme": { + "token": "${BEARER_TOKEN:default_bearer_token}", + "type": "bearer" + }, + "oauthScheme": { + "token": "${OAUTH2_TOKEN:default_token_value}", + "type": "oauth2" + } + } + } + }, + { + "spec": { + "id": "userAPIServiceSpec", + "overlayFilePath": "./overlays/user-service-overlay.yaml" + } + } + ], + "swaggerUrl": "http://localhost:8080/v3/api-docs", + "type": "test", + "workflow": { + "ids": { + "*": { + "use": "$.globalId" + }, + "createUser": { + "extract": "$.userId" + } + } } } }, - "localSpecs": { - "filesystem": { - "directory": "./local-specs" + "userApiService": { + "asyncapi": { + "inMemoryBroker": { + "host": "localhost", + "port": 9092 + }, + "servers": [ + { + "host": "localhost:9092", + "protocol": "kafka" + } + ], + "type": "mock" + }, + "openapi": { + "baseUrl": "${USER_API_SERVICE_BASE_URL:http://localhost:9000}", + "cert": { + "$ref": "#/components/certificates/serverCert" + }, + "filter": "PATH=\"/order\" && METHOD=\"POST\"", + "logMode": "REQUEST_RESPONSE", + "logsDirPath": "./vs-logs", + "specs": [ + { + "spec": { + "id": "userAPIServiceSpec", + "securitySchemes": { + "bearerScheme": { + "token": "${USER_API_BEARER_TOKEN:default_user_bearer_token}", + "type": "bearer" + } + } + } + } + ], + "type": "stateful-mock" } } }, "services": { "orderApiService": { - "description": "Order API Service", "definitions": [ { "definition": { @@ -198,24 +181,22 @@ ] } } - ] + ], + "description": "Order API Service" }, - "userApiService": { + "productApiService": { "definitions": [ { "definition": { "source": { "$ref": "#/components/sources/specsRepo" }, - "specs": [ - "api_specs/oas/user-api-oas.yaml", - "api_specs/async/user-api-asyncapi.yaml" - ] + "specs": ["api_specs/proto/product-api.proto"] } } ] }, - "productApiService": { + "userApiService": { "definitions": [ { "definition": { @@ -223,231 +204,229 @@ "$ref": "#/components/sources/specsRepo" }, "specs": [ - "api_specs/proto/product-api.proto" + "api_specs/oas/user-api-oas.yaml", + "api_specs/async/user-api-asyncapi.yaml" ] } } ] } }, - "runOptions": { - "orderApiService": { - "openapi": { - "type": "test", - "baseUrl": "${ORDER_API_SERVICE_BASE_URL:http://localhost:8080}", - "workflow": { - "ids": { - "createUser": { - "extract": "$.userId" - }, - "*": { - "use": "$.globalId" - } - } + "settings": { + "allMocks": { + "delayInMilliseconds": 100, + "strictMode": false + }, + "myGlobal": { + "backwardCompatibility": { + "baseBranch": "main", + "repoDirectory": "../specs", + "strictMode": true, + "targetPath": "specifications" + }, + "general": { + "disableTelemetry": false, + "featureFlags": { + "escapeSoapAction": false, + "fuzzyMatcherForPayloads": false, + "schemaExampleDefault": true }, - "swaggerUrl": "http://localhost:8080/v3/api-docs", - "actuatorUrl": "http://localhost:8080/actuator", - "specs": [ - { - "spec": { - "id": "orderAPIServiceSpec", - "overlayFilePath": "./overlays/order-service-overlay.yaml", - "securitySchemes": { - "oauthScheme": { - "type": "oauth2", - "token": "${OAUTH2_TOKEN:default_token_value}" - }, - "basicScheme": { - "type": "basicAuth", - "token": "${BASIC_AUTH_USER:default_user}:${BASIC_AUTH_PWD:default_pwd}" - }, - "bearerScheme": { - "type": "bearer", - "token": "${BEARER_TOKEN:default_bearer_token}" - }, - "apiKeyScheme": { - "type": "apiKey", - "token": "${API_KEY:default_API_key_value}" - } - } - } + "ignoreInlineExampleWarnings": false, + "ignoreInlineExamples": false, + "logging": { + "json": { + "console": false, + "directory": "./logs/json", + "logFilePrefix": "specmatic" }, - { - "spec": { - "id": "userAPIServiceSpec", - "overlayFilePath": "./overlays/user-service-overlay.yaml" - } + "level": "INFO", + "text": { + "console": true, + "directory": "./logs/text", + "logFilePrefix": "specmatic" } - ] - } - }, - "userApiService": { - "openapi": { - "type": "stateful-mock", - "baseUrl": "${USER_API_SERVICE_BASE_URL:http://localhost:9000}", - "cert": { - "$ref": "#/components/certificates/serverCert" }, - "logsDirPath": "./vs-logs", - "logMode": "REQUEST_RESPONSE", - "filter": "PATH=\"/order\" && METHOD=\"POST\"", - "specs": [ - { - "spec": { - "id": "userAPIServiceSpec", - "securitySchemes": { - "bearerScheme": { - "type": "bearer", - "token": "${USER_API_BEARER_TOKEN:default_user_bearer_token}" - } - } - } - } - ] + "prettyPrint": true }, - "asyncapi": { - "type": "mock", - "inMemoryBroker": { - "host": "localhost", - "port": 9092 - }, - "servers": [ - { - "host": "localhost:9092", - "protocol": "kafka" - } - ] - } - } - }, - "examples": { - "testExamples": [ - { - "directories": [ - "./test-examples", - "./test-examples", - "./test-data" - ] + "mock": { + "delayInMilliseconds": 250, + "generative": true, + "gracefulRestartTimeoutInMilliseconds": 10000, + "hotReload": true, + "startTimeoutInMilliseconds": 30000, + "strictMode": false }, - { - "$ref": "#/components/examples/commonExamples" - } - ], - "mockExamples": [ - { - "directories": [ - "./mock-examples", - "./mock-data" - ] + "proxy": { + "ignoreHeaders": ["Authorization", "Cookie"], + "recordRequests": true }, - { - "$ref": "#/components/examples/commonExamples" + "test": { + "junitReportDir": "./build/test-results/specmatic", + "maxTestRequestCombinations": 100, + "parallelism": "4", + "schemaResiliencyTests": "all", + "strictMode": true, + "timeoutInMilliseconds": 120000 } - ], - "commonExamples": { - "directories": [ - "./common-examples-for-my-service", - "./common-examples-for-all-service" - ] - } - }, - "dictionaries": { - "globalDictionary": { - "path": "./dictionaries/global-dictionary.yaml" }, - "productServiceDictionary": { - "path": "./stub-dictionary.json" + "myService": { + "schemaResiliencyTests": "none", + "timeoutInMilliseconds": 45000 + }, + "userApiMock": { + "delayInMilliseconds": 50, + "strictMode": true } }, - "adapters": { - "apiServiceHooks": { - "pre_specmatic_request_processor": "./hooks/decode_request_from_consumer.sh", - "post_specmatic_response_processor": "./hooks/encode_response_to_consumer.sh", - "pre_specmatic_response_processor": "./hooks/decode_response_from_provider.sh" + "sources": { + "localSpecs": { + "filesystem": { + "directory": "./local-specs" + } }, - "productServiceHooks": { - "pre_specmatic_request_processor": "./hooks/decode_request_from_consumer.sh", - "pre_specmatic_response_processor": "./hooks/decode_response_from_provider.sh" + "specsRepo": { + "git": { + "auth": { + "bearerFile": "bearer.txt" + }, + "branch": "main", + "matchBranch": true, + "url": "https://github.com/example/specs-repo.git" + } } - }, - "certificates": { - "serverCert": { - "keyStore": { - "file": "./certs/proxy-keystore.jks", - "password": "changeit", - "alias": "specmatic_server" - }, - "keyStorePassword": "changeit" + } + }, + "dependencies": { + "data": { + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" + }, + "dictionary": { + "$ref": "#/components/dictionaries/globalDictionary" + }, + "examples": { + "$ref": "#/components/examples/mockExamples" } }, - "settings": { - "myGlobal": { - "general": { - "disableTelemetry": false, - "ignoreInlineExamples": false, - "ignoreInlineExampleWarnings": false, - "prettyPrint": true, - "logging": { - "level": "INFO", - "text": { - "directory": "./logs/text", - "console": true, - "logFilePrefix": "specmatic" + "services": [ + { + "service": { + "$ref": "#/components/services/userApiService", + "runOptions": { + "$ref": "#/components/runOptions/userApiService" + } + } + }, + { + "service": { + "$ref": "#/components/services/productApiService", + "data": { + "adapters": { + "$ref": "#/components/adapters/productServiceHooks" }, - "json": { - "directory": "./logs/json", - "console": false, - "logFilePrefix": "specmatic" + "dictionary": { + "$ref": "#/components/dictionaries/productServiceDictionary" + }, + "examples": { + "$ref": "#/components/examples/mockExamples" } }, - "featureFlags": { - "fuzzyMatcherForPayloads": false, - "schemaExampleDefault": true, - "escapeSoapAction": false + "runOptions": { + "protobuf": { + "host": "localhost", + "importPaths": ["./proto-imports"], + "port": 10000, + "protocVersion": "3.15.0" + } + }, + "settings": { + "$ref": "#/components/settings/userApiMock" } + } + } + ], + "settings": { + "$ref": "#/components/settings/allMocks" + } + }, + "mcp": { + "test": { + "baseUrl": "http://localhost:9100", + "bearerToken": "mcp-bearer-token", + "dictionaryFile": "./mcp-dictionary.json", + "enableResiliencyTests": true, + "filterTools": ["tool.alpha", "tool.beta"], + "skipTools": ["tool.gamma"], + "transportKind": "STREAMABLE_HTTP" + } + }, + "proxies": [ + { + "proxy": { + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" }, - "test": { - "schemaResiliencyTests": "all", - "timeoutInMilliseconds": 120000, - "strictMode": true, - "parallelism": "4", - "maxTestRequestCombinations": 100, - "junitReportDir": "./build/test-results/specmatic" + "baseUrl": "http://localhost:8888", + "cert": { + "$ref": "#/components/certificates/serverCert" }, - "mock": { - "generative": true, - "delayInMilliseconds": 250, - "startTimeoutInMilliseconds": 30000, - "hotReload": true, - "strictMode": false, - "gracefulRestartTimeoutInMilliseconds": 10000 + "mock": ["specifications/proxy-api.yaml"], + "recordingsDirectory": "./proxy-recordings/example", + "target": "https://www.example.com/api", + "timeoutInMilliseconds": 15000 + } + }, + { + "proxy": { + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" }, - "backwardCompatibility": { - "baseBranch": "main", - "targetPath": "specifications", - "repoDirectory": "../specs", - "strictMode": true + "baseUrl": "http://localhost:9999", + "recordingsDirectory": "./proxy-recordings/foo-bar", + "target": "https://www.foo-bar.com/api" + } + } + ], + "specmatic": { + "governance": { + "report": { + "formats": "${REPORT_FORMAT:[html, ctrf]}", + "outputDirectory": "${REPORT_OUTPUT_DIR:./build/reports/specmatic}" + }, + "successCriteria": { + "enforce": "${ENFORCE_GOVERNANCE_CRITERIA:true}", + "maxMissedOperationsInSpec": "${MAX_MISSED_OPS:5}", + "minCoveragePercentage": "${MIN_COVERAGE:80}" + } + }, + "license": { + "path": "${LICENCE:~/.home/specmatic-license.txt}" + }, + "settings": { + "$ref": "#/components/settings/myGlobal" + } + }, + "systemUnderTest": { + "service": { + "$ref": "#/components/services/orderApiService", + "data": { + "adapters": { + "$ref": "#/components/adapters/apiServiceHooks" }, - "proxy": { - "recordRequests": true, - "ignoreHeaders": [ - "Authorization", - "Cookie" - ] + "dictionary": { + "$ref": "#/components/dictionaries/globalDictionary" + }, + "examples": { + "$ref": "#/components/examples/testExamples" } }, - "myService": { - "timeoutInMilliseconds": 45000, - "schemaResiliencyTests": "none" - }, - "allMocks": { - "delayInMilliseconds": 100, - "strictMode": false + "runOptions": { + "$ref": "#/components/runOptions/orderApiService" }, - "userApiMock": { - "delayInMilliseconds": 50, - "strictMode": true + "settings": { + "$ref": "#/components/settings/myService" } } - } -} \ No newline at end of file + }, + "version": 3 +} diff --git a/src/test/specmatic/specmatic-v3-dereffed.json b/src/test/specmatic/specmatic-v3-dereffed.json index c7a8c344faa..8dcedfbb7d2 100644 --- a/src/test/specmatic/specmatic-v3-dereffed.json +++ b/src/test/specmatic/specmatic-v3-dereffed.json @@ -1,31 +1,4 @@ { - "version": 3, - "systemUnderTest": { - "service": { - "definitions": [ - { - "definition": { - "source": { - "filesystem": { - "directory": "." - } - }, - "specs": [ - "product_search_bff_v5.yaml" - ] - } - } - ], - "runOptions": { - "openapi": { - "baseUrl": "http://studio:9090" - } - }, - "settings": { - "schemaResiliencyTests": "all" - } - } - }, "dependencies": { "services": [ { @@ -38,16 +11,14 @@ "directory": "." } }, - "specs": [ - "product_search_bff_v5.yaml" - ] + "specs": ["product_search_bff_v5.yaml"] } } ], "runOptions": { "openapi": { - "type": "mock", - "baseUrl": "http://0.0.0.0:9090" + "baseUrl": "http://0.0.0.0:9090", + "type": "mock" } } } @@ -60,8 +31,8 @@ "outputDirectory": "file:///usr/src/app/build/reports/specmatic/" }, "successCriteria": { - "minCoveragePercentage": 70, - "enforce": true + "enforce": true, + "minCoveragePercentage": 70 } }, "settings": { @@ -69,5 +40,30 @@ "prettyPrint": true } } - } -} \ No newline at end of file + }, + "systemUnderTest": { + "service": { + "definitions": [ + { + "definition": { + "source": { + "filesystem": { + "directory": "." + } + }, + "specs": ["product_search_bff_v5.yaml"] + } + } + ], + "runOptions": { + "openapi": { + "baseUrl": "http://studio:9090" + } + }, + "settings": { + "schemaResiliencyTests": "all" + } + } + }, + "version": 3 +} diff --git a/src/test/specmatic/specmatic-v3-reffed.json b/src/test/specmatic/specmatic-v3-reffed.json index f7dc38c6673..30ed0293e0d 100644 --- a/src/test/specmatic/specmatic-v3-reffed.json +++ b/src/test/specmatic/specmatic-v3-reffed.json @@ -1,13 +1,32 @@ { - "version": 3, - "systemUnderTest": { - "service": { - "$ref": "#/components/services/productSearchBffV5", - "runOptions": { - "$ref": "#/components/runOptions/productSearchBffV5" - }, - "settings": { - "$ref": "#/components/settings/productSearchBffV5" + "components": { + "runOptions": { + "productSearchBffV5": { + "openapi": { + "baseUrl": "http://studio:9090", + "type": "mock" + } + } + }, + "services": { + "productSearchBffV5": { + "definitions": [ + { + "definition": { + "source": { + "filesystem": { + "directory": "." + } + }, + "specs": ["product_search_bff_v5.yaml"] + } + } + ] + } + }, + "settings": { + "productSearchBffV5": { + "schemaResiliencyTests": "all" } } }, @@ -29,8 +48,8 @@ "outputDirectory": "file:///usr/src/app/build/reports/specmatic/" }, "successCriteria": { - "minCoveragePercentage": 70, - "enforce": true + "enforce": true, + "minCoveragePercentage": 70 } }, "settings": { @@ -39,37 +58,16 @@ } } }, - "components": { - "services": { - "productSearchBffV5": { - "definitions": [ - { - "definition": { - "source": { - "filesystem": { - "directory": "." - } - }, - "specs": [ - "product_search_bff_v5.yaml" - ] - } - } - ] - } - }, - "runOptions": { - "productSearchBffV5": { - "openapi": { - "type": "mock", - "baseUrl": "http://studio:9090" - } - } - }, - "settings": { - "productSearchBffV5": { - "schemaResiliencyTests": "all" + "systemUnderTest": { + "service": { + "$ref": "#/components/services/productSearchBffV5", + "runOptions": { + "$ref": "#/components/runOptions/productSearchBffV5" + }, + "settings": { + "$ref": "#/components/settings/productSearchBffV5" } } - } -} \ No newline at end of file + }, + "version": 3 +} From d436dfbe83f2272ebca7df7bb28702aa36ae9e65 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Thu, 12 Feb 2026 12:51:56 +0530 Subject: [PATCH 11/13] Add telemetry flag for specmatic v2 config --- src/schemas/json/specmatic.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index 285dc1ed5a9..b8d4a740f87 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -207,6 +207,10 @@ "type": "object", "description": "Default values for patterns", "additionalProperties": true + }, + "disable_telemetry": { + "type": ["boolean"], + "description": "Whether to disable telemetry data collection" } } }, From d9851ae810cc88c0be40e908e2bf89037b2b18cb Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Thu, 12 Feb 2026 15:56:34 +0530 Subject: [PATCH 12/13] Added missing hooks to the adapters schema --- src/schemas/json/specmatic.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/schemas/json/specmatic.json b/src/schemas/json/specmatic.json index b8d4a740f87..25e50633778 100644 --- a/src/schemas/json/specmatic.json +++ b/src/schemas/json/specmatic.json @@ -2116,6 +2116,12 @@ }, "pre_specmatic_response_processor": { "$ref": "#/definitions/SubstitutableString" + }, + "stub_load_contract": { + "$ref": "#/definitions/SubstitutableString" + }, + "test_load_contract": { + "$ref": "#/definitions/SubstitutableString" } } }, From 7a46dc315601684588096d593674278f2fad4a98 Mon Sep 17 00:00:00 2001 From: Joel Rosario Date: Thu, 12 Feb 2026 17:10:13 +0530 Subject: [PATCH 13/13] Added CODEOWNERS entries for the Specmatic team --- .github/CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f5567f02189..b085c44ace9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -83,3 +83,8 @@ src/negative_test/popxf-* @peterstangl @alekssmolkovic @kenmimasu src/schemas/json/kya.json @wp-lkl src/test/kya/ @wp-lkl src/negative_test/kya/ @wp-lkl + +# Managed by Specmatic team: +src/schemas/json/specmatic.json @joelrosario @nashjain +src/test/specmatic/ @joelrosario @nashjain +src/negative_test/specmatic/ @joelrosario @nashjain