All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Improvement: The timeout specified on the RequestOptions object now sets the timeout on the entire call, not just the read timeout of the request.
As a refresher, a timeout can be added per request like so:
RequestOptions ro = RequestOptions.builder().timeout(90).build(); // Creates a timeout of 90 seconds for the request // You could also specify the timeunit, similar to as if you were using OkHttp directly // RequestOptions ro = RequestOptions.builder().timeout(2, TimeUnit.MINUTES).build(); client.films.list(ro);
- Fix: The SDK generator now always creates a valid name for union discriminator wrapper classes.
-
Fix: File upload endpoints no longer fail to compile because the reference to the mime type variable is present.
// Code that failed to compile String fileMimeType = Files.probeContentType(file.toPath()); MediaType fileMediaType = fileMimeType != null ? MediaType.parse(mimeType) : null; // mimeType undefined // Code that now compiles MediaType fileMediaType = fileMimeType != null ? MediaType.parse(fileMimeType) : null;
- Feature: The RequestOptions object now supports configuring an optional timeout to apply per-request.
RequestOptions ro = RequestOptions.builder().timeout(90).build(); // Creates a timeout of 90 seconds for the request // You could also specify the timeunit, similar to as if you were using OkHttp directly // RequestOptions ro = RequestOptions.builder().timeout(2, TimeUnit.MINUTES).build(); client.films.list(ro);
-
Feature: The SDK generator now supports whitelabelling. When this is turned on, there will be no mention of Fern in the generated code.
Note: You must be on the enterprise tier to enable this mode.
- Chore: Bump intermediate representation to v31
- Feature: The SDK generator now supports idempotency headers. Users
will be able to specify the idempotency headers in RequestOptions.
Imdb imdb = Imdb.builder() .apiKey("...") .build(); var response = imdb.ticket.purchase("theatre-id", IdempotentRequestOptions.builder() .idempotencyKey("...") .build());
- Feature: The SDK generator now supports scanning API credentials
via environment varaibles.
Imdb imdb = Imdb.builder() .apiKey("...") // defaults to System.getenv("IMDB_API_KEY") .build();
- Feature: The generated models now support boolean literals and users
do not have to specify them in the builder.
For example, for the following object
the user will not need to specify the literal properties when building the object.
Actor: properties: name: string isMale: literal<true>
var actor = Actor.builder() .name("Brad Pitt") .build();
- Chore: Intialize this changelog