Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dwolla/natchez-smithy4s
Utilities for integration between Natchez and Smithy4s
https://github.com/dwolla/natchez-smithy4s
Last synced: about 10 hours ago
JSON representation
Utilities for integration between Natchez and Smithy4s
- Host: GitHub
- URL: https://github.com/dwolla/natchez-smithy4s
- Owner: Dwolla
- License: mit
- Created: 2024-07-12T17:50:43.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T12:19:53.000Z (9 days ago)
- Last Synced: 2024-10-28T15:57:58.383Z (9 days ago)
- Language: Scala
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Natchez-Smithy4s
Utilities for integration between [Natchez](https://github.com/typelevel/natchez) and [Smithy4s](https://disneystreaming.github.io/smithy4s/).
## Usage
Add the library to your build:
```scala
"com.dwolla" %% "natchez-smithy4s" % {version}
```Then create a file to [annotate your shapes](https://disneystreaming.github.io/smithy4s/docs/guides/model-preprocessing/#note-on-third-party-models):
```smithy
$version: "2.0"
namespace com.dwolla.example.smithyuse com.dwolla.tracing.smithy#traceable
apply CipherText @traceable
apply PlainText @traceable(redacted: "redacted plaintext value")
```The `@traceable` trait can be applied without any modifier, in which case a `natchez.TraceableValue` instance will be generated that includes the actual value of the field.
If the `@traceable` trait is used with a `redacted` modifier, the `TraceableValue` instance will emit the passed string and not reference the actual value of the field in any way.