{
    "openapi": "3.1.0",
    "info": {
        "title": "Nexans Bearing Product Search API",
        "version": "1.0.0",
        "description": "Read-only search over the public Nexans Bearing catalog. Product dimensions, availability, MOQ and quotation remain subject to confirmation by the export desk."
    },
    "servers": [
        {
            "url": "https://www.nexansbearing.com/wp-json"
        }
    ],
    "paths": {
        "/nexans/v1/products": {
            "get": {
                "operationId": "searchBearingProducts",
                "summary": "Search public bearing product references",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 120
                        },
                        "description": "Bearing reference, product family or keyword."
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Bearing category slug, for example tapered-roller-bearings."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching public product records.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductSearchResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ProductSearchResponse": {
                "type": "object",
                "required": [
                    "query",
                    "count",
                    "items"
                ],
                "properties": {
                    "query": {
                        "type": "object"
                    },
                    "count": {
                        "type": "integer"
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Product"
                        }
                    }
                }
            },
            "Product": {
                "type": "object",
                "required": [
                    "id",
                    "name",
                    "url"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "description": {
                        "type": "string"
                    },
                    "product_family": {
                        "type": "string"
                    },
                    "key_specs": {
                        "type": "string"
                    }
                }
            }
        }
    }
}