@@ -24,7 +24,7 @@ const componentSchemas = {
2424
2525testRule ( 'xgen-IPA-106-create-method-response-is-get-method-response' , [
2626 {
27- name : 'valid create requests ' ,
27+ name : 'valid create responses ' ,
2828 document : {
2929 paths : {
3030 '/resources' : {
@@ -110,13 +110,15 @@ testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
110110 // Path not ending in collection
111111 '/not/a/collection/resource' : {
112112 post : {
113- requestBody : {
114- content : {
115- 'application/vnd.atlas.2024-08-05+json' : {
116- schema : {
117- type : 'object' ,
118- properties : {
119- name : { type : 'string' } ,
113+ responses : {
114+ 201 : {
115+ content : {
116+ 'application/vnd.atlas.2024-08-05+json' : {
117+ schema : {
118+ type : 'object' ,
119+ properties : {
120+ name : { type : 'string' } ,
121+ } ,
120122 } ,
121123 } ,
122124 } ,
@@ -127,11 +129,13 @@ testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
127129 // Version mismatch but will be ignored
128130 '/versionMismatchResources' : {
129131 post : {
130- requestBody : {
131- content : {
132- 'application/vnd.atlas.2024-01-05+json' : {
133- schema : {
134- $ref : '#/components/schemas/ResourceSchema' ,
132+ responses : {
133+ 201 : {
134+ content : {
135+ 'application/vnd.atlas.2024-01-05+json' : {
136+ schema : {
137+ $ref : '#/components/schemas/ResourceSchema' ,
138+ } ,
135139 } ,
136140 } ,
137141 } ,
@@ -159,7 +163,7 @@ testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
159163 errors : [ ] ,
160164 } ,
161165 {
162- name : 'invalid create requests ' ,
166+ name : 'invalid create responses ' ,
163167 document : {
164168 paths : {
165169 // Get without schema
0 commit comments