#!/bin/sh

# Using allOf in schemas results in openapi-generator importing interfaces it does not use.
# This causes problems for rollup, so remove the redundant imports.
sed -i '/import { \(CursorAndLimit\|\w*AllOf\) }/d' src/model/*.ts
sed -i '/import { Distance }/d' src/model/datum.ts

# Delete redundant interfaces for the anonymous parts of allOf lists
rm -v src/model/*AllOf.ts
