Core OpenAPI / Swagger validation logic.