Skip to content

Releases

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 15:15
Immutable release. Only release title and notes can be modified.
2b7e2bd

Fixed

  • Add a query API key to a GET request in Firefox (#93)
  • Leave out a flagged property from a nested allOf of references (#95)
  • Breaking: A text/* media type declared binary (a schema without a type) in one response was read as a Blob in every response of the operation, even where its type was string or an event stream. It is now read as a Blob only for the statuses of the response that declares it, so data is what its type says. Code that read such data as a Blob against its type must read it as typed. (#97)
  • Breaking: The data of a 204, 205 or 304 response that the document covers only with 2XX, 3XX or default was typed as that key's body, though the client returns undefined for it. It is now undefined. With 200 and default: Error, data in if (!res.ok) now includes the undefined of a 304: read it with ?., or narrow by status first. (#96)
  • Send a request resent through auth with only the credentials chosen for it (#98)
  • Breaking: A response declared as the range text/* was typed string, though the client reads text/event-stream and +json types under it as an event stream or as JSON. Its data is now unknown, as for */* and application/*. Check its type before use, or declare the media types the response sends, such as text/plain, which stay string. (#99)
  • Breaking: A subtype that adds nothing to a parent that only lists its subtypes in oneOf or anyOf was typed unknown. Such a document is now an error. Give the subtype or its parent a type or properties, such as the discriminator property. (#100)

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 07:01
Immutable release. Only release title and notes can be modified.
78e3e8a

Fixed

  • Breaking: minItems was not read, so an array with minItems: 1 took an empty array. An array without prefixItems is now a tuple whose first minItems items are required: [T, ...T[]] for 1, [T, T, ...T[]] for 2. Its first items are also no longer T | undefined under noUncheckedIndexedAccess. (#77)
  • Breaking: In a multipart/form-data body composed with allOf or oneOf, a part without a type was unknown. It is now a Blob, as in a body whose schema is an object, so a value other than a Blob no longer type-checks there. (#78)
  • Send encoded binary parts of a composed multipart body as octets (#79)
  • Leave out what a subtype flags from the parent it extends (#80)
  • Breaking: A component name with other characters than ASCII letters, digits, ., - and _, which the specification does not allow, was exported without them (ユーザー as _, Café as Caf). Such a name is now an error. Rename the component. (#88)
  • Breaking: propertyNames was not read, so a map whose keys an enum limits took any key. Where propertyNames lists the names with enum or const, the object now has an optional property for each of them, of the type of additionalProperties, and no other key. (#89)

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 16:29
Immutable release. Only release title and notes can be modified.
d8d6449

Fixed

  • Breaking: A text/* response whose schema has no type (binary data; type: string, format: binary in 3.0) was read as UTF-8 text, so a CSV in Shift_JIS, for example, lost its bytes. It is now typed and read as a Blob. Use await data.text() where text was wanted. (#69)
  • Leave a flagged property out of an allOf member's $ref (#70)
  • Treat an empty server-sent event type as the default (#71)
  • Read a flow-style YAML document that is not JSON (#72)
  • Breaking: A request body declared by a media type range such as image/* could leave out contentType, and was then sent as another of the operation's media types. contentType is now required and typed by the range (`image/${string}`). For */* it stays a string, required only when the operation also has application/json. (#73)
  • Breaking: A request body could be a value that fetch sends as another media type. A multipart body other than multipart/form-data is now a Blob instead of FormData: build it yourself and give the Blob a type with the boundary, such as multipart/mixed; boundary=b. A binary body no longer takes FormData or URLSearchParams. (#74)
  • Leave out a property that another allOf $ref member flags (#75)

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 07:15
Immutable release. Only release title and notes can be modified.
7613703

Fixed

  • Type discriminator tags by the discriminating property (#54)
  • Stop generation hanging on a cycle of references (#55)
  • Report syntax errors as file:line:column (#64)
  • Report where in the document each error is (#65)
  • Give every error message the same form (#66)

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 14:20
Immutable release. Only release title and notes can be modified.
3cf5dcc

Fixed

  • Breaking: type: object next to allOf, oneOf or $ref added an index signature, so misspelled property names compiled in requests and undeclared properties could be read from responses. It now becomes object in the intersection, so both are type errors. (#49)

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 29 Oct 02:28
Immutable release. Only release title and notes can be modified.
8ace0a0

Fixed

  • A generated file declared status aliases it did not use, such as Status1xx, so a project that type-checks it with noUnusedLocals failed since 0.4.0. It now declares only the ones it uses. (#43)

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 10:10
Immutable release. Only release title and notes can be modified.
d27d883

Changed

  • Breaking: The generator computes which statuses each response key covers, instead of conditional types at every call, so calls type-check faster. ApiResponse takes the operation instead of its responses: ApiResponse<paths["/pets/{petId}"]["GET"]>. Each operation in paths has a statuses member. (#39)

Fixed

  • Breaking: A multipart body was sent with the Content-Type set in the client's or the call's headers, without a boundary, so the server could not parse it. fetch now sets the header, boundary included. Header objects can no longer name Content-Type, since the body's media type sets it; to send a body for a range such as */* as a given media type, pass contentType. (#41)

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 13:51
Immutable release. Only release title and notes can be modified.
24b3e7a

Added

  • Breaking: Type multipart/form-data bodies by their schema and follow Encoding Objects (#36)

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 13:34
Immutable release. Only release title and notes can be modified.
6b278e9

Removed

  • Breaking: The generated components no longer has refs and requestRefs. Schemas in other files or under $defs are still typed, and are reached through the component schemas and operations that refer to them. Named exports (import type { Pet }), schemas and components["schemas"] are unchanged.

Added

  • Node.js 22 is supported. The npm package now requires Node.js 22 or later instead of 24.

Fixed

  • patternProperties is no longer ignored. With additionalProperties: false, a value with a key that matches a pattern was rejected. TypeScript cannot restrict keys to a pattern, so such an object now has an index signature over every key, typed as the patterns and additionalProperties allow.
  • The variant that a discriminator's defaultMapping names no longer requires the discriminating property. The specification lets a value leave it out, and uses the defaultMapping schema then.
  • auth() accepts undefined credentials, such as an unset environment variable, under exactOptionalPropertyTypes. It already treated them as unavailable at runtime.
  • A call can leave out an optional request body without naming a media type, also when the operation declares several and none is implied.
  • A Cookie header in a call's headers option now joins the cookie parameters and replaces only the cookies of the same name. Before, it replaced them all.

Security

  • The generated client rejects a path that starts with // with a TypeError. With no server URL and no baseUrl, browsers resolved such a path as a URL on another host, and auth() sent credentials there.

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 25 Oct 11:42
Immutable release. Only release title and notes can be modified.
2baef2c

Changed

  • The documentation no longer lists Deno as a supported runtime for the generated client, since CI tests the client only in Node.js and Bun.