Skip to content

fix: omit unused components import in api-schemas.ts when no schemas found#143

Merged
zedrdave merged 1 commit intomainfrom
fix/api-schemas-no-unused-import
Mar 9, 2026
Merged

fix: omit unused components import in api-schemas.ts when no schemas found#143
zedrdave merged 1 commit intomainfrom
fix/api-schemas-no-unused-import

Conversation

@zedrdave
Copy link
Member

@zedrdave zedrdave commented Mar 9, 2026

Summary

When an OpenAPI spec has no schemas, api-schemas.ts was generated with:

import type { components } from './openapi-types.js'

// No schemas found in the OpenAPI specification

The components import is unused in this case, triggering a lint warning in consumer projects.

Fix

Remove the import type { components } line from the no-schemas early-return path in generateApiSchemasContent.

Version

Bumped patch: 0.20.00.20.1

@zedrdave zedrdave merged commit c9e383b into main Mar 9, 2026
3 checks passed
@zedrdave zedrdave deleted the fix/api-schemas-no-unused-import branch March 9, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant