diff --git a/fern/docs/pages/overview/changelog/february-2024.mdx b/fern/docs/pages/overview/changelog/february-2024.mdx index a4b6a5967ee..1ffaebf0fb5 100644 --- a/fern/docs/pages/overview/changelog/february-2024.mdx +++ b/fern/docs/pages/overview/changelog/february-2024.mdx @@ -1,15 +1,67 @@ -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Changelog overview +### New SDK language: Ruby -## Go SDK generator +The Ruby SDK Generator is available for general use! This release introduces: +- Support for strongly typed models through the use of RBS type signatures. +- Integration with the Faraday HTTP client library, enabling the use of middlewares, keep-alives, and more. +- Automated publishing of the gem on RubyGems for easy access and distribution. + +→ Check out Fern-generated Ruby SDKs for [AssemblyAI](https://github.com/AssemblyAI/assemblyai-ruby-sdk), [Vellum](https://github.com/vellum-ai/vellum-client-ruby), and [Merge](https://github.com/merge-api/merge-ruby-client). -### [0.17.0-rc1] - 2024-02-23 +### Fern Docs: On-page feedback form + +Your documentation now features a feedback form where users can quickly share their opinions. They have the option to give a thumbs up (👍) or thumbs down (👎), along with a reason for their feedback. +- Users don't have to leave your documentation website to give feedback. +- Pre-configured reason codes and an optional space for additional comments. +- Instant notifications when you receive feedback via Slack or email. + +→ Try it on [Flatfile](https://reference.flatfile.com/overview/welcome) or [Superagent](https://docs.superagent.sh/)'s API documentation. + + +### SDK generator improvements + +We continuously improve our SDK generators based on user feedback. To get the latest release for a generator, upgrade the version in generators.yml. [See the latest generator versions](https://github.com/fern-api/fern?tab=readme-ov-file#-generators). + +#### TypeScript SDK +- **[Feature] Runtime compatibility:** The SDK defaults to node-fetch but will use the global fetch client if present. The SDK works in the following runtimes: +- Node.js 15+ +- Browser +- Vercel Functions +- Cloudflare Workers +- Deno v1.25+ +- Bun 1.0+ +- AWS Lamdba +- **[Feature] Runtime metadata:** The SDK generator now forwards information about the runtime that it is being used in. The header X-Fern-Runtime will report the runtime (e.g., browser, Node, Deno) and the header X-Fern-Runtime-Version will report the version. +- **[Feature] Binary:** Support for sending binary as a request body, relevant for application/octet-stream content-type. + +#### Python SDK +- **[Feature] Request options:** Add support for a RequestOptions object for each generated function. RequestOptions is a TypedDict, with optional fields, so there's no need to instantiate an object, just pass in the relevant keys within a dict. [Read more.](https://github.com/fern-api/fern/blob/main/generators/python/sdk/CHANGELOG.md#0101---2024-02-14) +- **[Feature] Environment variable scanning:** If the auth scheme has environment variables specified, the generated python client will scan those environment variables. [Read more.](https://github.com/fern-api/fern/blob/main/generators/python/sdk/CHANGELOG.md#081---2024-01-26) +- **[Compatibility] Python 3.8+:** Remove support for Python 3.7. In order to support newer versions of libraries we depend on (such as typing and typing-extensions), we have moved on to Python 3.8. + +#### Go SDK +- **[Feature] Idempotency:** Idempotency headers as a RequestOption. +- **[Feature] Retry login:** Automatic retry with exponential backoff. +- **[Feature] Binary:** Support for sending binary as a request body, relevant for application/octet-stream. +- **[Feature] Date and time:** Enforce RFC3339 for date[time] serialization in request bodies. + +#### Java SDK +- **[Feature] Idempotency:** Idempotency headers as a RequestOption. [Read more.](https://github.com/fern-api/fern/blob/main/generators/java/sdk/CHANGELOG.md#071---2024-02-04) + + +*** + +## Detailed generator changelogs + +### Go SDK generator + +#### [0.17.0-rc1] - 2024-02-23 - Fix: Snippets for aliases to optional primitive values. With this, the generated snippet will include the top-level pointer helpers (e.g. `acme.String(...)`). -### [0.17.0-rc0] - 2024-02-21 +#### [0.17.0-rc0] - 2024-02-21 - Fix: Package documentation is now generated into the correct package's `doc.go`. - Feature: Add support for generated endpoint snippets. @@ -44,45 +96,45 @@ response, err := client.User.Create( ) ``` -### [0.16.0] - 2024-02-12 +#### [0.16.0] - 2024-02-12 - Feature: The 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. -### [0.15.0] - 2024-02-09 +#### [0.15.0] - 2024-02-09 - Feature: Enforce RFC3339 for date[time] serialization in request bodies. -### [0.14.1] - 2024-02-07 +#### [0.14.1] - 2024-02-07 - Fix: Query parameter supoort for optional `time.Time` types. -### [0.14.0] - 2024-02-06 +#### [0.14.0] - 2024-02-06 - Feature: Add support for `deepObject` query parameters. - Chore: Refactor query parameter serialization with `url` struct tags. -### [0.13.0] - 2024-01-31 +#### [0.13.0] - 2024-01-31 - Feature: Add `packageName` generator configuration. - Feature: Add support for `bytes` request bodies wrapped in an in-lined request. -### [0.12.1] - 2024-01-31 +#### [0.12.1] - 2024-01-31 - Fix: `text/plain` response handling. -### [0.12.0] - 2024-01-30 +#### [0.12.0] - 2024-01-30 - Feature: Add support for `bytes` request bodies with `Content-Type` set to `application/octet-stream`. -### [0.11.0] - 2024-01-29 +#### [0.11.0] - 2024-01-29 - Feature: Add automatic retry with exponential backoff. -### [0.10.0] - 2024-01-25 +#### [0.10.0] - 2024-01-25 - Feature: Refactor `ClientOption` as `RequestOption`. - Feature: Add `includeLegacyClientOptions` generator configuration. @@ -92,14 +144,14 @@ response, err := client.User.Create( - Fix: Naming collision issue for undiscriminated unions that define more than one literal. -### [0.9.4] - 2024-01-10 +#### [0.9.4] - 2024-01-10 - Fix: File upload requests that specify query parameters. -## Java SDK generator +### Java SDK generator -### [0.8.4] - 2024-02-23 +#### [0.8.4] - 2024-02-23 - 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: ```java @@ -109,10 +161,10 @@ response, err := client.User.Create( client.films.list(ro); ``` -### [0.8.3] - 2024-02-23 +#### [0.8.3] - 2024-02-23 - Fix: The SDK generator now always creates a valid name for union discriminator wrapper classes. -### [0.8.2] - 2024-02-21 +#### [0.8.2] - 2024-02-21 - Fix: File upload endpoints no longer fail to compile because the reference to the mime type variable is present. @@ -124,7 +176,7 @@ response, err := client.User.Create( MediaType fileMediaType = fileMimeType != null ? MediaType.parse(fileMimeType) : null; ``` -### [0.8.1] - 2024-02-14 +#### [0.8.1] - 2024-02-14 - Feature: The RequestOptions object now supports configuring an optional timeout to apply per-request. ```java RequestOptions ro = RequestOptions.builder().timeout(90).build(); // Creates a timeout of 90 seconds for the request @@ -133,13 +185,13 @@ response, err := client.User.Create( client.films.list(ro); ``` -### [0.8.0] - 2024-02-11 +#### [0.8.0] - 2024-02-11 - 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. -### [0.7.1] - 2024-02-04 +#### [0.7.1] - 2024-02-04 - 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. @@ -177,18 +229,18 @@ response, err := client.User.Create( ``` -## Postman Collection generator +### Postman Collection generator -### [0.1.0] - 2024-02-11 +#### [0.1.0] - 2024-02-11 - Fix: The Postman generator no longer times out on the latest CLI version. The generator would previously throw on additional fields being present in the IR, which would prevent Fern from adding new fields. Now, the generator does not throw if additional fields are present. -## Python SDK generator +### Python SDK generator -### [0.11.6] - 2024-02-26 +#### [0.11.6] - 2024-02-26 - Improvement: You can now specify envvars to scan for headers, not just auth scheme headers. ``` @@ -221,15 +273,15 @@ response, err := client.User.Create( def __init__(self, *, apiKey: str = os.getenv("MY_API_KEY")) ``` -### [0.11.5] - 2024-02-23 +#### [0.11.5] - 2024-02-23 - Fix: Fix the usage of ApiError when leveraging auth envvars, when the schema for ApiError was changed, this usage was missed in the update. -### [0.11.4] - 2024-02-23 +#### [0.11.4] - 2024-02-23 - Fix: We now grab enum values appropriately when enums are within unions. -### [0.11.3] - 2024-02-22 +#### [0.11.3] - 2024-02-22 - Fix: Transition from lists to sequences within function calls, this is a fix as a result of how mypy handles type variance. This fix is only for function calls as testing shows that we do not hit the same issue within mypy with list[union[*]] fields on pydantic objects. @@ -256,7 +308,7 @@ response, err := client.User.Create( my_function("I work in both cases!") ``` -### [0.11.2] - 2024-02-21 +#### [0.11.2] - 2024-02-21 - Improvement (Beta): The Python generator now supports a configuration option called `improved_imports`. To enable this configuration, just add the following to your generators.yml @@ -280,7 +332,7 @@ response, err := client.User.Create( from sdk.fhir import Patient ``` -### [0.11.1] - 2024-02-20 +#### [0.11.1] - 2024-02-20 - Improvement: Python now supports specifying files to auto-export from the root `__init__.py` file, this means you can export custom classes and functions from your package for users to access like so: @@ -319,7 +371,7 @@ response, err := client.User.Create( """ ``` -### [0.11.0] - 2024-02-19 +#### [0.11.0] - 2024-02-19 - Improvement: Python now supports a wider range of types for file upload, mirroring the `httpx` library used under the hood, these are grouped under a new type `File`: @@ -386,7 +438,7 @@ response, err := client.User.Create( service.post(file_list=[f1, f2]) ``` -### [0.10.3] - 2024-02-19 +#### [0.10.3] - 2024-02-19 - Fix: Several bugfixes were made to related to literal properties. If a literal is used as a query parameeter, header, path parameter, or request parameter, the user @@ -417,7 +469,7 @@ response, err := client.User.Create( def chat_stream(self, *, query: str) -> None: ``` -### [0.10.2] - 2024-02-18 +#### [0.10.2] - 2024-02-18 - Fix: The SDK always sends the enum wire value instead of the name of the enum. For example, for the following enum, @@ -435,7 +487,7 @@ response, err := client.User.Create( - Fix: Revert #2719 which introduced additional issues with circular references within our Python types. -### [0.10.1] - 2024-02-14 +#### [0.10.1] - 2024-02-14 - Improvement: Add support for a RequestOptions object for each generated function within Python SDKs. This parameter is an optional final parameter that allows for configuring timeout, as well as pass in arbitrary data through to the request. RequestOptions is a TypedDict, with optional fields, so there's no need to instantiate an object, just pass in the relevant keys within a dict! @@ -458,13 +510,13 @@ response, err := client.User.Create( ) ``` -### [0.10.0] - 2024-02-13 +#### [0.10.0] - 2024-02-13 - Improvement: Remove support for Python 3.7. In order to support newer versions of libraries we depend on (such as typing and typing-extensions), we must move on to Python 3.8. With this change we are also able to: - Remove the `backports` dependency, as `cached_property` is now included within `functools` - Remove the upper bound dependency on Pydantic which had dropped support for Python 3.7 -### [0.9.1] - 2024-02-11 +#### [0.9.1] - 2024-02-11 - Fix: Remove literals from SDK function signatures, as they are not modifiable for end users. @@ -487,25 +539,25 @@ response, err := client.User.Create( - Fix: Acknowledge the optionality of a `File` property, previously we were requiring all `File` type inputs, even if they were specified as optional within the OpenAPI or Fern definition. Now, we check if the parameter is required and make the parameter optional if it is not. -### [0.9.0] - 2024-02-11 +#### [0.9.0] - 2024-02-11 - 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. -### [0.8.3-rc0] - 2024-01-29 +#### [0.8.3-rc0] - 2024-01-29 - Fix: Increase recursion depth to allow for highly nested and complex examples, this is a temporary solution while the example datamodel is further refined. -### [0.8.2-rc0] - 2024-01-28 +#### [0.8.2-rc0] - 2024-01-28 - Fix: The Python SDK better handles cyclical references. In particular, cyclical references are tracked for undiscriminated unions, and update_forward_refs is always called with object references. -### [0.8.1] - 2024-01-26 +#### [0.8.1] - 2024-01-26 - Feature: If the auth scheme has environment variables specified, the generated python client will scan those environment variables. @@ -531,7 +583,7 @@ response, err := client.User.Create( def __init__(self, *, apiKey: str = os.getenv("FERN_API_KEY")) ``` -### [0.8.0] - 2024-01-25 +#### [0.8.0] - 2024-01-25 - Fix: Enums in inlined requests send the appropriate value. @@ -550,9 +602,9 @@ response, err := client.User.Create( ``` -## Ruby SDK generator +### Ruby SDK generator -### [0.2.0] - 2024-02-20 +#### [0.2.0] - 2024-02-20 - Improvement: Ruby enum construct now leverages class constants instead of hashes to support better autocomplete For example, previously enums would be constructed as: @@ -604,16 +656,16 @@ response, err := client.User.Create( resp = imbd.ticket.purchase(id: "", request_options: request_options) ``` -### [0.1.1] - 2024-02-15 +#### [0.1.1] - 2024-02-15 - Fix: ensure the Ruby generators do not have strict dependencies on the IR. The generators have been updated to allow non breaking changes for the IR and the Fern CLI to happen without issue. -### [0.1.0-rc0] - 2024-02-12 +#### [0.1.0-rc0] - 2024-02-12 - Improvement: loosen the Faraday dependencies within the generated SDKs, now we are supporting Faraday 1.x, while continuing to support the same upperbound (specifically supporting the latest major version as well). - Release a minor version as the Ruby generator is now being used in beta! -### [0.0.6] - 2024-02-09 +#### [0.0.6] - 2024-02-09 - Improvement: license files are now specified within the gem config if they are provided @@ -638,7 +690,7 @@ generators: package-name: "petstore" ``` -### [0.0.5] - 2024-02-06 +#### [0.0.5] - 2024-02-06 - This release contains no changes to the API. @@ -647,7 +699,7 @@ generators: - Add properties to subpackages: previously properties on subpackages were not being exposed - Ensure optional properties in from_json are only parsed if present -### [0.0.4] - 2024-02-05 +#### [0.0.4] - 2024-02-05 - This release contains no changes to the API. @@ -659,7 +711,7 @@ generators: - Bug fixes: addresses a number of typos and other issues previously contained within the generation code. -### [0.0.2] - 2024-02-01 +#### [0.0.2] - 2024-02-01 - Improvement: Consolidate imports into the main file for easier gem usage, as opposed to directly importing the specific file (e.g. `require "fern" vs. require "fern/types/folder_a/object"`) @@ -677,14 +729,14 @@ groups: package-name: "petstore" ``` -### [0.0.1] - 2024-02-01 +#### [0.0.1] - 2024-02-01 - Improvement: Support client generation (async and async) as well as most endpoint types (except streaming) -## TypeScript SDK generator +### TypeScript SDK generator -### [0.11.5] - 2024-02-15 +#### [0.11.5] - 2024-02-15 - Fix: Previously `core.Stream` would not work in the Browser. Now the generated Fern SDK includes a polyfill for `ReadableStream` and uses `TextDecoder` instead of `Buffer`. @@ -698,34 +750,34 @@ groups: includeApiReference: true ``` -### [0.11.4] - 2024-02-15 +#### [0.11.4] - 2024-02-15 - Fix: The `Fetcher` now supports sending binary as a request body. This is important for APIs that intake `application/octet-stream` content types or for folks that have .fernignored their and added custom utilities that leverage the fetcher. -### [0.11.3] - 2024-02-13 +#### [0.11.3] - 2024-02-13 - Fix: ensure SDK generator always uses `node-fetch` in Node.js environments. There is an experimental fetch packaged with newer versions of Node.js, however it causes unexpected behavior with file uploads. -### [0.11.2] - 2024-02-13 +#### [0.11.2] - 2024-02-13 - Fix: ensure SDK generator does not drop additional parameters from requests that perform file upload. Previously, if an endpoint had `file` inputs without additional `body` parameters, query parameters were eroniously ignored. -### [0.11.1] - 2024-02-13 +#### [0.11.1] - 2024-02-13 - Fix: The SDK generator no longer generates a `tsconfig.json` with `noUnusedParameters` enabled. This check was too strict. -### [0.11.0] - 2024-02-13 +#### [0.11.0] - 2024-02-13 - Feature: The SDK generator now forwards information about the runtime that it is being used in. The header `X-Fern-Runtime` will report the runtime (e.g. `browser`, `node`, `deno`) and the header `X-Fern-Runtime-Version` will report the version. -### [0.10.0] - 2024-02-11 +#### [0.10.0] - 2024-02-11 - Feature: The SDK generator now supports whitelabelling. When this is turned on, there will be no mention of Fern in the generated code. @@ -733,19 +785,15 @@ groups: **Note**: You must be on the enterprise tier to enable this mode. -## Fern Docs +### Fern Docs -### 2024-02-23 +#### 2024-02-23 - When a language selection is changed, maintain the same visual scroll position by measuring the scroll position before and after the change. -- Added Go SDK to the code snippet language selection. -- Icon is now available as a markdown component. Usage (color and size are optional): - -```markdown - -``` +- Added Go SDK to the code snippet language selection dropdown menu. +- Icon is now available as a markdown component. For details on usage, see the [Icon component documentation](/fern-docs/content/component-library/icons). -### 2024-02-22 +#### 2024-02-22 - Added line numbers to code samples. - Added Content-Type toggle to endpoint that supports both application/json and multipart/form-data. \ No newline at end of file