OpenAPI fetch for Nuxt

Generate zero-overhead, 100% typed OpenAPI fetch clients
const { 
data
} = await
usePets
('/pet/{petId}
', {
path
: {
petId
: 2
},
transform
: (
input
) => ({
name
:
input
.
name
,
status
:
input
.status
}),
default
: () => ({
name
: 'Tony Stark',
email
: 'tony@stark.com'
}),
lazy
: true
})

Full type safety

All parameters, request bodies, and responses are type-checked and 100% match your schema

OpenAPI

Supports OpenAPI 3.0 and 3.1 (including advanced features like discriminators)

YAML or JSON

Load schemas from YAML or JSON, locally or remotely

Runtime-free

Generate runtime-free types that outperform old school codegen

Fast

Generate types for even huge schemas within milliseconds

Layers

Works with Nuxt Layers
Copyright © 2024