$api = Reader::readFromJson(<<<JSON{ "openapi": "3.0.0", "info": { "title": "Test API", "version": "1.0.0" }, "paths": { "/path": { "get": { "operationId": "op1", "responses": { "200": { "description": "Success" } } }, "post": { "operationId": "op1", "responses": { "200": { "description": "Success" } } } } }}JSON);
var_dump($api->validate()); // bool(true)
Expected
Calling
validateon a\cebe\openapi\spec\OpenApiobject containing duplicate operationIds will return false.Reasoning
OperationIds MUST be unique among all operations described in the API.
Actual
Calling
validateon a\cebe\openapi\spec\OpenApiobject containing duplicate operationIds returns true.Example