Skip to content

Commit 081bc16

Browse files
authored
Merge pull request #306 from disneystreaming/documentation-polishing
Polish the documentation, use more consistent casing
2 parents 2d07dba + a6f10f0 commit 081bc16

File tree

9 files changed

+54
-54
lines changed

9 files changed

+54
-54
lines changed

modules/docs/src/01-overview/01-intro.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ title: Intro
55

66
[Smithy](https://awslabs.github.io/smithy/) is an interface definition language (IDL) provided by AWS. It is protocol agnostic, flexible, and reasonably low surface, which facilitates the writing of tooling around it.
77

8-
smithy4s is a tool that generates third-party-free, protocol-agnostic scala code from smithy specifications.
8+
Smithy4s is a tool that generates third-party-free, protocol-agnostic scala code from smithy specifications.
99

1010
Smithy4s can be used to:
1111
* quickly derive http/rest servers and clients
1212
* derive pure-scala AWS clients
1313
* derive CLI tools
1414
* and has the potential for much, much more!
15-

modules/docs/src/02-the-smithy-idl/01-smithy-idl.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Annotations are called `traits` in smithy.
1515

1616
## The smithy metamodel
1717

18-
In this section, we'll list various available [shapes](https://awslabs.github.io/smithy/quickstart.html#shapes-and-traits) that let you define data and operations in smithy, and how they translate in the Scala code generated by smithy4s.
18+
In this section, we'll list various available [shapes](https://awslabs.github.io/smithy/quickstart.html#shapes-and-traits) that let you define data and operations in smithy, and how they translate in the Scala code generated by Smithy4s.
1919

2020
### Primitive types
2121

@@ -171,7 +171,7 @@ package object foo {
171171
}
172172
```
173173

174-
`HelloService` is type alias that exposes a normal "functor-shaped" type parameter: we are aware that the most common usecase of smithy4s abides by the "capatibility trait" pattern (or tagless-final), against effect types that probably abide by the cats-effect semantics.
174+
`HelloService` is type alias that exposes a normal "functor-shaped" type parameter: we are aware that the most common usecase of Smithy4s abides by the "capatibility trait" pattern (or tagless-final), against effect types that probably abide by the cats-effect semantics.
175175

176176
However, the actual interface is `HelloServiceGen`, which has a higher degree of polymorphism. It looks like this:
177177

@@ -198,4 +198,4 @@ Keeping track of these parameters is really important for the implementation in
198198

199199
### Currently **not** supported (in particular)
200200

201-
Smithy has a `resource` type of shape, that represents CRUD specialised services. It is currently not supported in smithy4s.
201+
Smithy has a `resource` type of shape, that represents CRUD specialised services. It is currently not supported in Smithy4s.

modules/docs/src/02-the-smithy-idl/02-traits.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ structure MyStructure {
5353
}
5454
```
5555

56-
### Regarding smithy4s handling of traits
56+
### Regarding Smithy4s handling of traits
5757

5858
Smithy4s automatically creates corresponding values in the generated Scala code, for all the annotations it finds, whether defined in the smithy prelude, or defined by users.
5959

Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
sidebar_label: Protocols and smithy4s
3-
title: Protocols and smithy4s
2+
sidebar_label: Protocols and Smithy4s
3+
title: Protocols and Smithy4s
44
---
55

6-
The code generated by smithy4s is strictly **protocol agnostic**, meaning that there is no particular processing to handle HTTP semantics, or JSON semantics in the generated code.
6+
The code generated by Smithy4s is strictly **protocol agnostic**, meaning that there is no particular processing to handle HTTP semantics, or JSON semantics in the generated code.
77

8-
Instead, smithy4s relies on a number of highly polymorphic interfaces to communicate with the generated code, and derive JSON codecs out of it, or turn high level user provided code into HTTP services. But in theory, the same generated code can be used conjointly with other serialisation technologies (protobuf for instance) and protocols (gRPC).
8+
Instead, Smithy4s relies on a number of highly polymorphic interfaces to communicate with the generated code, and derive JSON codecs out of it, or turn high level user provided code into HTTP services. But in theory, the same generated code can be used conjointly with other serialisation technologies (protobuf for instance) and protocols (gRPC).
99

10-
Protocol specific "hints" (called [traits](../02-the-smithy-idl/02-traits.md))can be added to the smithy models. smithy4s accurately renders corresponding values, and allows for their retrieval via the polymorphic interfaces. This is how HTTP semantics can be derived from the generated code, for instance.
10+
Protocol specific "hints" (called [traits](../02-the-smithy-idl/02-traits.md))can be added to the smithy models. Smithy4s accurately renders corresponding values, and allows for their retrieval via the polymorphic interfaces. This is how HTTP semantics can be derived from the generated code, for instance.
1111

1212
Smithy4s is also not tied to any third-party library, and users could provide integrations with existing libraries on their own side, or come up with new interesting usecases.
1313

14-
However, smithy4s provides a few out-of-the-box integrations that are described in this section.
14+
However, Smithy4s provides a few out-of-the-box integrations that are described in this section.

modules/docs/src/03-protocols/03-aws/01-aws.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ sidebar_label: AWS
44

55
**WARNING: THIS IS EXPERIMENTAL, DO NOT NOT EXPECT PRODUCTION READINESS**
66

7-
smithy4s provides functions to create AWS clients from generated code. At the time of writing this, smithy4s is only able to derive clients for AWS services that use the [AWS Json 1.0/1.1 protocol](https://awslabs.github.io/smithy/1.0/spec/aws/index.html?highlight=aws%20protocols#aws-protocols).
7+
Smithy4s provides functions to create AWS clients from generated code. At the time of writing this, smithy4s is only able to derive clients for AWS services that use the [AWS Json 1.0/1.1 protocol](https://awslabs.github.io/smithy/1.0/spec/aws/index.html?highlight=aws%20protocols#aws-protocols).
88

99
The AWS smithy specs (that are written in json syntax) can be found in some of the [official SDKs](https://github.com/aws/aws-sdk-js-v3/tree/main/codegen/sdk-codegen/aws-models) published by AWS. These `.json files` can be understood by smithy4s, just like `.smithy`, and can be used to generate code. Just copy/paste them in your project.
1010

11-
We (the smithy4s maintainers) **do not** intend to publish pre-generated artifacts containing the AWS clients, there's a lot of nuance there and maintainance burden that we do not have the capacity to assume. In particular, backward binary compatibility of the generated code is impossible to guarantee at this time.
11+
We (the Smithy4s maintainers) **do not** intend to publish pre-generated artifacts containing the AWS clients, there's a lot of nuance there and maintainance burden that we do not have the capacity to assume. In particular, backward binary compatibility of the generated code is impossible to guarantee at this time.
1212

1313
#### Setup
1414

modules/docs/src/04-codegen/01-customisation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Smithy4s is opinionated in what the generated code look like, there are a few th
77

88
#### Packed inputs
99

10-
By default, smithy4s generates methods the parameters of which map to the fields of the input structure of the corresponding operation.
10+
By default, Smithy4s generates methods the parameters of which map to the fields of the input structure of the corresponding operation.
1111

1212
For instance :
1313

@@ -65,7 +65,7 @@ trait PackedInputServiceGen[F[_]] {
6565

6666
#### ADT Member Trait
6767

68-
The default behavior of smithy4s when rendering unions that target structures is to render the structure
68+
The default behavior of Smithy4s when rendering unions that target structures is to render the structure
6969
in a separate file from the union that targets it. This makes sense if the structure is used in other
7070
contexts other than the union. However, it also causes an extra level of nesting within the union.
7171
This is because the union will create another case class to contain your structure case class.
@@ -131,7 +131,7 @@ The structure annotated with `adtMember` (e.g. `InStoreOrder`) also must not be
131131
structures or unions in the model. There is a validator that will make sure these requirements are met
132132
whenever the `adtMember` trait is in use.
133133

134-
Note: The `adtMember` trait has NO impact on the serialization/deserialization behaviors of smithy4s.
134+
Note: The `adtMember` trait has NO impact on the serialization/deserialization behaviors of Smithy4s.
135135
The only thing it changes is what the generated code looks like. This is accomplished by keeping the
136136
rendered schemas equivalent, even if the case class is rendered in a different place.
137137

modules/docs/src/05-design/01-design.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ sidebar_label: General design principles
33
title: General design principles
44
---
55

6-
Before we dive in to the design elements, it is important to state that smithy4s is designed with the following constraints :
6+
Before we dive in to the design elements, it is important to state that Smithy4s is designed with the following constraints :
77

8-
* **optimised for number of usecases**: smithy4s is **not** (just) an http/json library, it can/could be used for a great many things, such as AWS SDKs, CLIs, UIs, etc.
9-
Therefore, following the protocol-agnostic nature of smithy, the code generated by smithy4s is not biased towards any protocol or serialisation mechanism, nor any runtime or Scala version.
8+
* **optimised for number of usecases**: Smithy4s is **not** (just) an http/json library, it can/could be used for a great many things, such as AWS SDKs, CLIs, UIs, etc.
9+
Therefore, following the protocol-agnostic nature of smithy, the code generated by Smithy4s is not biased towards any protocol or serialisation mechanism, nor any runtime or Scala version.
1010
* **optimised for correctness over compatibility**: there is strictly no guarantee made regarding backward compatibility of the generated code when users evolve their smithy schemas.
1111
Therefore, users are expected to regenerate the code at use-site, instead of relying on artifacts that would contain the generated code... However, users do get idiomatic Scala code, including case classes / sealed traits (which are notoriously hard to evolve in binary compatible ways), and this generated code correctly reflects the smithy specifications.
1212
* **decoupled from third-party libraries**: the generated code depends only on smithy4s-core for compilation, which does not pull third-party dependencies (not even a general purpose libraries that the maintainers love, like cats)

0 commit comments

Comments
 (0)