Skip to content

Commit

Permalink
Merge pull request #53 from utybo/release-0.0.3
Browse files Browse the repository at this point in the history
Release 0.0.3
  • Loading branch information
utybo authored Oct 1, 2022
2 parents 454eae3 + 0b94def commit 1a47c9f
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 196 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ 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).

## [Unreleased] (0.0.3)
## [Unreleased] (0.0.4)

## [0.0.3] - 2022-10-01

### Added

- General

- All packages can now be used with Java 11
([#45](https://github.com/utybo/Tegral/pull/45))

- `tegral-openapi-ktor-resources`

- Initial release ([#43](https://github.com/utybo/Tegral/pull/43))
Expand Down Expand Up @@ -205,9 +212,6 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- General

- All packages can now be used with Java 11
([#45](https://github.com/utybo/Tegral/pull/45))

- Bumped Ktor version to version 2.0.3
([#17](https://github/utybo/Tegral/pull/17))

Expand Down Expand Up @@ -366,6 +370,7 @@ Initial release of Tegral.
- `tegral-web-controllers-test`
- Initial release

[Unreleased]: https://github.com/utybo/Tegral/compare/v0.0.2..main
[Unreleased]: https://github.com/utybo/Tegral/compare/v0.0.3..main
[0.0.3]: https://github.com/utybo/Tegral/compare/v0.0.2..v0.0.3
[0.0.2]: https://github.com/utybo/Tegral/compare/v0.0.1..v0.0.2
[0.0.1]: https://github.com/utybo/Tegral/compare/v0.0.1
54 changes: 54 additions & 0 deletions docs/blog/2022-10-01-tegral-003/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Tegral 0.0.3 release
description: Just a big ol' bunch of bug fixes and improvements
slug: tegral-0-0-3-release
authors:
- name: utybo
title: Maintainer
url: https://github.com/utybo
image_url: https://github.com/utybo.png
tags: [release]
image: zhao-chen-ag-RTLJgy54-unsplash.jpg
---

Tegral 0.0.3 fixes a few things from the 0.0.2 updates. It also adds a new integration for Ktor resources.

<!--truncate-->

![An image of a foggy mountain scenery](zhao-chen-ag-RTLJgy54-unsplash.jpg)

This release is much less packed than [the 0.0.2 version](/2022-08-14-tegral-002/index.md) but features something new: a community contribution! On a personal note, I never really expected to see PRs from other people -- I knew that my previous project [Koa](https://github.com/utybo/Koa) (which [Tegral OpenAPI](pathname:///docs/modules/core/openapi/) replaces) gained some traction, or at least enough for people to say it should [be updated](https://github.com/utybo/Koa/issues/4).

Without further ado, let's have a look at some highlights from the changelog!

## Integration with Ktor Resources

Thanks to [@serras](https://github.com/serras)' contribution, you can now use Tegral OpenAPI with [Ktor's type-safe routing feature (aka resources)](https://ktor.io/docs/type-safe-routing.html).

To get started, add the new `tegral-openapi-ktor-resources` package. You'll then be able to describe endpoints like this:

```kotlin
@Resource("/hello/{name}")
@Serializable
class Hello(val name: String) {
companion object : OpenApiDescription by describeResource({
description = "Returns a greeting"
})
}
```

This is currently just a shortcut for embedding OpenAPI descriptions in your resources file, which feels more natural.

Have a look at the [documentation](pathname:///docs/modules/core/openapi/ktor#integration-with-resources) for more information.

## Bug fixes

This release mostly includes small bug fixes:

- You can now use Tegral artifacts with Java 11+ instead of the previous 17+!

- Properly deprecate the `scope.factory()` syntax and the various `wrapIn` utility functions from Tegral DI. This syntax is useless since [the introduction of the new resolution system](../2022-08-14-tegral-002/index.md#more-flexible-injections-in-tegral-di) and I just forgot to deprecate it (oops).

- Tegral OpenAPI generated `null` values for examples instead of letting Swagger do its thing and generate one, which led to confusing OpenAPI and Swagger documents. This has been fixed, and OpenAPI no longer generates examples by default.

- In Tegral Web, the `RootConfig` was improperly exposed to the DI environment, which led to weird acrobatics being required to retrieve the configuration. This has been fixed and you can now access your configuration objects via its class or via `RootConfig`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"dependencies": {
"@algolia/client-search": "^4.9.1",
"@docusaurus/core": "2.0.1",
"@docusaurus/preset-classic": "2.0.1",
"@docusaurus/core": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"docusaurus-plugin-ackee": "^0.0.0",
Expand All @@ -31,7 +31,7 @@
"unist-util-visit": "^2.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.1",
"@docusaurus/module-type-aliases": "2.1.0",
"@types/react": "^18.0.9"
},
"browserslist": {
Expand Down
Loading

0 comments on commit 1a47c9f

Please sign in to comment.