Interesting in development

swagger_fixtures: test fixtures from Swagger

Generates JSON test fixtures straight from a Swagger or OpenAPI spec, so Dart models are checked against the responses the backend documents.

swagger_fixtures: test fixtures from Swagger

Testing how API responses are parsed works best with realistic examples, but writing JSON by hand takes time and it goes stale quickly. When the backend changes a response, hand-written fixtures do not know about it, and the bug only shows up in the app.

swagger_fixtures reads one or more specs by URL or local path and writes a separate JSON file for every documented response, every status code included. Bodies are built from the spec's example values, and a generated Fixtures class gives typed access to each file. Rerunning it refreshes the fixtures and removes responses that are gone from the spec.

The package is useful for Dart and Flutter teams whose backend is described in Swagger or OpenAPI. Regenerate the fixtures after an API change, and the tests show whether the models still fit the new responses.

Open on pub.dev

More articles

08 / FAQ

Still have questions?

It depends on the scope: a landing page, a corporate site and a web service are priced differently. Get a rough range in our calculator in 30 seconds; the exact price is fixed before work starts.

The price depends on the number of screens, platforms (iOS, Android) and the backend. Describe your idea in the calculator to see the budget range, timeline and team.

The timeline depends on the task and is agreed before work starts, not after. The calculator gives a timeline estimate too.

Yes. We run research, design the interface and build a design system that your own team can take into development.

Yes, and with other cities of Kazakhstan too. We work remotely with regular calls, updates and project documentation.

Yes. We first review the code and the current state of the product, then propose an improvement plan and join the process.

A short description of the task is enough. A technical specification is optional — we'll ask the clarifying questions ourselves.

The full cycle: analytics, UX/UI design, iOS, Android, web and backend development, testing, release and post-launch support.

Have an idea? Let's turn it into a working product.

We reply within one business day