Repository navigation
Releases
Releases · 22mb/oasis
v0.8.0
Immutable
release. Only release title and notes can be modified.
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 atype) in one response was read as aBlobin every response of the operation, even where its type wasstringor an event stream. It is now read as aBlobonly for the statuses of the response that declares it, sodatais what its type says. Code that read suchdataas aBlobagainst its type must read it as typed. (#97) - Breaking: The
dataof a 204, 205 or 304 response that the document covers only with2XX,3XXordefaultwas typed as that key's body, though the client returnsundefinedfor it. It is nowundefined. With200anddefault: Error,datainif (!res.ok)now includes theundefinedof a 304: read it with?., or narrow bystatusfirst. (#96) - Send a request resent through auth with only the credentials chosen for it (#98)
- Breaking: A response declared as the range
text/*was typedstring, though the client readstext/event-streamand+jsontypes under it as an event stream or as JSON. Itsdatais nowunknown, as for*/*andapplication/*. Check its type before use, or declare the media types the response sends, such astext/plain, which staystring. (#99) - Breaking: A subtype that adds nothing to a parent that only lists its subtypes in
oneOforanyOfwas typedunknown. Such a document is now an error. Give the subtype or its parent atypeorproperties, such as the discriminator property. (#100)
v0.7.0
Immutable
release. Only release title and notes can be modified.
Fixed
- Breaking:
minItemswas not read, so an array withminItems: 1took an empty array. An array withoutprefixItemsis now a tuple whose firstminItemsitems are required:[T, ...T[]]for 1,[T, T, ...T[]]for 2. Its first items are also no longerT | undefinedundernoUncheckedIndexedAccess. (#77) - Breaking: In a
multipart/form-databody composed withallOforoneOf, a part without atypewasunknown. It is now aBlob, as in a body whose schema is an object, so a value other than aBlobno 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éasCaf). Such a name is now an error. Rename the component. (#88) - Breaking:
propertyNameswas not read, so a map whose keys anenumlimits took any key. WherepropertyNameslists the names withenumorconst, the object now has an optional property for each of them, of the type ofadditionalProperties, and no other key. (#89)
v0.6.0
Immutable
release. Only release title and notes can be modified.
Fixed
- Breaking: A
text/*response whose schema has notype(binary data;type: string, format: binaryin 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 aBlob. Useawait 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 outcontentType, and was then sent as another of the operation's media types.contentTypeis now required and typed by the range (`image/${string}`). For*/*it stays astring, required only when the operation also hasapplication/json. (#73) - Breaking: A request body could be a value that fetch sends as another media type. A multipart body other than
multipart/form-datais now aBlobinstead ofFormData: build it yourself and give theBlobatypewith the boundary, such asmultipart/mixed; boundary=b. A binary body no longer takesFormDataorURLSearchParams. (#74) - Leave out a property that another allOf $ref member flags (#75)
v0.5.1
Immutable
release. Only release title and notes can be modified.
v0.5.0
Immutable
release. Only release title and notes can be modified.
Fixed
- Breaking:
type: objectnext toallOf,oneOfor$refadded an index signature, so misspelled property names compiled in requests and undeclared properties could be read from responses. It now becomesobjectin the intersection, so both are type errors. (#49)
v0.4.1
Immutable
release. Only release title and notes can be modified.
Fixed
- A generated file declared status aliases it did not use, such as
Status1xx, so a project that type-checks it withnoUnusedLocalsfailed since 0.4.0. It now declares only the ones it uses. (#43)
v0.4.0
Immutable
release. Only release title and notes can be modified.
Changed
- Breaking: The generator computes which statuses each response key covers, instead of conditional types at every call, so calls type-check faster.
ApiResponsetakes the operation instead of itsresponses:ApiResponse<paths["/pets/{petId}"]["GET"]>. Each operation inpathshas astatusesmember. (#39)
Fixed
- Breaking: A multipart body was sent with the
Content-Typeset in the client's or the call'sheaders, without a boundary, so the server could not parse it.fetchnow sets the header, boundary included. Header objects can no longer nameContent-Type, since the body's media type sets it; to send a body for a range such as*/*as a given media type, passcontentType. (#41)
v0.3.0
Immutable
release. Only release title and notes can be modified.
Added
- Breaking: Type multipart/form-data bodies by their schema and follow Encoding Objects (#36)
v0.2.0
Immutable
release. Only release title and notes can be modified.
Removed
- Breaking: The generated
componentsno longer hasrefsandrequestRefs. Schemas in other files or under$defsare still typed, and are reached through the component schemas and operations that refer to them. Named exports (import type { Pet }),schemasandcomponents["schemas"]are unchanged.
Added
- Node.js 22 is supported. The npm package now requires Node.js 22 or later instead of 24.
Fixed
patternPropertiesis no longer ignored. WithadditionalProperties: 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 andadditionalPropertiesallow.- The variant that a discriminator's
defaultMappingnames no longer requires the discriminating property. The specification lets a value leave it out, and uses thedefaultMappingschema then. auth()acceptsundefinedcredentials, such as an unset environment variable, underexactOptionalPropertyTypes. 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
Cookieheader in a call'sheadersoption now joins thecookieparameters 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 aTypeError. With no server URL and nobaseUrl, browsers resolved such a path as a URL on another host, andauth()sent credentials there.
v0.1.2
Immutable
release. Only release title and notes can be modified.
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.