extends: "spectral:oas" rules: speedscale-operationid-required: description: All operations should have an operationId for Speedscale CLI mapping. message: "Operation at {{path}} must have an operationId for traffic replay mapping." severity: error given: "$.paths[*][get,post,put,patch,delete,options,head]" then: field: operationId function: truthy speedscale-response-schema-required: description: Operations should define response schemas for accurate mock generation. message: "Operation {{path}} should define a response schema for service virtualization." severity: warn given: "$.paths[*][get,post,put,patch,delete].responses[200,201,202]" then: field: content function: truthy speedscale-security-defined: description: APIs with authentication should define security schemes for capture. message: "API spec should define security schemes to enable authenticated traffic capture." severity: info given: "$.components" then: field: securitySchemes function: truthy speedscale-servers-defined: description: Server URLs should be defined for correct traffic routing in replay. message: "API spec should define at least one server for replay target configuration." severity: warn given: "$" then: field: servers function: truthy