@@ -93,7 +93,7 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [
9393 } ,
9494 } ,
9595 } ,
96- '/resource/{id} ' : {
96+ '/resource2 ' : {
9797 post : {
9898 requestBody : {
9999 content : {
@@ -102,22 +102,22 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [
102102 $ref : '#/components/schemas/Schema' ,
103103 } ,
104104 } ,
105+ 'application/vnd.atlas.2024-01-01+json' : {
106+ schema : {
107+ $ref : '#/components/schemas/Schema' ,
108+ } ,
109+ } ,
105110 } ,
106111 } ,
107112 } ,
108113 } ,
109- '/resource2 ' : {
114+ '/resource3 ' : {
110115 post : {
111116 requestBody : {
112117 content : {
113118 'application/vnd.atlas.2023-01-01+json' : {
114119 schema : {
115- $ref : '#/components/schemas/Schema' ,
116- } ,
117- } ,
118- 'application/vnd.atlas.2024-01-01+json' : {
119- schema : {
120- $ref : '#/components/schemas/Schema' ,
120+ type : "object" ,
121121 } ,
122122 } ,
123123 } ,
@@ -136,19 +136,19 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [
136136 {
137137 code : 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' ,
138138 message : 'Response body for the Create method should refer to Request suffixed schema. http://go/ipa/106' ,
139- path : [ 'paths' , '/resource/{id} ' , 'post' , 'requestBody' , 'content' , 'application/vnd.atlas.2023-01-01+json' ] ,
139+ path : [ 'paths' , '/resource2 ' , 'post' , 'requestBody' , 'content' , 'application/vnd.atlas.2023-01-01+json' ] ,
140140 severity : DiagnosticSeverity . Warning ,
141141 } ,
142142 {
143143 code : 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' ,
144144 message : 'Response body for the Create method should refer to Request suffixed schema. http://go/ipa/106' ,
145- path : [ 'paths' , '/resource2' , 'post' , 'requestBody' , 'content' , 'application/vnd.atlas.2023 -01-01+json' ] ,
145+ path : [ 'paths' , '/resource2' , 'post' , 'requestBody' , 'content' , 'application/vnd.atlas.2024 -01-01+json' ] ,
146146 severity : DiagnosticSeverity . Warning ,
147147 } ,
148148 {
149149 code : 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' ,
150150 message : 'Response body for the Create method should refer to Request suffixed schema. http://go/ipa/106' ,
151- path : [ 'paths' , '/resource2 ' , 'post' , 'requestBody' , 'content' , 'application/vnd.atlas.2024 -01-01+json' ] ,
151+ path : [ 'paths' , '/resource3 ' , 'post' , 'requestBody' , 'content' , 'application/vnd.atlas.2023 -01-01+json' ] ,
152152 severity : DiagnosticSeverity . Warning ,
153153 } ,
154154 ] ,
@@ -166,9 +166,49 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [
166166 schema : {
167167 $ref : '#/components/schemas/Schema' ,
168168 } ,
169+ 'x-xgen-IPA-exception' : {
170+ 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' : 'reason' ,
171+ } ,
172+ } ,
173+ } ,
174+ } ,
175+ } ,
176+ } ,
177+ '/resource/{id}' : {
178+ post : {
179+ requestBody : {
180+ content : {
181+ 'application/vnd.atlas.2023-01-01+json' : {
182+ schema : {
183+ $ref : '#/components/schemas/Schema' ,
184+ } ,
185+ 'x-xgen-IPA-exception' : {
186+ 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' : 'reason' ,
187+ } ,
188+ } ,
189+ } ,
190+ } ,
191+ } ,
192+ } ,
193+ '/resource2' : {
194+ post : {
195+ requestBody : {
196+ content : {
197+ 'application/vnd.atlas.2023-01-01+json' : {
198+ schema : {
199+ $ref : '#/components/schemas/Schema' ,
200+ } ,
201+ 'x-xgen-IPA-exception' : {
202+ 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' : 'reason' ,
203+ } ,
169204 } ,
170- 'x-xgen-IPA-exception' : {
171- 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' : 'reason' ,
205+ 'application/vnd.atlas.2024-01-01+json' : {
206+ schema : {
207+ $ref : '#/components/schemas/Schema' ,
208+ } ,
209+ 'x-xgen-IPA-exception' : {
210+ 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object' : 'reason' ,
211+ } ,
172212 } ,
173213 } ,
174214 } ,
0 commit comments