@@ -38,27 +38,6 @@ public function __construct(
3838 title: 'Parameter Content Scratch ' ,
3939 version: '1.0 '
4040)]
41- #[OAT \Post(
42- path: '/api/endpoint ' ,
43- requestBody: new OAT \RequestBody (content: [new OAT \MediaType (
44- mediaType: 'application/json ' ,
45- schema: new OAT \Schema (
46- required: ['note ' ],
47- properties: [
48- new OAT \Property (property: 'note ' , example: 'My note ' ),
49- new OAT \Property (
50- property: 'other ' ,
51- description: 'other ' ,
52- oneOf: [
53- new OAT \Schema (type: NestedSchemaOne::class),
54- new OAT \Schema (type: NestedSchemaTwo::class),
55- ]
56- ),
57- ]
58- )
59- )]),
60- responses: [new OAT \Response (response: 200 , description: 'OK ' )]
61- )]
6241#[OAT \Schema(
6342 required: ['errors ' ],
6443 properties: [
@@ -84,3 +63,79 @@ public function __construct(
8463class NestedSchema
8564{
8665}
66+
67+ class NestedSchemaController
68+ {
69+ #[OAT \Post(
70+ path: '/api/post ' ,
71+ operationId: 'post ' ,
72+ requestBody: new OAT \RequestBody (content: [new OAT \MediaType (
73+ mediaType: 'application/json ' ,
74+ schema: new OAT \Schema (
75+ required: ['note ' ],
76+ properties: [
77+ new OAT \Property (property: 'note ' , example: 'My note ' ),
78+ new OAT \Property (
79+ property: 'other ' ,
80+ description: 'other ' ,
81+ oneOf: [
82+ new OAT \Schema (type: NestedSchemaOne::class),
83+ new OAT \Schema (type: NestedSchemaTwo::class),
84+ ]
85+ ),
86+ ]
87+ )
88+ )]),
89+ responses: [new OAT \Response (response: 200 , description: 'OK ' )]
90+ )]
91+ public function post ()
92+ {
93+
94+ }
95+
96+ /**
97+ * @param string[] $tags
98+ */
99+ #[OAT \Get(
100+ path: '/api/get ' ,
101+ operationId: 'get ' ,
102+ )]
103+ #[OAT \Response(response: 200 , description: 'successful operation ' )]
104+ public function get (
105+ #[OAT \QueryParameter(
106+ schema: new OAT \Schema (
107+ type: 'array ' ,
108+ items: new OAT \Items (type: 'string ' )
109+ )
110+ )] array $ tags ,
111+ ) {
112+ }
113+
114+ #[OAT \Put(
115+ path: '/api/put ' ,
116+ operationId: 'put ' ,
117+ )]
118+ #[OAT \Response(response: 200 , description: 'successful operation ' )]
119+ public function put (
120+ #[OAT \QueryParameter(
121+ schema: new OAT \Schema (
122+ type: 'array ' ,
123+ items: new OAT \Items (type: 'string ' )
124+ )
125+ )] array $ tags ,
126+ ) {
127+ }
128+
129+ /**
130+ * @param string[] $tags
131+ */
132+ #[OAT \Delete(
133+ path: '/api/delete ' ,
134+ operationId: 'delete ' ,
135+ )]
136+ #[OAT \Response(response: 200 , description: 'successful operation ' )]
137+ public function delete (
138+ #[OAT \QueryParameter] array $ tags ,
139+ ) {
140+ }
141+ }
0 commit comments