7 API conformance: Schema testing

This chapter covers

  • Writing code-based schema tests
  • Auto-generating API schema tests
  • Using a validation proxy for schema tests

In the previous chapter, I explored how generating the OpenAPI definition from the API service helps ensure that the OpenAPI definition conforms to the behavior of the service. But in some cases, it may not always be possible to generate the OpenAPI definition from a service. This can be due to technical limitations in legacy API services or organizational constraints. And even if you can generate the OpenAPI definition from the API service, the behavior of the service under exploratory testing may reveal surprising behavior from the application, which may not be captured by ...

Get Automating API Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.