OpenAPI Validation
HasMCP strictly utilizes OpenAPI schema standards (v3.0.x) to validate everyPOST and PATCH request received.
Before a physical request reaches the internal orchestration logic, the API gateway intercepts the payload and parses the JSON body against the rigid schema definition.
- Type Checking: Identifies if a property expects an integer but physically receives a string, returning a
400 Bad Request. - Missing Properties: Evaluates all
required: []arrays in the OpenAPI doc to ensure essential properties likenameortypeexist. - Enum Validation: Ensures string values explicitly match the allowed permutations (e.g. Server variable types must exclusively be
"ENV"or"SECRET").