v2.0.0
🚨 Breaking Changes
- Migrate to OpenAPI v7 - by @johannschopplich in #71 (b6331)
- Change default return type to
unknowninstead ofany- by @johannschopplich (c0429)
ℹ️ Migration
Tip
Breaking changes are limited to using typed OpenAPI clients. If you don't require typed clients in your Nuxt application, you can skip this migration section.
With Nuxt API Party v2, the OpenAPI support has been refactored to conform to the upcoming version of the openapi-types package (v7). This change introduces a few breaking changes to the API Party OpenAPI client:
- Dropped support for OpenAPI 2.0 (Swagger).
- Previously, you could omit the leading slash in the API path. This is no longer possible. You must now include the leading slash in the path, just like in the OpenAPI specification.
- The
pathParamsfetch option has been renamed topathto better align with the OpenAPI specification and allow for more flexibility in the future.
const { data } = await usePetStoreData(
- 'user/{username}',
+ '/user/{username}',
{
- pathParams: { username: 'user1' },
+ path: { username: 'user1' },
}
)