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.
-
Feature: The FastAPI
async_handlers
configuration now accepts a list of string or a boolean so that users can turn on async handlers for specific endpoints. For example, to turn on async handlers for ausers.create
endpoint, use the configuration below:- name: fernapi/fern-fastapi-server version: 1.2.0 config: async_handlers: - users.create
- Internal: The generator now consumes IRv53.
-
Break: The generated server stubs now support Pydantic V2 outright, it no longer uses
pydantic.v1
models. This change introduces additional breaks:- Wrapped aliases have been removed
- Custom root validators for models with a root type have been removed (e.g. only unions with utils still leverages root models)
- Public fields previously prefixed with
_
are now prefixed withf_
(Pydantic V2 does not allow for_
prefixes on public fields and Python does not allow for a numeric prefix)
-
NOTE: This version allows for upgrading your FastAPI version to latest (> 0.111.0), as well as Pydantic V2. If you are leveraging
output: location: local-file-system
you will have to bump these versions yourself!
- Fix: The FastAPI generator now respects the
use_str_enums
flag, and defaults it toFalse
.
- Fix: The FastAPI generator now correctly sanitizes parameter descriptions. Previously it was duplicating strings.
- Upgrade: The generator now consumes IRv49.
- Internal: The generator now consumes IRv46.
- Feature: The FastAPI generator now accepts the
extra_fields
configuration. You can allow extra fields with the following:
- name: fernapi/fern-fastapi-server
version: 0.10.0
config:
pydantic_config:
extra_fields: allow
- Fix: pydantic utilities are brought inline with the SDK and model generator
- Fix: paths are no longer prefixed with double forward slashes.
- No changes.
- Fix: Pydantic utilities are now copied over to the project
- Feature: The generator now depends on v39 of Intermediate Representation which requires the latest CLI.
-
Feature: The generator now depends on v38 of Intermediate Representation which requires the latest CLI.
-
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, ascached_property
is now included withinfunctools
- Remove the upper bound dependency on Pydantic which had dropped support for Python 3.7
- Remove the
- Fix: Increase recursion depth to allow for highly nested and complex examples, this is a temporary solution while the example datamodel is further refined.
- Fix: better handles cyclical references. In particular, cyclical references are tracked for undiscriminated unions, and update_forward_refs is always called with object references.
- Chore: Intialize this changelog