You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(...) Non-error response MUST contain a standard object with data and metadata properties. Details: "schema" property must have required property "metadata" paths./documents.post.responses[201].content.application/json
(...) Non-error response MUST contain a standard object with data and metadata properties. Details: "schema" property must have required property "data" paths./documents.post.responses[201].content.application/json
I have Jest test cases that validate the rule. If I remove the 'required' elements in the rule, there is no error but the tests are failing because having just one of data or metadata is considered as OK, which is not the goal.
Adding ".schema" at the end of the 'given' clause doesn't help neither.
I'm really out of clue and any help would be very appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm in trouble with this rule:
I'm trying to validate that part of an OAS:
I'm getting the following errors when linting:
(...) Non-error response MUST contain a standard object with data and metadata properties. Details: "schema" property must have required property "metadata" paths./documents.post.responses[201].content.application/json
(...) Non-error response MUST contain a standard object with data and metadata properties. Details: "schema" property must have required property "data" paths./documents.post.responses[201].content.application/json
I have Jest test cases that validate the rule. If I remove the 'required' elements in the rule, there is no error but the tests are failing because having just one of data or metadata is considered as OK, which is not the goal.
Adding ".schema" at the end of the 'given' clause doesn't help neither.
I'm really out of clue and any help would be very appreciated.
Beta Was this translation helpful? Give feedback.
All reactions