Skip to content

Commit

Permalink
add changelog in migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Jul 31, 2024
1 parent 8763e36 commit 376fea4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions docs/src/migrations/v3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,60 @@

This document aims to help you update your application from **stac-fastapi** 2.5 to 3.0.0.

## CHANGELOG

### Removed

* Removed the `Context` extension
* Removed `stac_fastapi.api.openapi.config_openapi` method and `stac_fastapi.api.openapi.VndOaiResponse` class
* Removed `response_class` argument in `stac_fastapi.api.routes.create_async_endpoint` method
* Removed `filter_fields` property in `stac_fastapi.extensions.core.fields.request.PostFieldsExtension` class
* Removed `pagination_extension` attribute in `stac_fastapi.api.app.StacApi`
* Removed `default_includes` from `stac_fastapi.types.config.ApiSettings` ([#706](https://github.com/stac-utils/stac-fastapi/pull/706))
* Removed use of `pagination_extension` in `register_get_item_collection` function (User now need to construct the request model and pass it using `items_get_request_model` attribute)
* Removed use of `FieldsExtension` in `stac_fastapi.api.app.StacApi`. NOTE: If users use `FieldsExtension`, they HAVE TO handle skipping the model validation step by returning a `JSONResponse` from the `post_search` and `get_search` client methods
* Removed `add_middleware` method in `StacApi` object and let starlette handle the middleware stack creation ([#721](https://github.com/stac-utils/stac-fastapi/pull/721))
* Removed `pystac` dependecy, as it was just used for a *datetime-to-string* function ([#690](https://github.com/stac-utils/stac-fastapi/pull/690))
* Removed internal Search and Operator Types in favor of stac_pydantic Types ([#625](https://github.com/stac-utils/stac-fastapi/pull/625))

### Changed

* Update to **pydantic 2.0** ([#625](https://github.com/stac-utils/stac-fastapi/pull/625))
* Update stac-pydantic requirement to `~3.1` ([#697](https://github.com/stac-utils/stac-fastapi/pull/697))
* Switch from `fastapi` to `fastapi-slim` to avoid installing unwanted dependencies ([#687](https://github.com/stac-utils/stac-fastapi/pull/687))
* Update FastAPI requirement to `>=0.111.0`
* Moved `AsyncBaseFiltersClient` and `BaseFiltersClient` classes in `stac_fastapi.extensions.core.filter.client` submodule
* Add more openapi metadata in input models ([#734](https://github.com/stac-utils/stac-fastapi/pull/734))
* Use same `Limit` (capped to `10_000`) for `/items` and `GET - /search` input models ([#738](https://github.com/stac-utils/stac-fastapi/pull/738))
* Moved `GETPagination`, `POSTPagination`, `GETTokenPagination` and `POSTTokenPagination` to `stac_fastapi.extensions.core.pagination.request` submodule ([#717](https://github.com/stac-utils/stac-fastapi/pull/717))
* Added option for default route dependencies `*` can be used for `path` or `method` to match all allowed route. ([#705](https://github.com/stac-utils/stac-fastapi/pull/705))
* Moved `AsyncBaseFiltersClient` and `BaseFiltersClient` classes in `stac_fastapi.extensions.core.filter.client` submodule ([#704](https://github.com/stac-utils/stac-fastapi/pull/704))
* Replace Enum with `Literal` for `FilterLang`. ([#686](https://github.com/stac-utils/stac-fastapi/pull/686))
* Fix response model *validation* ([#625](https://github.com/stac-utils/stac-fastapi/pull/625))
* Use status code 201 for Item/Collection creation ([#625](https://github.com/stac-utils/stac-fastapi/pull/625))
* Add `response_class` attribute in `FilterExtension` class
* Add version pinning (`~=3.0`) for stac-fastapi submodules

### Fixed

* Updated default `filter` language in filter extension's POST search request model to match the extension's documentation ([#711](https://github.com/stac-utils/stac-fastapi/issues/711))
* Fix missing default (`None`) for optional `query` attribute in `QueryExtensionPostRequest` model ([#701](https://github.com/stac-utils/stac-fastapi/pull/701))
* Make `str_to_interval` not return a tuple for single-value input (fixing `datetime` argument as passed to `get_search`). ([#692](https://github.com/stac-utils/stac-fastapi/pull/692))

### Added

* Add enhanced middleware configuration to the StacApi class, enabling specific middleware options and dynamic addition post-application initialization. ([#442](https://github.com/stac-utils/stac-fastapi/pull/442))
* Add *response* pydantic models to OpenAPI, even if model validation is turned off ([#625](https://github.com/stac-utils/stac-fastapi/pull/625))
* Add attributes to `stac_fastapi.api.app.StacApi` to enable customization of request model for:
- `/collections`: **collections_get_request_model**, default to `EmptyRequest`
- `/collections/{collection_id}`: **collection_get_request_model**, default to `CollectionUri`
- `/collections/{collection_id}/items`: **items_get_request_model**, default to `ItemCollectionUri`
- `/collections/{collection_id}/items/{item_id}`: **item_get_request_model**, default to `ItemUri`
* Add **Aggregation** extension ([#684](https://github.com/stac-utils/stac-fastapi/pull/684))
* Add **Free-text** extension ([#655](https://github.com/stac-utils/stac-fastapi/pull/655))
* Add **Collection-Search** extension ([#736](https://github.com/stac-utils/stac-fastapi/pull/736), [#739](https://github.com/stac-utils/stac-fastapi/pull/739))


## Dependencies

- **pydantic~=2.0**
Expand Down

0 comments on commit 376fea4

Please sign in to comment.