@@ -19,7 +19,7 @@ final class PathItem
1919
2020 public static array $ methods = ['GET ' , 'PUT ' , 'POST ' , 'DELETE ' , 'OPTIONS ' , 'HEAD ' , 'PATCH ' , 'TRACE ' ];
2121
22- public function __construct (private ?string $ ref = null , private ?string $ summary = null , private ?string $ description = null , private ?Operation $ get = null , private ?Operation $ put = null , private ?Operation $ post = null , private ?Operation $ delete = null , private ?Operation $ options = null , private ?Operation $ head = null , private ?Operation $ patch = null , private ?Operation $ trace = null , private ?array $ servers = null , private ?array $ parameters = null )
22+ public function __construct (private ?string $ ref = null , private ?string $ summary = null , private ?string $ description = null , private ?Operation $ get = null , private ?Operation $ put = null , private ?Operation $ post = null , private ?Operation $ delete = null , private ?Operation $ options = null , private ?Operation $ head = null , private ?Operation $ patch = null , private ?Operation $ trace = null , private ?array $ servers = null , private ?array $ parameters = null , private ? Operation $ query = null , private ? array $ additionalOperations = null )
2323 {
2424 }
2525
@@ -88,6 +88,19 @@ public function getParameters(): ?array
8888 return $ this ->parameters ;
8989 }
9090
91+ public function getQuery (): ?Operation
92+ {
93+ return $ this ->query ;
94+ }
95+
96+ /**
97+ * @return array<string, Operation>|null
98+ */
99+ public function getAdditionalOperations (): ?array
100+ {
101+ return $ this ->additionalOperations ;
102+ }
103+
91104 public function withRef (string $ ref ): self
92105 {
93106 $ clone = clone $ this ;
@@ -191,4 +204,23 @@ public function withParameters(?array $parameters = null): self
191204
192205 return $ clone ;
193206 }
207+
208+ public function withQuery (?Operation $ query ): self
209+ {
210+ $ clone = clone $ this ;
211+ $ clone ->query = $ query ;
212+
213+ return $ clone ;
214+ }
215+
216+ /**
217+ * @param array<string, Operation>|null $additionalOperations
218+ */
219+ public function withAdditionalOperations (?array $ additionalOperations = null ): self
220+ {
221+ $ clone = clone $ this ;
222+ $ clone ->additionalOperations = $ additionalOperations ;
223+
224+ return $ clone ;
225+ }
194226}
0 commit comments