github hey-api/openapi-ts @hey-api/openapi-ts@0.85.0

one day ago

Minor Changes

Updated output options

We made the output configuration more consistent by using null to represent disabled options. This change does not affect boolean options.

export default {
  input: 'hey-api/backend', // sign up at app.heyapi.dev
  output: {
    format: null,
    lint: null,
    path: 'src/client',
    tsConfigPath: null,
  },
};

Patch Changes

Updated Pinia Colada query options

Pinia Colada query options now use defineQueryOptions to improve reactivity support. Instead of calling the query options function, you can use one of the following approaches.

No params

useQuery(getPetsQuery);

Constant

useQuery(getPetByIdQuery, () => ({
  path: {
    petId: 1,
  },
}));

Reactive

const petId = ref<number | null>(1);

useQuery(getPetByIdQuery, () => ({
  path: {
    petId: petId.value,
  },
}));

Properties

const petId = ref<number | null>(1);

useQuery(() => ({
  ...getPetByIdQuery({
    path: { petId: petId.value as number },
  }),
  enabled: () => petId.value != null,
}));

Don't miss a new openapi-ts release

NewReleases is sending notifications on new releases.