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
{{ message }}
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
Is your feature request related to a problem? Please describe.
According to Dredd documentation: "If body parameter has schema.example (spec), it is used as a raw JSON sample for the request body. If it’s not present, Dredd’s OpenAPI 2 adapter generates sample values from the JSON Schema provided in the schema (spec) property."
.. which is fine. But if there is an inconsistency between the schema and the example, the example will be taken as truth without notifying the user of the inconsistency with the schema. This is not good for cases where the developer updates the schema and forgets to update the example as well, or vice versa.
Describe the solution you'd like
Dredd to throw error of example-to-schema inconsistency
Describe alternatives you've considered
probably having a configuration parameter for turning the error into a warning
Is your feature request related to a problem? Please describe.
According to Dredd documentation: "If body parameter has schema.example (spec), it is used as a raw JSON sample for the request body. If it’s not present, Dredd’s OpenAPI 2 adapter generates sample values from the JSON Schema provided in the schema (spec) property."
.. which is fine. But if there is an inconsistency between the schema and the example, the example will be taken as truth without notifying the user of the inconsistency with the schema. This is not good for cases where the developer updates the schema and forgets to update the example as well, or vice versa.
Describe the solution you'd like
Dredd to throw error of example-to-schema inconsistency
Describe alternatives you've considered
probably having a configuration parameter for turning the error into a warning
Additional context
Tried:
OpenAPI: 3.0.1
dredd v14.1.0
The text was updated successfully, but these errors were encountered: